mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-37363: Add audit events for a range of modules (GH-14301)
This commit is contained in:
parent
9bbf4d7083
commit
60419a7e96
37 changed files with 165 additions and 18 deletions
|
@ -231,6 +231,7 @@ class Telnet:
|
|||
self.host = host
|
||||
self.port = port
|
||||
self.timeout = timeout
|
||||
sys.audit("telnetlib.Telnet.open", self, host, port)
|
||||
self.sock = socket.create_connection((host, port), timeout)
|
||||
|
||||
def __del__(self):
|
||||
|
@ -286,6 +287,7 @@ class Telnet:
|
|||
"""
|
||||
if IAC in buffer:
|
||||
buffer = buffer.replace(IAC, IAC+IAC)
|
||||
sys.audit("telnetlib.Telnet.write", self, buffer)
|
||||
self.msg("send %r", buffer)
|
||||
self.sock.sendall(buffer)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue