August 2017
Beginner
450 pages
13h 21m
English
This script defines a send_packet() function to construct the IP packet using Scapy. The source and destination addresses and ports are supplied to it. Depending on the protocol, for example, TCP or UDP, it constructs the correct type of packet. If the packet is TCP, the flags argument is used; if not, an exception is raised.
In order to construct a TCP packet, Sacpy supplies the IP()/TCP() function. Similarly, in order to create a UDP packet, the IP()/UDP() function is used.
Finally, the modified packet is sent using the send() function.
Read now
Unlock full access