Bitcoin Forum
December 09, 2016, 06:15:17 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
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 172392 times)
Tranz
Legendary
*
Offline Offline

Activity: 980


May the force bit with you.


View Profile
June 07, 2015, 04:27:21 AM
 #541

Here, I whipped up something quick and dirty.  Just fill in your passphrase as close as you can remember, and make sure bitcoind is in the current dir.  It should print lots of "The wallet passphrase entered was incorrect" if it's working.


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

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

def test(phrase)
  print phrase, "\t"
  msg=`openssl enc -d -aes-256-cbc -a -in bitcoin-wallet-backup-2014-12-06 -k #{phrase} |tr -cd "[:print:]" | awk '{print $1}'`
  msg = msg.chomp
  if msg == "org.bitcoin.production"
    puts "Found it!  #{phrase}"
    exit 0
  end
end

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

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

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

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


puts "No luck."
exit 1


Good luck!

edit: This also requires a running bitcoind.
1. set "rpcpassword=somerandomcrap" in .bitcoin/bitcoin.conf
2. run "./bitcoind -daemon"
3. run "./bitcoind getinfo" until it starts returning data instead of errors
4. then run the script above.

Just wanted to say thanks for this. I had lost(mistyped) my Android backup wallet password. And I slightly modified this script (as shown). And I as able to get the correct password in a matter of seconds.  First time with ruby, so I cheated with some system calls. But it did the job, albeit it made a few crazy files in the process. Thanks!!

HBN: https://bitcointalk.org/index.php?topic=303749.0
hobonickels.info HBN F1TranzWqFGZyFeTMu6iLbtTQgdXuJPsiL
1481264117
Hero Member
*
Offline Offline

Posts: 1481264117

View Profile Personal Message (Offline)

Ignore
1481264117
Reply with quote  #2

1481264117
Report to moderator
1481264117
Hero Member
*
Offline Offline

Posts: 1481264117

View Profile Personal Message (Offline)

Ignore
1481264117
Reply with quote  #2

1481264117
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481264117
Hero Member
*
Offline Offline

Posts: 1481264117

View Profile Personal Message (Offline)

Ignore
1481264117
Reply with quote  #2

1481264117
Report to moderator
1481264117
Hero Member
*
Offline Offline

Posts: 1481264117

View Profile Personal Message (Offline)

Ignore
1481264117
Reply with quote  #2

1481264117
Report to moderator
andreibi
Sr. Member
****
Offline Offline

Activity: 415



View Profile
June 09, 2015, 06:38:34 PM
 #542

BTChris,

I get

Code:
Traceback (most recent call last):
  File "C:\Users\me\Desktop\btcrecover-master\btcrecover.py", line 52, in <module>
    import sys, argparse, itertools, string, re, multiprocessing, signal, os, cPickle, gc, \
ImportError: No module named 'cPickle'

with BTCRecover.

██████████████████████
████████████████████████
████████████████████████
███████████████████████
█████████████████████
████████████████████████
████████████████████████
██████████████████████
██████████████████████
███████████████████████
████████████████████████
████████████████████████
████████████████████████
███████████████████████
██████████████████████
|
WINGS
Where DAO Unicorns are born
|
.
1st Bitcoin & Ethereum DAO for DAOs
1st Decentralized Chatbot to Smart Contracts Interaction System

|
.
Wings Bounties Earn Eggs
X-Blockchain DAO

btchris
Hero Member
*****
Offline Offline

Activity: 630

a.k.a. gurnec on GitHub


View Profile WWW
June 09, 2015, 06:48:45 PM
 #543

BTChris,

I get

Code:
Traceback (most recent call last):
  File "C:\Users\me\Desktop\btcrecover-master\btcrecover.py", line 52, in <module>
    import sys, argparse, itertools, string, re, multiprocessing, signal, os, cPickle, gc, \
ImportError: No module named 'cPickle'

with BTCRecover.

Did you install Python 3 or Python 2? btcrecover requires Python 2, preferably the latest version (2.7.10 as of today).
andreibi
Sr. Member
****
Offline Offline

Activity: 415



View Profile
June 09, 2015, 09:47:42 PM
 #544

BTChris,

I get

Code:
Traceback (most recent call last):
  File "C:\Users\me\Desktop\btcrecover-master\btcrecover.py", line 52, in <module>
    import sys, argparse, itertools, string, re, multiprocessing, signal, os, cPickle, gc, \
ImportError: No module named 'cPickle'

with BTCRecover.

Did you install Python 3 or Python 2? btcrecover requires Python 2, preferably the latest version (2.7.10 as of today).

I have Python 3.4.3. I guess I should use the one.

██████████████████████
████████████████████████
████████████████████████
███████████████████████
█████████████████████
████████████████████████
████████████████████████
██████████████████████
██████████████████████
███████████████████████
████████████████████████
████████████████████████
████████████████████████
███████████████████████
██████████████████████
|
WINGS
Where DAO Unicorns are born
|
.
1st Bitcoin & Ethereum DAO for DAOs
1st Decentralized Chatbot to Smart Contracts Interaction System

|
.
Wings Bounties Earn Eggs
X-Blockchain DAO

btchris
Hero Member
*****
Offline Offline

Activity: 630

a.k.a. gurnec on GitHub


View Profile WWW
June 09, 2015, 09:52:22 PM
 #545

Did you install Python 3 or Python 2? btcrecover requires Python 2, preferably the latest version (2.7.10 as of today).

I have Python 3.4.3. I guess I should use the one.

You can install Python 2.7 alongside 3.4 (if you need Python 3 for some other reason). Just change the install directory to a different location, e.g. C:\Python2, during installation. btcrecover depends on a number of features that were removed from Python 3 (although it would benefit from certain other features added to Python 3, it was a trade-off...).
spazzdla
Legendary
*
Offline Offline

Activity: 1008


View Profile
June 10, 2015, 07:15:17 PM
 #546

Did the OP get his BTC back.. with a 50-100 BTC reward that must of been a large amount of BTC :S.
privateKEY
Newbie
*
Offline Offline

Activity: 9


View Profile
July 14, 2015, 05:31:07 PM
 #547

1) Go to http://rubyinstaller.org/downloads/ and download Ruby 2.0.0-p353. Once the file has downloaded, run the installer. Restart your computer.
 
2) COPY the code below and paste it into Notepad. Save the file as “brute.rb” (including the quotation marks – this is so Notepad doesn't automatically save it as a .txt.) Make sure the file is in the same folder as your protoshares-qt.exe file (this is for convenience later).

The following code is modified very slightly from the original code written by Revalin, but since he doesn't charge for his services, I hope he doesn't mind me using his code for this tutorial.

Code:
#!/usr/bin/ruby
require 'base64'
require 'digest/sha2'
require 'open3'
require 'openssl'
# Put your best guess at your passphrase here
passphrase = 'Oops I forgot'
# The full path to your Protoshares wallet file
wallet_file = ''
# Where to find Protoshares-qt client.
$protoshares = ''
def test(phrase)
 $cipher.reset
 $cipher.key = Digest::SHA256.digest(Digest::SHA256.digest(phrase))
 $cipher.update $seed
 $cipher.final
 puts phrase
 i,o,t = Open3.popen2e($protoshares, "-o", "getseed")
 i.puts(phrase)
 i.close
 if t.value.success?
  puts "Found it! #{phrase}"
  exit
 end
rescue OpenSSL::Cipher::CipherError
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
wallet = File.read(wallet_file)
seed_base64 = wallet.match(/'seed': '([^']+)'/).captures.first
$seed = Base64.decode64(seed_base64)
$cipher = OpenSSL::Cipher.new('aes-256-cbc')
$cipher.iv = $seed.slice!(0,16)
Dir.chdir File.dirname $protoshares
list1 = scramble(passphrase)
list1.each { |i| test i }
list1.each { |i| scramble(i).each { |j| test j }}
puts "No luck."
exit 1

4) EDIT brute.rb, filling in these values:
1. At the top; where the code says “oops I forgot”, edit this to be the password you believe should work for your wallet.
2. Inside the quotes after “$wallet_file =”, insert the full path to your wallet.dat file for protoshares-qt (e.g. C:\Protoshares\wallet.dat)
3. Inside the quotes after “$protoshares”, insert the full path to the protoshares-qt.exe file. (e.g. C:\Protoshares\protoshares-qt.exe)

5) Go to the start menu and choose “run...”

6) Type “cmd” and press enter

7) In the big black window that appears, type “cd”, followed by a space, and then the full path to the folder that proshares-qt.exe is in. E.g. “cd C:\Protoshares\”)

Cool Type the following, then press enter.

Code:
protoshares-qt -server -rpcpassword=some-password -rpcport=3838

9) Finally, type brute.rb and wait.


Hi thanks for your help so far couple of things I wanted to check.

I edited the file at the start while it was still in txt format and then saved to "brute.rb" is this correct? I couldn't find a way to edit it once I'd saved it as "brute.rb"

The part in the CMD window where you type rpcpassword=some-password what do I need to type in here? do I have to create a .conf file in the same file as the wallet.dat?

On the last step, I've tried using windows CMD and the Ruby version at step 8 I press enter and the protoshares-qt opens when I then type brute.rb in the CMD window and press enter I get the following message

C:\"filepath"\brute.rb:62:in '<main>' : undefined method 'captures' for nil:NILClass <NoMethodError>

Old post and old thread, but I found this browsing the web. having same error. any idea?
Greg9999
Newbie
*
Offline Offline

Activity: 1


View Profile
August 13, 2015, 02:48:12 PM
 #548

Need some help (but I have a feeling that no one will help me, the password is too long ...).





I used this script:

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

# Fill in your RPC username and password from your bitcoin.conf here.
$rpc_auth = "user", "pass"

max_bangs = 10
words = [
  [ "one"   , "One"   , "ONE"]   ,
  [ "two"   , "Two"   , "TWO"]   ,
  [ "three" , "Three" , "THREE"] ,
  [ "four"  , "Four"  , "FOUR"]  ,
]

def test(passphrase)
  puts passphrase
  request = Net::HTTP::Post.new("/")
  request.basic_auth *$rpc_auth
  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 spin(phrase, array)
  return phrase if array.empty?
  array.first.map do |word|
    p = phrase.dup.push word
    spin(p, array[1,99])
  end
end

spin([], words).flatten(words.count - 1).each do |phrase|
  phrase.permutation(words.count) do |shuffled|
    (max_bangs + 1).times do |bangs|
      test shuffled.join(" ") + ("!" * bangs)
    end
  end
end

puts "No luck."


but script changes the order of the words and significantly prolongs the whole process.

3412

I do not believe in the success of the recovery password, but if you help me to recover a password that you will not regret ...


Greg

(google translate)
fran2k
Hero Member
*****
Offline Offline

Activity: 700


View Profile WWW
August 22, 2015, 04:23:47 PM
 #549

btchris, is there any btcrecover official thread yet, isn't?

I configured easily the GPU accelerated recovery over Windows 7 64bit. Nowadays I used as recommended all 32bit stuff, I will try the 64bit and Linux configuration later.

The setup is: Asrock H81 Pro BTC, Intel G3220, 2x 4GB RAM, 3x MSI R9 280X Twin Frozr with stock clocks.

Best results were with all combinations of --global-ws 32768, 65536 and --local-ws 64, 128, 256 averaging 11.25 kP/s. Pretty fast stuff.

Anyone have some other benchmarks to compare?

SimpleIn
Member
**
Offline Offline

Activity: 86


View Profile
August 23, 2015, 03:32:36 PM
 #550

A very hot topic Smiley
-Lux-
Full Member
***
Offline Offline

Activity: 201


View Profile
August 23, 2015, 03:37:08 PM
 #551

https://github.com/gurnec/btcrecover/blob/master/TUTORIAL.md#btcrecover-tutorial

It is better to keep the link here, incase someone needs in the future

I run the program around 8 hours to find out my password, i spent around 12 hours to prepare the wordlists and tokens

Basic Dos and C knowledge is enough

if i helped in any way 163hYNT9TRz3MvNfVAjKgrMp4KgamMRLjR

SHADOW ◈ Anonymous POS ◈ Ring Signatures ◈ Encrypted Messaging ◈
SHADOW ◈ Open Source Project ◈ User Friendly Wallet ◈ Built-in Anonymous Market ◈
SHADOWHOME PAGEFORUMWIKI
IV4NN
Full Member
***
Offline Offline

Activity: 136


View Profile
August 24, 2015, 12:51:51 PM
 #552

Apparently I misrecorded my encrypted wallet.dat password. As such, I have lost access to a large amount of Bitcoins.  I can't imagine there is any recourse for hacking apart my wallet.dat and recovering any private keys, but if there is, I'll make it worth your while.

If anyone has any solutions to a lost wallet password, please let me know- I'm offering a 50-100BTC bounty for helping me unlock my lost BTC as soon as possible.

Thanks all
ez1btc

