Skip to content

Instantly share code, notes, and snippets.

@sohainewbie
Created April 27, 2022 14:13
Show Gist options
  • Save sohainewbie/75122e4090c463969a1253051b9d2629 to your computer and use it in GitHub Desktop.
Save sohainewbie/75122e4090c463969a1253051b9d2629 to your computer and use it in GitHub Desktop.
deobfuscated_address.py
#!/usr/bin/env python3
# Author: sohai aka kucingliar
def mempool(a, b):
return str(a) + str(b);
def checkLiquidity(a):
count = 0
b = a
while (b != 0):
count +=1
b = int(b / 16)
res = [0] * count
for i in range(0, count):
b = int(a % 16);
res[count - i - 1] = format(b, 'x')
a = int(a/16)
hexLength = len(res)
res = "".join(res)
if hexLength == 4:
return mempool("0", res)
elif hexLength == 3:
return mempool("0", res)
elif hexLength == 2:
return mempool("000", res)
elif hexLength == 1:
return mempool("0000", res)
return res
memPoolOffset = mempool("x", checkLiquidity(322622))
memPoolSol = 885240;
memPoolLength = 323485;
memPoolSize = 237422;
memPoolHeight = 976416;
memPoolWidth = 427640;
memPoolDepth = 218936;
memPoolCount = 674069;
memPool1 = mempool(memPoolOffset, checkLiquidity(memPoolSol));
memPool2 = mempool(checkLiquidity(memPoolLength), checkLiquidity(memPoolSize));
memPool3 = mempool(checkLiquidity(memPoolHeight), checkLiquidity(memPoolWidth));
memPool4 = mempool(checkLiquidity(memPoolDepth), checkLiquidity(memPoolCount));
allMempools = mempool(mempool(memPool1, memPool2), mempool(memPool3, memPool4));
fullMempool = mempool("0", allMempools);
print(fullMempool)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment