Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions scapy/fwdmachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ class ForwardMachine:
Methods to override:

:func xfrmcs: a function to call when forwarding a packet from the 'client' to
the server. If it returns True, the packet is forwarded as it. If it
returns False or None, the packet is discarded. If it returns a
packet, this packet is forwarded instead of the original packet.
the server. If it raises a FORWARD exception, the packet is forwarded as it. If
it raises a DROP Exception, the packet is discarded. If it raises a
FORWARD_REPLACE(pkt) exception, then pkt is forwarded instead of the original
packet.
:func xfrmsc: same as xfrmcs for packets forwarded from the 'server' to the
'client'.
"""
Expand Down Expand Up @@ -372,7 +373,7 @@ def cb_sni(sock, server_name, _):
# Load result certificate our SSL server
# (this is dumb but we need to store them on disk)
certfile = get_temp_file()
with open(certfile, "wb") as fd:
with open(certfile, "w") as fd:
for c in certs:
fd.write(c.pem)
keyfile = get_temp_file()
Expand Down
Loading