Gallopsled / pwntools

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

can pwntools add the function of ignoring signal when debugging locally? #634

Closed skysider closed 8 years ago

skysider commented 8 years ago

Sometimes, the SIGALRM signal is annoying. I know that process of pwntools is based on subprocess, and subprocess has the function of ignoring signal by passing "preexec_fn" argument, So I wonder if it's possible to achieve it.

zachriggle commented 8 years ago

Yep, just pas in a preexec_fn that does what you want. We honor preexec_fn.

skysider commented 8 years ago

@zachriggle I see. I install pwntools by pip install pwntools, and the pwntools in pypi is updated on 2015.1, so I missed the feature.

zachriggle commented 8 years ago

It may be binjitsu-specific (http://binjit.su) On Sun, Jun 26, 2016 at 5:19 AM shenyuan notifications@github.com wrote:

Yep, just pas in a preexec_fn that does what you want. We honor preexec_fn.

I see. I install pwntools by pip install pwntools, and the pwntools in pypi is updated on 2015.1, so I missed the feature.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Gallopsled/pwntools/issues/634#issuecomment-228581977, or mute the thread https://github.com/notifications/unsubscribe/AAG0GM09CVPgD-0z-V43UxriFFpseyi_ks5qPe_HgaJpZM4I-XDT .

zachriggle commented 8 years ago

In any case, if you're debugging locally, you can just tell GDB to ignore it.

handle SIGALRM nostop print nopass
zachriggle commented 8 years ago

Closing since the preexec_fn recommendation is a correct solution, and is now available in master.