Saataa andagii !

This commit is contained in:
Lukian 2025-01-14 12:34:34 +01:00
parent d9f8aac30f
commit 7177a763e5

View file

@ -5,6 +5,7 @@ import threading
from time import sleep from time import sleep
PORT = 80 PORT = 80
MY_IP = get_if_addr(conf.iface)
Handler = http.server.SimpleHTTPRequestHandler Handler = http.server.SimpleHTTPRequestHandler
http = socketserver.TCPServer(("", PORT), Handler) http = socketserver.TCPServer(("", PORT), Handler)
@ -18,6 +19,7 @@ def empty_addresses():
def handler(pkt): def handler(pkt):
address = pkt[IP].src address = pkt[IP].src
if address == MY_IP: return
if address in addresses.keys(): if address in addresses.keys():
count = addresses[address] count = addresses[address]
if count > 30: if count > 30: