Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
from secrets import randbelow M = 2**128 def enc(msg, key): o = [2, 73] fo..
Decoded Output download
<? from secrets import randbelow
M = 2**128
def enc(msg, key):
o = [2, 73]
for i, p in enumerate(map(ord, msg)):
o.append(((key*o[i+1])^(key+(o[i]*p))) % M)
return o
key = randbelow(2**64)
flag = open('flag.txt', 'r').read().strip()
ct = enc(flag, key)
print(ct)
?>
Did this file decode correctly?
Original Code
from secrets import randbelow
M = 2**128
def enc(msg, key):
o = [2, 73]
for i, p in enumerate(map(ord, msg)):
o.append(((key*o[i+1])^(key+(o[i]*p))) % M)
return o
key = randbelow(2**64)
flag = open('flag.txt', 'r').read().strip()
ct = enc(flag, key)
print(ct)
Function Calls
None |
Stats
MD5 | 653f53628d781705e6ac66e06f0c4fca |
Eval Count | 0 |
Decode Time | 41 ms |