Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Decodes Evernote password recovered from Evernote for Android config file

View evernote_pass_decode.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#!/usr/bin/env ruby
 
##
# Copyright 2013 Adam Caudill <adam@adamcaudill.com>
#
# Decodes Evernote password recovered from Evernote for Android config file:
# File: /data/data/com.evernote/shared_prefs/com.evernote_preferences.xml
# (may also be in <userid>.prof.xml if missing from com.evernote_preferences.xml)
# Password: <string name="encrypted_password">
# Username: <string name="username">
##
 
require "base64"
 
if ARGV.count != 2
puts 'Usage: ./evernote_pass_decode.rb <pass> <username>'
end
 
pass = Base64.decode64(ARGV[0])
user = ARGV[1]
final = ''
 
pass.bytes.each_with_index do |byte, index|
final += (byte ^ user[index % user.length].unpack('c')[0]).chr
end
 
puts "Password: #{final}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.