Gallopsled / pwntools

CTF framework and exploit development library
http://pwntools.com
Other
11.69k stars 1.67k forks source link

feat: multi shellcraft cmd #2398

Closed cocoa-xu closed 2 weeks ago

cocoa-xu commented 2 months ago

Hi, this is a draft PR that allows shellcraft to take multiple commands at a time and generate corresponding output. For example,

# before
$ pwn shellcraft -f d setreuid
$ pwn shellcraft -f d sh

# after
$ pwn shellcraft -f d setreuid + sh

I made this feature a while ago but was not sure if you'd like it to be in this tool. If you're interested in this feature, I can write some tests for this feature :)

peace-maker commented 2 months ago

Yes, this looks nice and I often wanted to draft something like this too

cocoa-xu commented 2 months ago

Hi @peace-maker, thanks for the kind reply. I updated the code and added some tests in the CI. Please feel free to let me know if there's anything else I should add to the CI for testing this feature :)