In reference to the thread:
https://bitcointalk.org/index.php?topic=85495.0;all started by ez1btc, a few great scripts where posted addressing the issue of forgotten encryption keys for bitcoin wallets.
I used a ruby script by Revalin:
#!/usr/bin/ruby -w
passphrase = "mypass"
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 = passphrase[i+1]
testphrase[i+1] = passphrase
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 = 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
I managed to install and configure ruby, configure my rpc username/passcode, set server=1 and run the script through command prompt (Windows 7 machine).
However, with each iteration whereby a character is checked for the passcode, I get the error:
error: no response from server
At this juncture I'm not sure what to do, if anyone can PM Revalin and get him to take a look at this issue, I can afford a small donation to him/her and Revalin.
Thanks.