Created
July 22, 2020 19:52
-
-
Save jarkkojs/2f2c7393f7d6daf6885ad30611637fe9 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
➜ 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Link: https://twitter.com/mikko/status/1285881804285763584