Skip to content

Commit

Permalink
add debugging mode
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel baier committed Oct 6, 2022
1 parent c036d05 commit a4688b6
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion friTap/__init__.py
Original file line number Diff line number Diff line change
@@ -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?
12 changes: 11 additions & 1 deletion friTap/friTap.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit a4688b6

Please # to comment.