1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-03-12 12:14:29 +01:00

Always os.fork() when available.

This commit is contained in:
Spencer McIntyre 2013-08-28 17:19:49 -04:00
parent 322e20886c
commit 568d1f5963

View File

@ -403,5 +403,6 @@ class PythonMeterpreter(object):
resp = struct.pack('>I', len(resp) + 4) + resp
return resp
met = PythonMeterpreter(s)
met.run()
if not hasattr(os, 'fork') or (hasattr(os, 'fork') and os.fork() == 0):
met = PythonMeterpreter(s)
met.run()