I've got the following python method, it gets a string and returns an integer. I'm looking for the correct input
that will print "Great Success!"
input = "XXX"
def enc(pwd):
inc = 0
for i in range(1, len(pwd) + 1):
_1337 = pwd[i - 1]
_move = ord(_1337) - 47
if i == 1:
inc += _move
else:
inc += _move * (42 ** (i - 1))
return inc
if hex(enc(input)) == 0xEA9D1ED352B8:
print "Great Success!"
It's encoding the input in base 42 (starting from chr(47)
which is '/'
), and easy to decode:
def dec(x):
while x:
yield chr(47 + x % 42)
x //= 42
print ''.join(dec(0xEA9D1ED352B8))
The output is: ?O95PIVII
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments