We have a success over in the Newbies forum:
https://bitcointalk.org/index.php?topic=169232.msgNiklas, you should try what he did in line 2 to mark the script as UTF-8 (or UTF-16, if you saved it on windows). When I get a chance I'll add some proper unicode support, but just adding the comment at the top to ensure the embedded strings are handled correctly might be worth a shot for now.
Here's his post in case it helps anyone else:
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.
#!/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.
I have an issue similar to this. Revalin helped me get the code going, but I used a different password format than I usually do. I found the sheet with the "building blocks", but I don't know the order.
I don't have much BTC, but I am willing to give a 1 BTC (out of the handful in my wallet) to someone who can help me with this.
I used 4 or 5 different words, with pronunciations that I remember.
I also used some numbers.
Lastly, I used a symbol somewhere in the password.
Is there a way to try passwords generated like this:
wordlist = ["PassWord", "passWord", "ninja", "pIRate", "ATTack"] (all my pronunciation variations- I will write those, I know what the variations are, which ones I use and don't use)
numbers = [0,1,2,3,4,5,6,7,8,9] (I may have used as many as 4 numbers in the password)
symbol = [$] (maximum of one symbol in the passphrase)
So it would take words from the word list, add a number(s), and symbol, and try all variations:
words (that I know, up to 5 maximum) + numbers (up to 4 single digits, 0-9999, maximum of four digits in passphrase, either appearing as singles ("8") or together("34" or "512" or "2323"), before or after words) + 1 symbol somewhere in the passphrase (maximum 1 time shown up, before or after a word or number)
It could be as few as 1 word and as many as 5. Could be as few as 2 numbers (at least 2) and as many as 4. Needs at least one symbol.
I hope this makes sense. If it doesn't, please let me know. I wish I could program. That powershell looks awesome!
Thanks,
VVI
using this code how do you stop it from exiting when found password it seems to exit instantly after finding the code