I know there is lot of work to do, but I like to share a couple of new ideas and get your feedbacks @zachriggle @disconnect3d @anthraxx.
1) In my opinion it will be useful if the command hexdump behaves like the classic gdb command x/200bx. I mean that when we type hexdump 0x804e000 200 we display 200bytes from the address specified ( basically until 0x804e0c8) , but then when I press Enter in the CLI I want to display 200bytes from 0x804e0c8 until 0x804e190. I think this is useful during debugging since I don't have to rewrite manually the address if I need to display more bytes ( it's faster to press enter! ).
2) Why not implementing a pseudo-scripting engine for pwndbg? User can have inside a text file a list of gdb or pwndbg commands and by typing something like pwnscript <scriptname> pwndbg will execute the specified commands. This should resemble something like the scripting engine of Immunity that I found very very useful.
Do you think are they worth being implemented? Any feedback?
I don't like the idea of a custom inputrc, but if it's simple, maybe?
I don't think we can do this trivially: https://sourceware.org/gdb/onlinedocs/gdb/Command-Syntax.html#Command-Syntax
Only the list and x commands get this special treatment.
It looks like repeated commands do not get logged in the command history. We can just grab the history each command and see if the counter has incremented.
pwndbg> hexdump $rsp 10
+0000 0x7fffffffdb48 30 18 60 f7 ff 7f 00 00 00 00 00 00 00 00 00 00 โ0.`.โ....โ....โ....โ
+0010 0x7fffffffdb58
pwndbg>
+0000 0x7fffffffdb48 30 18 60 f7 ff 7f 00 00 00 00 00 00 00 00 00 00 โ0.`.โ....โ....โ....โ
+0010 0x7fffffffdb58
pwndbg>
+0000 0x7fffffffdb48 30 18 60 f7 ff 7f 00 00 00 00 00 00 00 00 00 00 โ0.`.โ....โ....โ....โ
+0010 0x7fffffffdb58
pwndbg> show com
commands compile-args complaints
pwndbg> show com
Ambiguous show command "com": commands, compile-args, complaints.
pwndbg> show commands
15 show history sie
16 q
17 show commands
18 start
19 x/10i $pc
20 show commands
21 hexdump $esp 10
22 hexdump $rsp 10
23 show com
24 show commands
@degrigis see #272
I was stubbornly searching for a way to do this hooking inputs from keyboard, but I think that the solution in #272 is simpler and effective!
Most helpful comment