mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-20 13:23:38 -07:00
Merge pull request #17 from leonjza/master
Check if the platform is macOS before setting TCP_KEEPIDLE
This commit is contained in:
commit
90071187cd
1 changed files with 3 additions and 1 deletions
|
@ -140,6 +140,8 @@ def ConnectToTarget():
|
|||
s.setsockopt(SOL_SOCKET, SO_KEEPALIVE, 1)
|
||||
s.setsockopt(IPPROTO_TCP, TCP_KEEPCNT, 15)
|
||||
s.setsockopt(IPPROTO_TCP, TCP_KEEPINTVL, 5)
|
||||
# macOS does not have TCP_KEEPIDLE
|
||||
if sys.platform != 'darwin':
|
||||
s.setsockopt(IPPROTO_TCP, TCP_KEEPIDLE, 5)
|
||||
s.connect(Host)
|
||||
return s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue