>Packet crafting using scapy

By | June 17, 2010

>I was always in search of a tool that allow me create own network packet by giving values in protocol fields. My search ends with scapy. scapy is great tool to craft tcp/ip packets and send it over network. This is how i used scapy to test my firewall rule,
      I sent a packet which has  TCP flags syn set for port number 80 on destination
(Note: The lines in {} is comment)

>>>ans,uans=sr(IP(dst=”″)/TCP(sport=1100,dport=80,flags=”S”)) {sr stand for send/receive}
 Finished to send 1 packet ….
>>>for snd,rcv in ans: {don’t forget to mention : at end}
…  {put space here} print snd.seq,rcv.seq
 … {press enter key}
0 12987

So, i got the sequence number of sent packet as well of received  packet.

Share itShare on FacebookEmail this to someoneTweet about this on TwitterShare on Google+Share on LinkedInPrint this page

Leave a Reply

Your email address will not be published. Required fields are marked *

Current month ye@r day *