Skip to content

Instantly share code, notes, and snippets.

@Headline
Created February 5, 2018 10:01
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 Headline/812f9ece824ab764dd7b411fb275b074 to your computer and use it in GitHub Desktop.
Save Headline/812f9ece824ab764dd7b411fb275b074 to your computer and use it in GitHub Desktop.
Recursively searches all subdirectories for plugins, decompiles them, and appends their output to output.txt
import os
import os.path
def get_clean_path(array):
somestr = ""
for x in range(0, len(array) - 1):
somestr += array[x] + "\\"
return somestr
path = get_clean_path(os.path.realpath(__file__).split("\\"))
for dirpath, dirnames, filenames in os.walk(path):
for filename in filenames:
current = dirpath + filename
if filename.endswith(".smx"):
print("DECOMPILING: " + current)
os.system("java -jar lysis-java.jar \"" + filename + "\" >> output.txt")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment