-
Notifications
You must be signed in to change notification settings - Fork 0
/
3.4_ip_ICMP.py
20 lines (17 loc) · 2.91 KB
/
3.4_ip_ICMP.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python
from scapy.all import *
eth_inteface = "Intel(R) Ethernet Connection (13) I219-LM"
src_mac='00:50:56:AA:AA:AA'
dst_mac='00:50:56:FF:FF:FF'
src_ip='10.9.8.7'
dst_ip='1.2.3.4'
#icmp request
eth_frame = Ether(dst=dst_mac,src=src_mac, type=0x0800)
ip_packet = IP(dst=dst_ip,src=src_ip)
icmp_payload= ICMP(type=8,code=0)
sendp(eth_frame/ip_packet/icmp_payload/"anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?", iface=eth_inteface)
#icmp reply
eth_frame = Ether(dst=src_mac,src=dst_mac, type=0x0800)
ip_packet = IP(dst=src_ip,src=dst_ip)
icmp_payload= ICMP(type=0,code=0)
sendp(eth_frame/ip_packet/icmp_payload/"anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?anybody out there1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890?", iface=eth_inteface)