-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2.4_arp.py
80 lines (66 loc) · 1.57 KB
/
2.4_arp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/python
from scapy.all import *
eth_inteface = "Intel(R) Ethernet Connection (13) I219-LM"
src_mac='AA:AA:AA:AA:AA:AA'
dst_mac='FF:FF:FF:FF:FF:FF'
eth_frame = Ether(dst=dst_mac,src=src_mac, type=0x0806)
arp_packet = ARP(
hwtype=1,
ptype=0x0800,
hwlen=6,
plen=4,
op=1,
hwsrc= 'BB:BB:BB:BB:BB:BB',
psrc= '10.1.10.10',
hwdst= 'EE:EE:EE:EE:EE:EE',
pdst= '75.75.75.75'
)
sendp(eth_frame/arp_packet, iface=eth_inteface)
arp_packet = ARP(
hwtype=1,
ptype=0x0806,
hwlen=6,
plen=4,
op=1,
hwsrc= 'BB:BB:BB:BB:BB:BB',
psrc= b'\x0a\x01\x0a\x0a',
hwdst= 'EE:EE:EE:EE:EE:EE',
pdst= b'\x4b\x4b\x4b\x4b'
)
sendp(eth_frame/arp_packet, iface=eth_inteface)
arp_packet = ARP(
hwtype=2,
ptype=0x0842,
hwlen=6,
plen=4,
op=1,
hwsrc= 'BB:BB:BB:BB:BB:BB',
psrc= b'\x0a\x01\x0a\x0a',
hwdst= 'EE:EE:EE:EE:EE:EE',
pdst= b'\x4b\x4b\x4b\x4b'
)
sendp(eth_frame/arp_packet, iface=eth_inteface)
arp_packet = ARP(
hwtype=4,
ptype=0x22F0,
hwlen=6,
plen=4,
op=1,
hwsrc= 'BB:BB:BB:BB:BB:BB',
psrc= b'\x0a\x01\x0a\x0a',
hwdst= 'EE:EE:EE:EE:EE:EE',
pdst= b'\x4b\x4b\x4b\x4b'
)
sendp(eth_frame/arp_packet, iface=eth_inteface)
arp_packet = ARP(
hwtype=5,
ptype=0x3600,
hwlen=6,
plen=4,
op=1,
hwsrc= '00:50:56:BB:BB:BB',
psrc= b'\x0a\x01\x0a\x0a',
hwdst= 'EE:EE:EE:EE:EE:EE',
pdst= b'\x4b\x4b\x4b\x4b'
)
sendp(eth_frame/arp_packet, iface=eth_inteface)