From 05b8359e3f798d54c67d095ae30b9e51fb07c3f0 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Wed, 6 Dec 2017 10:14:43 +0330 Subject: obfuscator doesnt mess up var declations with init values, python driver has been updated, not finished yet, bruiser now gets the objects from load.py, executioner will handle running the objects and registering them with lua --- mutator.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'mutator.py') diff --git a/mutator.py b/mutator.py index 376140c..aa9c0aa 100755 --- a/mutator.py +++ b/mutator.py @@ -28,7 +28,7 @@ class ArgParser(object): parser = argparse.ArgumentParser() parser.add_argument("-help", action='store_true', help="display the driver's help", default=False) parser.add_argument("-f", "--file", type=str, help="run an action file") - parser.add_argument("-c", "--command", type=str, help="run a command") + parser.add_argument("-c", "--command", nargs="+", type=str, help="run a command") parser.add_argument("-v", "--version", action='store_true', help="display version info", default=False) parser.add_argument("-i", "--input", type=str, help="the input file(s)") parser.add_argument("-o", "--output", type=str, help="the output file(s)") @@ -41,6 +41,7 @@ class ArgParser(object): def run(self): if self.args.file is not None: self.parseActionFile(self.args.file) + self.runActionFile() if self.args.command is not None: self.runCommand(self.args.command) @@ -108,29 +109,29 @@ class ArgParser(object): pass def runCommand(self, command): - if command == "clean": + if command[0] == "clean": call(["make", "clean"]) - elif command == "build": - call(["make", "all"]) - elif command == "install": + elif command[0] == "make": + call(["make", self.args.command[1]]) + elif command[0] == "install": call(["make", "install"]) - elif command == "format": + elif command[0] == "format": pass - elif command == "test": + elif command[0] == "test": pass - elif command == "build-all": - call(["make", "build-all"]) - elif command == "m0": + elif command[0] == "buildall" or command[0] == "makeall": + call(["make"]) + elif command[0] == "m0": pass - elif command == "m1": + elif command[0] == "m1": pass - elif command == "m2": + elif command[0] == "m2": pass - elif command == "bruiser": + elif command[0] == "bruiser": pass - elif command == "obfuscator": + elif command[0] == "obfuscator": pass - elif command == "safercpp": + elif command[0] == "safercpp": pass else: raise Exception(Colors.red + "unknown command. for a list of valid commands run with -h." + Colors.ENDC); -- cgit v1.2.3