-
Notifications
You must be signed in to change notification settings - Fork 39
/
d2d.py
30 lines (28 loc) · 1.96 KB
/
d2d.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#
# ██████╗ ███████╗ ██████╗ ██████╗ ███╗ ███╗██████╗ ██████╗ ██████╗ ██████╗ ██████╗
# ██╔══██╗██╔════╝██╔════╝██╔═══██╗████╗ ████║██╔══██╗╚════██╗██╔══██╗██╔══██╗██╔════╝
# ██║ ██║█████╗ ██║ ██║ ██║██╔████╔██║██████╔╝ █████╔╝██║ ██║██████╔╝██║ ███╗
# ██║ ██║██╔══╝ ██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██╔═══╝ ██║ ██║██╔══██╗██║ ██║
# ██████╔╝███████╗╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ███████╗██████╔╝██████╔╝╚██████╔╝
# ╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚══════╝╚═════╝ ╚═════╝ ╚═════╝
# by mahaloz
#
# discover interface
is_gdb = True
try:
import gdb
except ImportError:
is_gdb = False
if is_gdb:
_globals = globals()
if "gef" in _globals:
from decomp2dbg.clients.gdb.gef_client import GEFClient
GEFClient(register_external_context_pane, gef_print, gef)
elif "pwndbg" in _globals:
from decomp2dbg.clients.gdb.pwndbg_client import PwndbgClient
PwndbgClient()
else:
from decomp2dbg.clients.gdb.gdb_client import GDBClient
GDBClient()
else:
raise Exception("Unsupported debugger type detected, decomp2dbg will not run!")