Skip to content

Commit 76cdd28

Browse files
committed
Land rapid7#5220, @bcook-r7's fix for OSX forking pymet
Fixes 5013
2 parents 3963289 + 5140b8c commit 76cdd28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

data/meterpreter/meterpreter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
# this MUST be imported for urllib to work on OSX
2323
try:
2424
import SystemConfiguration as osxsc
25+
osxsc.SCNetworkInterfaceCopyAll()
2526
has_osxsc = True
2627
except ImportError:
2728
has_osxsc = False
@@ -749,7 +750,7 @@ def create_response(self, request):
749750
resp = struct.pack('>I', len(resp) + 4) + resp
750751
return resp
751752

752-
if not hasattr(os, 'fork') or has_osxsc or (hasattr(os, 'fork') and os.fork() == 0):
753+
if not hasattr(os, 'fork') or (hasattr(os, 'fork') and os.fork() == 0):
753754
if hasattr(os, 'setsid'):
754755
try:
755756
os.setsid()

0 commit comments

Comments
 (0)