Bitcoin Forum
November 12, 2024, 12:15:33 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [17] 18 19 20 21 22 23 24 25 26 27 28 29 30 31 »
  Print  
Author Topic: Encrypted wallet.dat, lost password, any solutions?  (Read 213596 times)
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
December 15, 2013, 12:44:34 AM
Last edit: December 15, 2013, 09:11:13 PM by Revalin
 #321

i've lost my PTS & DTC wallet psw (The psw is the same at both) like bounty i offer 30% of my pts & 25% of my DTC!
i remember it but when i try to put it the wallet give a error
The psw was Ctrl+c & ctrl+v form a wikipedia page so i'm sure at 100% it is. but maybe i'm missing a space or something like that...thanks who will pm me!

You should check if that page has been edited.  Smiley

If that doesn't work you can try the standard double-typo script:

Code:
#!/usr/bin/ruby -w
require 'net/http'
require 'json'

passphrase = 'oops i forgot'
$rpc_pass = "some-password"

def test(passphrase)
  puts passphrase.inspect
  request = Net::HTTP::Post.new("/")
  request.basic_auth "", $rpc_pass
  request.body = { method:"walletpassphrase", params:[passphrase, 1] }.to_json
  response = Net::HTTP.new("localhost", 8332).request(request)
  if response.code == "401" ; puts "Incorrect RPC user/pass" ; exit 1 ; end
  ret = JSON.parse response.body
  if ret["error"].nil? ; puts "\nFound it! #{passphrase.inspect}" ; exit ; end
  return if ret["error"]["code"] == -14 # wrong passphrase
  raise "WTF? #{ret.inspect}"
end

def scramble(passphrase)
  characters = " !\"\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
  list = []

  # transpose adjacent chars
  (passphrase.length - 1).times do |i|
    testphrase = passphrase.dup
    testphrase[i] = passphrase[i+1]
    testphrase[i+1] = passphrase[i]
    list << testphrase
  end

  # delete one char
  passphrase.length.times do |i|
    testphrase = passphrase.dup
    testphrase = testphrase[0,i] + testphrase[(i+1)..-1]
    list << testphrase
  end

  # substitutute one char
  passphrase.length.times do |i|
    characters.chars.each do |c|
      testphrase = passphrase.dup
      testphrase[i] = c
      list << testphrase
    end
  end

  # insert one char
  (passphrase.length + 1).times do |i|
    characters.chars.each do |c|
      testphrase = passphrase.dup
      testphrase.insert(i, c)
      list << testphrase
    end
  end

  return list.uniq
end

list1 = scramble(passphrase)
list1.each { |i| test i }
list1.each { |i| scramble(i).each { |j| test j }}
puts "No luck."
exit 1

Instructions are here:  https://bitcointalk.org/index.php?topic=85495.msg3746636#msg3746636
And here:  https://bitcointalk.org/index.php?topic=85495.msg3882236#msg3882236

Protoshares uses a different RPC port so either change it in the script above or start protoshares with -rpcport=8332 in addition to -rpcpassword=some-password .

Give it a try, and we'll help you get it working if you get stuck.

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
jongameson
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
December 15, 2013, 01:07:51 AM
 #322

Are you typing "ruby brute.rb"? That's what you need to type.

If this still doesn't work, give me a slightly fuller explanation of exactly what you're trying to do and I'll see if I can solve this for you. Smiley

Thanks again
Just done that and got this error no such file or directory
So i removed the "" from the save file and just saved as brute.rb
And now i get this error brute.rb:62in '<main>' : underfined method 'captures' for NilClass <NoMethodError>

Getting closer?

Cheers


how do i fix this error?

here is line 62:

   seed_base64 = wallet.match(/'seed': '([^']+)'/).captures.first
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
December 15, 2013, 03:06:19 AM
 #323

And now i get this error brute.rb:62in '<main>' : underfined method 'captures' for NilClass <NoMethodError>
   seed_base64 = wallet.match(/'seed': '([^']+)'/).captures.first

That indicates the script couldn't find the seed in your Electrum wallet.  Try putting this just above that line:
Code:
puts wallet

That will print out the raw wallet (it's just a text file for Electrum).  Read through it and see if it has something like this:  'seed': 'a349iYLbPwas1O4mXdLDcg/N1RLK2Hb6oZdee7JLsf6J79EGZORmLY9+a5yBryFxKtPBl3WWUdFmNjEdEXo8dg=='

If it doesn't print anything it didn't load your wallet for some reason.  If it doesn't have a seed it might be a different wallet version.  If it does have a seed we'll have to find the bug in my script.

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
jongameson
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
December 15, 2013, 06:49:16 AM
Last edit: December 15, 2013, 07:13:55 AM by jongameson
 #324

I don't have Electrum.  I have feathercoin.  I know the first 16 characters of the password, but the last 9-12 characters I am unsure of.   can u make it so it is case insensitive, and try a 1-2 digit number at the end, with a ~ or ~~ after or before, I forgot..?
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
December 15, 2013, 07:08:52 AM
 #325

I don't have Electrum.  I have feathercoin.  I know the first 16 characters of the password, but the last 9-12 characters I am unsure of.   can u make it so it is case insensitive, and try a 1-2 digit number at the end, with a ~ or ~~ after or before, I forgot..?

I think you got the Electrum script by accident.  Try this one: https://bitcointalk.org/index.php?topic=85495.msg3969951#msg3969951

We will need to narrow the password down more.  Do you know approximately what the last 9-12 are, or are they completely unknown?

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
jongameson
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
December 15, 2013, 07:12:00 AM
Last edit: December 15, 2013, 09:24:59 PM by jongameson
 #326

Update:  I remembered an older version of the password stored on the wallet.dat on another computer

But thanks for the help.  teenie BTC tip comin your way Smiley
goldbishop
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile
December 15, 2013, 04:48:02 PM
 #327

i've lost my PTS & DTC wallet psw (The psw is the same at both) like bounty i offer 30% of my pts & 25% of my DTC!
i remember it but when i try to put it the wallet give a error
The psw was Ctrl+c & ctrl+v form a wikipedia page so i'm sure at 100% it is. but maybe i'm missing a space or something like that...thanks who will pm me!

You should check if that page has been edited.  Smiley

If that doesn't work you can try the standard double-typo script:

Code:
#!/usr/bin/ruby -w

passphrase = 'oops i forgot'
$rpc_pass = "some-password"

def test(passphrase)
  puts passphrase.inspect
  request = Net::HTTP::Post.new("/")
  request.basic_auth "", $rpc_pass
  request.body = { method:"walletpassphrase", params:[passphrase, 1] }.to_json
  response = Net::HTTP.new("localhost", 8332).request(request)
  if response.code == "401" ; puts "Incorrect RPC user/pass" ; exit 1 ; end
  ret = JSON.parse response.body
  if ret["error"].nil? ; puts "\nFound it! #{passphrase.inspect}" ; exit ; end
  return if ret["error"]["code"] == -14 # wrong passphrase
  raise "WTF? #{ret.inspect}"
end

def scramble(passphrase)
  characters = " !\"\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
  list = []

  # transpose adjacent chars
  (passphrase.length - 1).times do |i|
    testphrase = passphrase.dup
    testphrase[i] = passphrase[i+1]
    testphrase[i+1] = passphrase[i]
    list << testphrase
  end

  # delete one char
  passphrase.length.times do |i|
    testphrase = passphrase.dup
    testphrase = testphrase[0,i] + testphrase[(i+1)..-1]
    list << testphrase
  end

  # substitutute one char
  passphrase.length.times do |i|
    characters.chars.each do |c|
      testphrase = passphrase.dup
      testphrase[i] = c
      list << testphrase
    end
  end

  # insert one char
  (passphrase.length + 1).times do |i|
    characters.chars.each do |c|
      testphrase = passphrase.dup
      testphrase.insert(i, c)
      list << testphrase
    end
  end

  return list.uniq
end

list1 = scramble(passphrase)
list1.each { |i| test i }
list1.each { |i| scramble(i).each { |j| test j }}
puts "No luck."
exit 1

Instructions are here:  https://bitcointalk.org/index.php?topic=85495.msg3746636#msg3746636
And here:  https://bitcointalk.org/index.php?topic=85495.msg3882236#msg3882236

Protoshares uses a different RPC port so either change it in the script above or start protoshares with -rpcport=8332 in addition to -rpcpassword=some-password .

Give it a try, and we'll help you get it working if you get stuck.


thanks for reply! btw i get this error:

Code:
C:\Users\Antonio\AppData\Roaming\ProtoShares>brute
"the psw "
C:/Users/Antonio/AppData/Roaming/ProtoShares/brute.rb:8:in `test': uninitialized
 constant Net (NameError)
        from C:/Users/Antonio/AppData/Roaming/ProtoShares/brute.rb:60:in `block
in <main>'
        from C:/Users/Antonio/AppData/Roaming/ProtoShares/brute.rb:60:in `each'
        from C:/Users/Antonio/AppData/Roaming/ProtoShares/brute.rb:60:in `<main>
'

C:\Users\Antonio\AppData\Roaming\ProtoShares>
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
December 15, 2013, 09:13:22 PM
 #328

uninitialized constant Net (NameError)

Whoops, paste error.  I've fixed it above.  The top of the script should look like this:

Code:
#!/usr/bin/ruby -w
require 'net/http'
require 'json'

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
madmooseman
Newbie
*
Offline Offline

Activity: 9
Merit: 0



View Profile
December 16, 2013, 01:50:09 PM
 #329

Is there any way this could be altered for multiple wordlists?

Eg. I am fairly sure I made the password from four wordlists.

For example, List A is shirt-themed (hawaiian, dress, long-sleeve, etc.)

List B is car-themed (ford, toyota, camry, etc.)

List C is country-themed (australia, thailand, colombia, etc.)

List D is guitar-themed (fender, gibson, valencia, etc.)

So it would try "hawaiianfordaustraliafender", "hawaiianfordaustraliagobson", etc.

Right now I am making it run all wordlists at once, but this is inefficient as it repeats words and it has a lot of combinations that I know are not correct (incorrect order, etc.)
goldbishop
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile
December 16, 2013, 03:44:12 PM
 #330

uninitialized constant Net (NameError)

Whoops, paste error.  I've fixed it above.  The top of the script should look like this:

Code:
#!/usr/bin/ruby -w
require 'net/http'
require 'json'

another error:
Code:
C:\Users\Antonio\AppData\Roaming\ProtoShares>brute.rb
"psw "
C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:878:in `initialize': Impossibile stabi
lire la connessione. Rifiuto persistente del computer di destinazione. - connect
(2) (Errno::ECONNREFUSED)
        from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:878:in `open'
        from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:878:in `block in connect'

        from C:/Ruby200-x64/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
        from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:877:in `connect'
        from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
        from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:851:in `start'
        from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:1367:in `request'
        from C:/Users/Antonio/AppData/Roaming/ProtoShares/brute.rb:13:in `test'
        from C:/Users/Antonio/AppData/Roaming/ProtoShares/brute.rb:62:in `block
in <main>'
        from C:/Users/Antonio/AppData/Roaming/ProtoShares/brute.rb:62:in `each'
        from C:/Users/Antonio/AppData/Roaming/ProtoShares/brute.rb:62:in `<main>
'
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
December 17, 2013, 05:35:57 AM
 #331

Is there any way this could be altered for multiple wordlists?

Eg. I am fairly sure I made the password from four wordlists.

For example, List A is shirt-themed (hawaiian, dress, long-sleeve, etc.)

List B is car-themed (ford, toyota, camry, etc.)

List C is country-themed (australia, thailand, colombia, etc.)

List D is guitar-themed (fender, gibson, valencia, etc.)

So it would try "hawaiianfordaustraliafender", "hawaiianfordaustraliagobson", etc.

Right now I am making it run all wordlists at once, but this is inefficient as it repeats words and it has a lot of combinations that I know are not correct (incorrect order, etc.)

Sure:

Code:
#!/usr/bin/ruby
require "net/http"
require "json"

$rpc_pass = "rpc-pass"
words_a = ['hawaiian', 'dress', 'long-sleeve']
words_b = ['ford', 'toyota', 'camry']
words_c = ['australia', 'thailand', 'colombia']
words_d = ['fender', 'gibson', 'valencia']

def test(passphrase)
  puts passphrase.inspect
  request = Net::HTTP::Post.new("/")
  request.basic_auth "", $rpc_pass
  request.body = { method:"walletpassphrase", params:[passphrase, 1] }.to_json
  response = Net::HTTP.new("localhost", 8332).request(request)
  if response.code == "401" ; puts "Incorrect RPC user/pass" ; exit 1 ; end
  ret = JSON.parse response.body
  if ret["error"].nil? ; puts "\nFound it! #{passphrase.inspect}" ; exit ; end
  return if ret["error"]["code"] == -14 # wrong passphrase
  raise "WTF? #{ret.inspect}"
end

words_a.each do |a|
  words_b.each do |b|
    words_c.each do |c|
      words_d.each do |d|
        [a,b,c,d].permutation.each { |p| test p.join }
      end
    end
  end
end

puts "No luck."

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
December 17, 2013, 06:17:53 AM
 #332

another error:
Code:
(Errno::ECONNREFUSED)

That one means the script couldn't connect to your wallet via RPC.  Check that the daemon is running with: -rpcpassword=some-password -rpcport=8332



1: I encrypted the wallet on a live ubuntu CD. Is there any difference in encoding?

I'm not sure.  I suggest you test it with your exact setup.  Create a new wallet with a short password, copy it onto the new system, and try the brute force script with a typo in the password.  That will verify that everything is working correctly.

Quote
2: Is there any faster way to check the key, besides submitting a message to bitcoind? I am currently doing about 3-4 guesses per second which isn't cutting it so far

Bitcoin stretches the keys to about 0.1 seconds on the CPU where you create your wallet.  4 per second suggests you might be cracking on a slower CPU than the one where your wallet came from.

Submitting to bitcoind is pretty fast.  Any of the RPC scripts should keep bitcoind at 99% CPU.  Bitcoind itself is using OpenSSL which is also pretty fast.  There's not much to optimize there.

Bitcoind only uses a single CPU.  A multithreaded version would be several times faster.

GPUs would have less performance gain than mining, but they would help.  You'll need someone with experience programming GPUs.  I do not.

The best case for optimizing the number crunching is we could speed things up a few hundred times.  You will get MUCH bigger gains by targeting the search better.  It's easy to get literally a trillion-times speedup by narrowing the search criteria, so that's where I focus most of my time.

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
bitcoma
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
December 17, 2013, 04:04:57 PM
 #333

Revalin, is your script compatible with Multibit?
goldbishop
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile
December 17, 2013, 10:28:24 PM
 #334

another error:
Code:
(Errno::ECONNREFUSED)

That one means the script couldn't connect to your wallet via RPC.  Check that the daemon is running with: -rpcpassword=some-password -rpcport=8332


sorry but..how to luch deamon of PTS-qt? it doesn't have a deamon like bitcoin...
madmooseman
Newbie
*
Offline Offline

Activity: 9
Merit: 0



View Profile
December 18, 2013, 06:44:49 AM
 #335

Sure:

Code:
#!/usr/bin/ruby
require "net/http"
require "json"

$rpc_pass = "rpc-pass"
words_a = ['hawaiian', 'dress', 'long-sleeve']
words_b = ['ford', 'toyota', 'camry']
words_c = ['australia', 'thailand', 'colombia']
words_d = ['fender', 'gibson', 'valencia']

def test(passphrase)
  puts passphrase.inspect
  request = Net::HTTP::Post.new("/")
  request.basic_auth "", $rpc_pass
  request.body = { method:"walletpassphrase", params:[passphrase, 1] }.to_json
  response = Net::HTTP.new("localhost", 8332).request(request)
  if response.code == "401" ; puts "Incorrect RPC user/pass" ; exit 1 ; end
  ret = JSON.parse response.body
  if ret["error"].nil? ; puts "\nFound it! #{passphrase.inspect}" ; exit ; end
  return if ret["error"]["code"] == -14 # wrong passphrase
  raise "WTF? #{ret.inspect}"
end

words_a.each do |a|
  words_b.each do |b|
    words_c.each do |c|
      words_d.each do |d|
        [a,b,c,d].permutation.each { |p| test p.join }
      end
    end
  end
end

puts "No luck."

Using this, I get the following errors:

http://puu.sh/5QpCL.png

Any ideas?

Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
December 18, 2013, 08:27:44 AM
 #336

Revalin, is your script compatible with Multibit?

Multibit doesn't have an RPC or command line interface I can use.  I'll try using BitcoinJ to access it when I have some time.
 

sorry but..how to luch deamon of PTS-qt? it doesn't have a deamon like bitcoin...

protoshares-qt.exe -server -rpcpassword=some-password -rpcport=8332


Using this, I get the following errors:

It might be a paste error.  Open the script in an editor and paste it back to me in a PM.

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
goldbishop
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile
December 18, 2013, 11:16:25 AM
Last edit: December 18, 2013, 11:27:22 AM by goldbishop
 #337



sorry but..how to luch deamon of PTS-qt? it doesn't have a deamon like bitcoin...

protoshares-qt.exe -server -rpcpassword=some-password -rpcport=8332



Edit: ok i set up it but it's noramal it say:

"password trying"
net/http: waring: content-type did not set; using application/x-www-form-urlencoded


??
Justin00
Legendary
*
Offline Offline

Activity: 910
Merit: 1000


★YoBit.Net★ 350+ Coins Exchange & Dice


View Profile
December 18, 2013, 12:58:47 PM
 #338

i have a massive dictionary file. Would be happy to try run her agianst someones wallet for a fee if I find it :] ?

peta4e
Hero Member
*****
Offline Offline

Activity: 672
Merit: 500



View Profile
December 22, 2013, 12:31:06 PM
 #339

I was able successfully to recover deleted wallets with software called photorec. Great software I am not affiliated in any way just want to mention it to others which face the same problem : )) 
mackminer
Sr. Member
****
Offline Offline

Activity: 348
Merit: 251



View Profile
December 26, 2013, 09:46:46 PM
 #340

Hi, I have ruby etc. installed on my machine but I just need a script to do what I want.

My situation is that I have a combination of multiple passwords - there are up to five passwords (I think), include wildcards, they could be any combination and some passwords that I use may not be there at all.

I can give more details if needs be. .5 of a bitcoin to someone that can get my wallet unlocked.

Thanks.

1BFf3Whvj118A5akc5fHhfLLwxYduMmq1d
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [17] 18 19 20 21 22 23 24 25 26 27 28 29 30 31 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!