From f9938d40391a89fb54698ae10b4d88a23a255c7e Mon Sep 17 00:00:00 2001 From: ghostersk <68815071+ghostersk@users.noreply.github.com> Date: Sat, 11 Mar 2023 19:25:52 +0000 Subject: [PATCH] Create tcpTEST.py --- tcpTEST.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tcpTEST.py diff --git a/tcpTEST.py b/tcpTEST.py new file mode 100644 index 0000000..69b3082 --- /dev/null +++ b/tcpTEST.py @@ -0,0 +1,17 @@ +import socket +import time +from datetime import datetime + +# Here you can define IP of your syslog server +TCP_IP = '127.0.0.1' +TCP_PORT = 514 + + +for x in range(100): + current_time = datetime.now() + MESSAGE = f"<150>Mar {current_time} Vigor3900: Local User: (MAC=68:4f:64:97:6b:95) 10.2.12.30:60073 -> 20.190.159.23:443 (TCP)" + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.connect((TCP_IP, TCP_PORT)) + s.sendall(bytes(MESSAGE, 'utf-8')) + s.close() + time.sleep(0.1)