diff options
Diffstat (limited to 'netlib/tcp.py')
-rw-r--r-- | netlib/tcp.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py index eea10425..b1a6db5a 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -727,9 +727,13 @@ class TCPClient(_Connection): self.rfile.set_descriptor(self.connection) self.wfile.set_descriptor(self.connection) + def makesocket(self): + # some parties (cuckoo sandbox) need to hook this + return socket.socket(self.address.family, socket.SOCK_STREAM) + def connect(self): try: - connection = socket.socket(self.address.family, socket.SOCK_STREAM) + connection = self.makesocket() if self.spoof_source_address: try: |