Closed Yogehi closed 6 years ago
As states in #216, commenting out the module_pre
function is not an option.
@Yogehi, if an app hasn't been selected yet, then (rather than commenting out the entire module_pre function, you can do the following:
def module_pre(self):
return BaseModule.module_pre(self, bypass_app=True)
the "def module_pre(self)" function calls the function 'module_pre' in the class 'FridaScript' in the file '/needle/needle/core/framework/module.py'.
in this function, line 299 tries to spawn the app using 'self.app_metadata'. however, this assumes that the user had already set an app to begin with. usually, when you start a needle module and you haven't specified an app yet, needle will make the user go through the wizard of selecting an app.
so if the user had not specified an app yet before running this module, then needle will error out while trying to execute this module.
i opted to comment out the offending code in this module instead of deleting because i wasn't sure why the function 'module_pre' was in this module to begin with.
@marco-lancini has stated the following:
if an app hasn't been selected yet, then (rather than commenting out the entire module_pre function, you can do the following:
the above fix results in the following error:
@HenryHoggard suggested patching 'framework/module.py' and adjusting 'module_pre' to call 'app_check()'.