Author

Topic: Encrypted wallet.dat, lost password, any solutions? [Contd. for Newbies] (Read 412 times)

brand new
Activity: 0
Merit: 0
Hi,

Did you manage to get a response from Revalin?

I am having a similar wallet passphrase problem , a website referenced Rvelin's code but it returned an error when I run it in Ruby compiler and I can figure out the problem.

Same issue I cannot message him directly so would appreciate if anyone can help contact Revalin and get him to allow newbie messages or help resolve the code error.

I just need the code to generate the variations from what I believe I set  the passphrase to into a text file so I can use another s/w to input it into the coins wallet, it must definitely be a typo or double caps error.

#!/usr/bin/ruby -w
#list of potentional passwords
passphraseList = ['possibility1','possibility2','possibility3']
$allPhrases=''
$countList=0
passphraseList.each do |passphrase|
   def display(phrase)
      if phrase.length != 1
         $allPhrases<         $allPhrases<<''
      end

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

     # transpose adjacent chars
     (passphrase.length - 1).times do |i|
       testphrase = passphrase.dup
       testphrase = passphrase[i+1]
       testphrase[i+1] = passphrase
       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 = 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
   list1 = scramble(passphrase)
   list1.each { |i| display i }
   print 'total count'
   print $countList
   fo = open("wordlist.txt","w")
   fo.write( $allPhrases )
   fo.close()
end
exit


xxxxxxxxxxxxx Errors returned in compiler xxxxxxxxxxxxxxxxx

$ruby main.rb
total count2373total count4746total count7119main.rb:7: warning: method redefined; discarding old display
main.rb:7: warning: previous definition of display was here
main.rb:15: warning: method redefined; discarding old scramble
main.rb:15: warning: previous definition of scramble was here
main.rb:7: warning: method redefined; discarding old display
main.rb:7: warning: previous definition of display was here
main.rb:15: warning: method redefined; discarding old scramble
main.rb:15: warning: previous definition of scramble was here

Any help will be greatly appreciated.

Regards.
Gabs.
newbie
Activity: 2
Merit: 0
        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.                                                             
                                               
Jump to: