def do_surgical(args): """ Description: Instantiates the SurgicalAPI with available functions and operations Requirements: Loaded APK Usage: surgical """ try: from framework.brains.surgical.api import SurgicalAPI if globals()["apks"] is not None: # Instantiate surgicalAPI # s = SurgicalAPI(globals()["apks"], "apks") s.run_surgical() elif globals()["dex"] is not None: s = SurgicalAPI(globals()["dex"], "dex") s.run_surgical() else: print( t.red("[{0}] ".format(datetime.now())) + t.white(enum.MODULE_UNAVAILABLE)) print( t.red("[{0}] ".format(datetime.now())) + t.white(enum.SURGICAL_MODULE_MESSAGE)) except ImportError as e: print( t.red("[{0}] ".format(datetime.now()) + enum.IMPORT_ERROR_SURGICAL)) Logger.run_logger(e.message)
def do_surgical(args): """ Description: Instantiates the SurgicalAPI with available functions and operations Requirements: Loaded APK Usage: surgical """ try: from framework.brains.surgical.api import SurgicalAPI if globals()["apks"] is not None: s = SurgicalAPI(globals()["apks"], "apks") s.run_surgical() elif globals()["dex"] is not None: s = SurgicalAPI(globals()["dex"], "dex") s.run_surgical() else: print(t.red("[{0}] ".format(datetime.now())) + t.white("Module not available")) print(t.red("[{0}] ".format(datetime.now())) + t.white("You cannot run the surgical module without a target executable")) except ImportError as e: print(t.red("[{0}] ".format(datetime.now()) + "Unable to import the SurgicalAPI")) Logger.run_logger(e.message)
def do_surgical(args): """ Description: Instantiates the SurgicalAPI with available functions and operations Requirements: Loaded APK Usage: surgical """ try: from framework.brains.surgical.api import SurgicalAPI s = SurgicalAPI(globals()["apks"]) s.run_surgical() except ImportError as e: print(t.red("[{0}] ".format(datetime.now()) + "Unable to import the SurgicalAPI")) Logger.run_logger(e.message)
def do_surgical(args): """ Description: Instantiates the SurgicalAPI with available functions and operations Requirements: Loaded APK Usage: surgical """ try: from framework.brains.surgical.api import SurgicalAPI s = SurgicalAPI(globals()["apks"]) s.run_surgical() except ImportError as e: print( t.red("[{0}] ".format(datetime.now()) + "Unable to import the SurgicalAPI")) Logger.run_logger(e.message)
def do_surgical(args): """ Description: Instantiates the SurgicalAPI with available functions and operations Requirements: Loaded APK Usage: surgical """ try: from framework.brains.surgical.api import SurgicalAPI if globals()["apks"] is not None: # Instantiate surgicalAPI # s = SurgicalAPI(globals()["apks"], "apks") s.run_surgical() elif globals()["dex"] is not None: s = SurgicalAPI(globals()["dex"], "dex") s.run_surgical() else: print(t.red("[{0}] ".format(datetime.now())) + t.white(enum.MODULE_UNAVAILABLE)) print(t.red("[{0}] ".format(datetime.now())) + t.white(enum.SURGICAL_MODULE_MESSAGE)) except ImportError as e: print(t.red("[{0}] ".format(datetime.now()) + enum.IMPORT_ERROR_SURGICAL)) Logger.run_logger(e.message)