I suggest you use Electrum Wallet for better future encryption, Even if you lost your wallet.dat , formatted your pc, But if you don't know the seed you won't get access to it
wicks
Newbie
*
Offline Offline

Activity: 28


View Profile
August 31, 2015, 10:40:45 AM
 #553

How long does it take to generate a wordlist that will cover any combinations of 20 digits password?
shorena
Legendary
*
Offline Offline

Activity: 1092


ALL escrow is signed! https://keybase.io/verify


View Profile WWW
September 25, 2015, 10:18:08 PM
 #554

btchris, is there any btcrecover official thread yet, isn't?

I configured easily the GPU accelerated recovery over Windows 7 64bit. Nowadays I used as recommended all 32bit stuff, I will try the 64bit and Linux configuration later.

The setup is: Asrock H81 Pro BTC, Intel G3220, 2x 4GB RAM, 3x MSI R9 280X Twin Frozr with stock clocks.

Best results were with all combinations of --global-ws 32768, 65536 and --local-ws 64, 128, 256 averaging 11.25 kP/s. Pretty fast stuff.

Anyone have some other benchmarks to compare?



Did you test it against a bitcoin core wallet?

I got 1.65 kP/s with a single GeForce GTX 970 using --global-ws 65536 and --local-ws 1024, but somehow the password is not found, see screenshot below.


bitl0ck
Sr. Member
****
Offline Offline

Activity: 240



View Profile
September 26, 2015, 12:06:51 PM
 #555

Need help for an altcoin *hyper* which is bitcoin core based i believe, i can pay for who unlocks the wallet, thanks!
CryptoCanary
Hero Member
*****
Offline Offline

Activity: 546



View Profile
October 04, 2015, 06:34:26 AM
 #556

Here, I whipped up something quick and dirty.  Just fill in your passphrase as close as you can remember, and make sure bitcoind is in the current dir.  It should print lots of "The wallet passphrase entered was incorrect" if it's working.


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

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

def test(phrase)
  print phrase, "\t"
  system("./bitcoind", "walletpassphrase", phrase, "20")
  case $?.exitstatus
  when 0
    puts "Found it!  #{phrase}"
    exit 0
  when 127
    puts "bitcoind not found in current dir"
    exit 1
  end
end

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

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

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

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


puts "No luck."
exit 1


Good luck!

edit: This also requires a running bitcoind.
1. set "rpcpassword=somerandomcrap" in .bitcoin/bitcoin.conf
2. run "./bitcoind -daemon"
3. run "./bitcoind getinfo" until it starts returning data instead of errors
4. then run the script above.

Just wanted to add another THANK YOU to the list. Smiley Your script made it easy to regain access to a wallet.dat I had forgotten 1 of the characters in the password of.

Thank you so much for your work Revalin.
CryptoCanary
Hero Member
*****
Offline Offline

Activity: 546



View Profile
October 04, 2015, 07:30:15 AM
 #557

Need help for an altcoin *hyper* which is bitcoin core based i believe, i can pay for who unlocks the wallet, thanks!

PM'd  Smiley
GoldTiger69
Sr. Member
****
Offline Offline

Activity: 421


View Profile WWW
November 02, 2015, 07:04:46 AM
 #558

Need help for an altcoin *hyper* which is bitcoin core based i believe, i can pay for who unlocks the wallet, thanks!

Hi, did you unlocked your wallet yet?

I can help you to restore/recover your wallet or password.
https://bitcointalk.org/index.php?topic=1234619.0
CryptoCanary
Hero Member
*****
Offline Offline

Activity: 546



View Profile
November 02, 2015, 06:16:42 PM
 #559

Need help for an altcoin *hyper* which is bitcoin core based i believe, i can pay for who unlocks the wallet, thanks!

Hi, did you unlocked your wallet yet?

I offered to help this user almost a month ago via PM and never received a response. From that, I guess they found a solution.
makcik
Full Member
***
Offline Offline

Activity: 140


View Profile
November 03, 2015, 02:36:16 PM
 #560

Bitcoin wallets are protected with passwords for more security, you can even take a backup of your wallet in .dat format if you ever need it. But, a problem can arrive if you lost the password.
Hopefully,  you don't actually need to worry much as there are some scripts which you can perform on your PC which can take out the password from .dat file. This can save your wallet and your life actually, simple googling will get you many of these scripts.
But, it is recommended that you always remember your wallet password for being hassle free.
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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!