Skip to content

Instantly share code, notes, and snippets.

@chrisswanda
Last active June 14, 2023 19:44
Show Gist options
  • Save chrisswanda/4b3fc13caa4c32691019b3bdda673e54 to your computer and use it in GitHub Desktop.
Save chrisswanda/4b3fc13caa4c32691019b3bdda673e54 to your computer and use it in GitHub Desktop.
How you can contact me
import os
import sys
import numpy
import string
if sys.version > '3':
strl = str
else:
strl = string
EMAIL = """
\xbd\xc2\xcc\xc3\xcd.\xcd\xd1\xbb\xc8\xbe\xbb@\xc1\xc7\xbb\xc3\xc6.\xbd\xc9\xc7
"""
y = string.ascii_letters
n = len(y)
M = numpy.identity(n, dtype=numpy.int32)
M[:n, n - 1] = 1
a = numpy.array(list(map(ord, y)), dtype=numpy.int32)
x = ''.join(map(chr, numpy.dot(M, a)))
uncipher = strl.maketrans(x, y)
print(strl.translate(EMAIL, uncipher))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment