Skip to content

Commit

Permalink
Stop searching for protocol if found. (#31)
Browse files Browse the repository at this point in the history
* Minor fix.
* Upgraded PyOpenSSL.
  • Loading branch information
synchronizing authored Apr 29, 2023
1 parent 760062b commit e883a29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mitm/mitm.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ async def mitm(self, connection: Connection):
await proto.connect(connection=connection, host=host, port=port, tls=tls, data=data)
except InvalidProtocol: # pragma: no cover
proto = None
else:
# Stop searching for working protocols.
break

# Protocol was found, and we connected to a server.
if proto and connection.server:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pbr==5.9.0
PyOpenSSL==22.0.0
PyOpenSSL==23.1.1
appdirs==1.4.4
httpq==1.1.2
toolbox==1.9.0

0 comments on commit e883a29

Please sign in to comment.