first commit

This commit is contained in:
2025-11-05 18:29:49 +03:00
commit a80c03a27d
41 changed files with 7713 additions and 0 deletions

34
divs/tcp_monitor.py Normal file
View File

@@ -0,0 +1,34 @@
import asyncore
from textwrap import wrap
refserver_hostname = "79.172.5.168"
refserver_port = 4001
class REFClient(asyncore.dispatcher):
buff = ''
def __init__(self, host, port):
asyncore.dispatcher.__init__(self)
self.create_socket()
self.connect( (host, port) )
def handle_connect(self):
pass
def handle_close(self):
self.close()
def handle_read(self):
hex = bytes.hex(self.recv(8192))
hex = wrap(hex, 2)
print(' '.join(hex))
if __name__ == "__main__":
client = REFClient(refserver_hostname, refserver_port)
try:
asyncore.loop()
except KeyboardInterrupt:
pass
print("Server stopped.")