Created
December 5, 2022 01:30
-
-
Save InersIn/ce8a94174b4d78f20911477c2979340a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import Popen, PIPE | |
for x in range(599): | |
a = Popen(["objdump", "-d", f"bertanya{x}"], stdout=PIPE) | |
stdout = a.communicate()[0].splitlines() | |
n = stdout[16].decode().split(" ") | |
logic = n[-5] | |
num2 = n[-1].split(",")[0][1:] | |
num = stdout[17].decode().split(" ")[-1].split(",")[0][1:] | |
n = "" | |
if "add" in logic: | |
n = int(num, 16)-int(num2, 16) | |
elif "sub" in logic: | |
n = int(num, 16)+int(num2, 16) | |
if n>256: | |
n-=256 | |
elif "xor" in logic: | |
n = int(num, 16)^int(num2, 16) | |
else: | |
print(logic, f"bertanya{x}") | |
exit() | |
print(chr(n),end="") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment