mirror of
https://github.com/lgandx/Responder.git
synced 2025-12-07 21:21:34 +00:00
Check if the platform is macOS before trying to set a non-exported
TCP_KEEPIDLE option
This commit is contained in:
@@ -140,7 +140,9 @@ def ConnectToTarget():
|
||||
s.setsockopt(SOL_SOCKET, SO_KEEPALIVE, 1)
|
||||
s.setsockopt(IPPROTO_TCP, TCP_KEEPCNT, 15)
|
||||
s.setsockopt(IPPROTO_TCP, TCP_KEEPINTVL, 5)
|
||||
s.setsockopt(IPPROTO_TCP, TCP_KEEPIDLE, 5)
|
||||
# macOS does not have TCP_KEEPIDLE
|
||||
if sys.platform != 'darwin':
|
||||
s.setsockopt(IPPROTO_TCP, TCP_KEEPIDLE, 5)
|
||||
s.connect(Host)
|
||||
return s
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user