def teardown(self): try: if self.script: click.secho('Asking jobs to stop...', dim=True) job_manager_state.cleanup() click.secho('Unloading objection agent...', dim=True) self.script.unload() except frida.InvalidOperationError as e: click.secho(f'Unable to run cleanups: {e}', fg='yellow', dim=True)
def cleanup(self) -> None: """ Cleanup an Agent :return: """ if self.script: click.secho('Asking jobs to stop...', dim=True) job_manager_state.cleanup() click.secho('Unloading objection agent...', dim=True) self.unload()
def cleanup(self) -> None: """ Cleanup an Agent :return: """ try: if self.script: click.secho('Asking jobs to stop...', dim=True) job_manager_state.cleanup() click.secho('Unloading objection agent...', dim=True) self.unload() except frida.InvalidOperationError as e: click.secho('Unable to run cleanups: {error}'.format(error=str(e)), fg='yellow', dim=True)