Bitcoin Forum

Other => Beginners & Help => Topic started by: hicks on April 07, 2013, 01:08:44 AM



Title: [Solved] Please move: "additional script for finding lost passphrase"
Post by: hicks on April 07, 2013, 01:08:44 AM
Hi, could some admin please move this to https://bitcointalk.org/index.php?topic=85495.100 and let member Revalin know (being a newbie, I cannot post there nor PM him).

Revalin, thanks for your script. Me, too, I forgot my precise passphrase. I remembered the overall mechanism to construct my wallet passphrase but didn't remember exactly how I applied it.
My wallet passphrase consists of a left and a right part. The left part was a sequence of character, maybe "Start" or "start" or "beginning"... Same with the right part. It could have been "end" or "End" or ... So, the passphrase could have been "startend", "Startend", "beginningEnd", ... There were about twenty possibilities for the left and also for the right part, too many to test manually. So I adapted your script.

Code:
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
lefts = [ "start", "Start", "Beginning" ] # The possible words for the left part
rights = ["end", "End", "ending"] # The possible words for the right part

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
  when nil
    puts "Aborting"
    exit 1
  end
end

lefts.each do |left|
  rights.each do |right|
    test(left + right)
  end
end

If someone wants to use it, then replace the words in lefts and rights with your words and add as many as required.

Another comment: as reported earlier by niklas, the script runs unusable slow on Windows. I recommend installing some Linux image. I had no problems with German special characters.
Revalin, please PM me, I would like to send you a Bitcoin reward. Without your script, I probably wouldn't have recovered my wallet.


Title: Re: [Solved] Please move: "additional script for finding lost passphrase"
Post by: Stephen Gornick on April 08, 2013, 07:33:56 PM
Without your script, I probably wouldn't have recovered my wallet.

Great to see access to another wallet saved!  There's going to be a growing need for someone to offer this service commercially.


Title: Re: [Solved] Please move: "additional script for finding lost passphrase"
Post by: d0gbyt3 on April 10, 2013, 12:37:53 PM
Hey Guys!

I'm another one of the people that got forced to deviate a lot from his usual PW pattern and was so stupid as to forget how. Im now the proud owner of bitcoins i cannot touch (i can LOOK though, ouch!)

I currently dont have easy/trusted access to a non Windows 7 machine. Could someone tell me if its possible to get these scripts running on Windows 7 at any usable speed (as warned by hicks)? Or do i really have to get hold of a linux machine?

Thanks in advance!


Title: Re: [Solved] Please move: "additional script for finding lost passphrase"
Post by: BigAbe on May 16, 2013, 08:04:34 PM
d0gbyt3: "Hey Guys!

I'm another one of the people that got forced to deviate a lot from his usual PW pattern and was so stupid as to forget how. Im now the proud owner of bitcoins i cannot touch (i can LOOK though, ouch!)

I currently dont have easy/trusted access to a non Windows 7 machine. Could someone tell me if its possible to get these scripts running on Windows 7 at any usable speed (as warned by hicks)? Or do i really have to get hold of a linux machine?

Thanks in advance!"


I ran Revalin's script in Windows 7, so no it's not necessary to get a non-Windows 7 machine.

Download Ruby, copy the script into a text editor then save as brute.rb file in the same directory as the bitcoind file.

Go to that directory in command prompt and then type: brute.rb   
                                               
                                                                                                             .....or, if that doesn't work, type:  ruby brute.rb

Make sure that your bitcoin.config file has a set rpcusername and password, make sure that server=1.

And you should be good to go.


Title: Re: [Solved] Please move: "additional script for finding lost passphrase"
Post by: saurey on June 12, 2013, 09:01:30 PM
I have a similar problem, I know the 1st and the last parts but the middle is of varying length between 1 and 6 characters containing a combination of characters "9876$%+eEH#" That combination could be 1 character, 2, 3, 4, 5 or 6

Could anyone please modify the above script and help a newb out? I'm such a tardo for forgetting this password.