Skip to content

Instantly share code, notes, and snippets.

@jarkkojs
Created July 22, 2020 19:52
Show Gist options
  • Save jarkkojs/2f2c7393f7d6daf6885ad30611637fe9 to your computer and use it in GitHub Desktop.
Save jarkkojs/2f2c7393f7d6daf6885ad30611637fe9 to your computer and use it in GitHub Desktop.
➜ Desktop (master) ✗ cat tld.py
import pytesseract
import opcodes
import subprocess
from PIL import Image
CONFIG="-c tessedit_char_whitelist=ABCDEFGHIJKLMNOPQRSTUVWXYZ"
if __name__ == "__main__":
image = Image.open('EdhXlaiWAAEiElZ.png')
tld_list = pytesseract.image_to_string(image, config=CONFIG).split()
for tld in tld_list:
ret = subprocess.run(['as', '--32'], stdout=subprocess.PIPE, stderr=subprocess.PIPE,
input=(tld + '\n').encode('utf-8'))
err = ret.stderr.decode('utf-8')
if err == '' or 'number of operands' in err:
print(tld)
➜ Desktop (master) ✗ python3 tld.py
AAA
INC
INT
JCB
JLL
JMP
LDS
MOV
STC
@jarkkojs
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment