mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
allow socket creation monkeypatchs
This commit is contained in:
parent
ebccc103d8
commit
24ceb0f7ac
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user