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)