Skip to content
Snippets Groups Projects
Commit 527ef6ec authored by Mickaël Hoerdt's avatar Mickaël Hoerdt
Browse files

let's send ICMP instead

parent 40e504a0
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
import sys
import argparse
from scapy.all import sendp, sendpfast, Ether, IP, RandIP, RandMAC, TCP
from scapy.all import sendp, sendpfast, Ether, IP, RandIP, RandMAC, ICMP
def macsender(iface):
smac_rand = str(RandMAC('00:*:*:*:*:*'))
......@@ -16,8 +16,7 @@ def macsender(iface):
pkts=[]
pkts.append(Ether(src=smac_rand, dst=str(RandMAC(dmac_rand)))/
IP(src=str(RandIP('0.0.0.0/0')), dst=str(RandIP('0.0.0.0/0')))/
TCP(sport=None, dport=None, flags='R',
options=[('Timestamp', (0, 0))]))
ICMP())
print(pkts)
sendp(pkts, iface=iface, loop=False, verbose=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment