Scapy Simplified

Here’s Scapy layers :

Scapy

 

To send ICMP packet

>Send(IP(src=”192.168.0.10″,dst=”8.8.8.8″)ICMP()/”Test”)

To create a packet from scratch

>L2=Ether()

>L3=IP()

>L4=TCP()

Now to see the default settings of each layer execute:

>L2/L3/L4.show()

Let’s change the default settings

>L2=Ether(src=”01:23:55:66:35:00″)

>L3=IP(ttl=99,dst=”8.8.8.8″)

>L4=TCP(sport=6783,dport=22,flags=”A”)

>send=sendp(L2/L3/L4)

So simple!

It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn