Skip to content

Instantly share code, notes, and snippets.

@HungHT1890
Created November 12, 2024 06:22
Show Gist options
  • Save HungHT1890/d3cac3acc99fefbc4a2566244f114bce to your computer and use it in GitHub Desktop.
Save HungHT1890/d3cac3acc99fefbc4a2566244f114bce to your computer and use it in GitHub Desktop.
decode_mail_taphoammo
def hex_to_int(emailenc, offset):
r = emailenc[offset:offset + 2]
return int(r, 16)
def decode_email(emailenc,offset):
o = ''
start = offset + 2
end = len(emailenc)
step = 2
key = hex_to_int(emailenc,offset)
a = key
for i in range(start,end,step):
l = hex_to_int(emailenc,i) ^ a
o += chr(l)
try:
emaildecode = (bytes(o, "latin1").decode("utf-8"))
return emaildecode
except Exception as e:
print(e)
return ''
offset = 0
emailenc = "2c5f595c5c435e586c584d5c44434d41414302424958"
print(decode_email(emailenc, offset))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment