From a4688b66bb95def581a1ed764c44a917bddee504 Mon Sep 17 00:00:00 2001 From: daniel baier Date: Thu, 6 Oct 2022 16:50:22 +0200 Subject: [PATCH] add debugging mode --- friTap/__init__.py | 3 ++- friTap/friTap.py | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/friTap/__init__.py b/friTap/__init__.py index 9e7df22..8641ca3 100755 --- a/friTap/__init__.py +++ b/friTap/__init__.py @@ -2,4 +2,5 @@ # -*- coding: utf-8 -*- __author__ = "Daniel Baier, Francois Egner, Max Ufer" -__version__ = "1.0.5.3" +__version__ = "1.0.5.4" +debug = False # are we running in debug mode? \ No newline at end of file diff --git a/friTap/friTap.py b/friTap/friTap.py index a06847d..2ba51a6 100755 --- a/friTap/friTap.py +++ b/friTap/friTap.py @@ -15,6 +15,7 @@ import friTap.pcap as pcap from friTap.__init__ import __version__ from friTap.__init__ import __author__ +from friTap.__init__ import debug try: import hexdump # pylint: disable=g-import-not-at-top @@ -90,6 +91,8 @@ def temp_fifo(): def ssl_log(app, pcap_name=None, verbose=False, spawn=False, keylog=False, enable_spawn_gating=False, mobile=False, live=False, environment_file=None, debug_output=False,full_capture=False, socket_trace=False, host=False): + global debug + debug = debug_output def on_message(message, data): @@ -184,8 +187,15 @@ def on_spawn_added(spawn): device.resume(spawn.pid) def instrument(process): + runtime="qjs" + if debug: + process.enable_debugger(1337) + print("[!] running in debug mode") + print("Chrome Inspector server listening on port 1337") + runtime="v8" + with open(os.path.join(here, '_ssl_log.js')) as f: - script = process.create_script(f.read()) + script = process.create_script(f.read(), runtime=runtime) script.on("message", on_message) script.load()