Packet Generators: Difference between revisions
→Misc
(→Complex Examples: simple eg) |
(→Misc) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 70:
==Simple Examples==
*Crafting ICMP Packet:
>>> i = IP()
>>> i.dst="192.168.1.1"
>>> i.display()
>>> ic = ICMP()
>>> ic.display()
sr1(i/ic)
sr1(i/ic/”aman.info.tm”)
*Crafting ARP Packet:
Be careful with this example, it will may break cause LAN issues for some time.<br />
You need to clear arp cache or wait for timeout on the device/router 192.168.1.10.
>>> a = ARP()
>>> a.pdst="192.168.1.10"
>>> a.hwsrc="11:11:11:11:11:11"
>>> a.psrc="1.1.1.1"
>>> a.hwdst="ff:ff:ff:ff:ff:ff"
>>> a.display()
send(a)
arp –a
==Complex Examples==
Line 211 ⟶ 234:
sack=ans.ack
ans=sr1((IP(proto=6, tos=0, dst='10.100.10.22', options='', version=4L)/TCP(seq=sack, ack=sseq+1, dport=21, flags="A", options=[('NOP', None), ('NOP', None), ('Timestamp', (981592, 525503134))])))
= PackEth =
{{UC}}
=Misc=
|