Skip to content

Instantly share code, notes, and snippets.

@HACKE-RC
Created April 30, 2021 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HACKE-RC/ce9c6c0cd4cd4ba0731fbfa39cb15f7e to your computer and use it in GitHub Desktop.
Save HACKE-RC/ce9c6c0cd4cd4ba0731fbfa39cb15f7e to your computer and use it in GitHub Desktop.
give '123456789' to any program which plays with it, then get the output and specify it as the first output of the command and then specify your input that you want to mangle in the same way as the second argument
#!/bin/env python3
from sys import argv
work = True if len(argv)>2 else False
if not work:
exit()
pattern = '123456789'
mangled = argv[1]
res = []
for i in pattern:
res.append(mangled.index(i))
inp = argv[2]
result = []
for i in res:
result.append(inp[i])
print("".join(result))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment