Created
July 31, 2010 10:25
-
-
Save corny/502029 to your computer and use it in GitHub Desktop.
Deobfuscation for KDE passwords
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def kde_deobfuscate(str) | |
chars = str.split("") | |
out = '' | |
while chars.any? | |
b1 = chars.shift | |
if b1 == 0xef.chr | |
case chars.shift | |
when 0xbe.chr | |
out << (0x1001F - chars.shift[0] - 0xff00).chr | |
when 0xbf.chr | |
out << (0x1001F - chars.shift[0] - 0xff00 - 0x40).chr | |
end | |
end | |
end | |
out | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see http://salahuddin66.blogspot.com/2009/04/recover-kopete-password.html