Skip to content

Instantly share code, notes, and snippets.

@corny
Created July 31, 2010 10:25
Show Gist options
  • Save corny/502029 to your computer and use it in GitHub Desktop.
Save corny/502029 to your computer and use it in GitHub Desktop.
Deobfuscation for KDE passwords
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
@corny
Copy link
Author

corny commented Jul 31, 2010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment