-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pwndbginit
70 lines (61 loc) · 1.63 KB
/
.pwndbginit
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
source /home/deepunk/pwn/tools/pwndbg/gdbinit.py
source /home/deepunk/pwn/tools/Pwngdb/pwngdb.py
source /home/deepunk/pwn/tools/Pwngdb/angelheap/gdbinit.py
source /home/deepunk/pwn/tools/splitmind/gdbinit.py
source /home/deepunk/scripts/kdbg/kdbg.py
define bp
b *$rebase($arg0)
end
define pla
libc
printf "libc+offset: 0x%lx\n", $libc + $arg0
end
define pl
libc
printf "offset: 0x%lx\n", $arg0 - $libc
end
define show_linkmap
set $map = (struct link_map *) $arg0
printf "[34m[+] link_map at %p :[0m \n", $arg0
print *$map
set $l_addr = (char *) $map->l_addr
set $l_name = (char *) $map->l_name
printf "\n[33m\tname: %s [0m", $l_name
printf "\n[33m\taddr: %p [0m", $l_addr
printf "[0m\n\n"
printf "[0m\n\n"
end
define link_maps
set $map = (struct link_map *) $arg0
while ($map != 0)
set $l_addr = (char *) $map->l_addr
set $l_name = (char *) $map->l_name
printf "[34m[+] link_map at %p [0m", $map
printf "\n[33m\tname: %s [0m", $l_name
printf "\n[33m\taddr: %p [0m", $l_addr
printf "[0m\n\n"
set $map = $map->l_next
end
end
define hook-run
python
import angelheap
angelheap.init_angelheap()
end
end
set context-clear-screen on
set follow-fork-mode parent
python
import splitmind
(splitmind.Mind()
.tell_splitter(show_titles=False)
.left(display="regs", size="36%")
.below(display="disasm", size="59%")
.above(of="main", display="stack", size="42%")
.right(display="backtrace", size="21%")
.right(of="main", cmd="ipython", size="30%")
.show("legend", on="stack")
).build(nobanner=True)
end
set context-stack-lines 14
set context-code-lines 20