mirror of
https://github.com/lgandx/Responder.git
synced 2026-02-09 15:06:38 +00:00
Merge pull request #17 from leonjza/master
Check if the platform is macOS before setting TCP_KEEPIDLE
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