Skip to content

Instantly share code, notes, and snippets.

@RomanKharin
Created February 4, 2019 08:53
Show Gist options
  • Save RomanKharin/ed22315077bbb323cbc5fe04a1326cb6 to your computer and use it in GitHub Desktop.
Save RomanKharin/ed22315077bbb323cbc5fe04a1326cb6 to your computer and use it in GitHub Desktop.
Decode FAR 2 ftp saved password
# -*- coding: utf-8 -*-
# romiq.kh@gmail.com, 2014
import sys
def decode(crp):
buf = bytearray(bytes.fromhex(crp))
buf[0] ^= buf[1]
buf[0] |= 0x50
for i in range(2, len(buf)):
buf[i] ^= buf[0]
return buf[2:]
if __name__ == "__main__":
print("Password %r" % decode(sys.argv[1]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment