Can I insert image or document (in MBs) as a data in packet using scapy?
This is what I did to send data.
data = "University of texas at San Antonio"
a = IP(dst="129.132.2.21")/TCP()/data
send(a)
The payload of a specific network packet or other protocol data unit (PDU) is the transmitted data sent by communicating endpoints; network protocols also specify the maximum length allowed for packet payloads.
If by "payload" you're referring to the data that comes after an IP header, then TCP is the "payload" of an IP packet when receiving data, since it's an upper level protocol.
The payload of a TCP or UDP packet is the data portion of the packet. You can configure Advanced policy expressions to examine features of a TCP or UDP packet, including the following: Source and destination domains. Source and destination ports. The text in the payload.
Yes, you can send raw data like this. In this example, data will be ASCII encoded.
>>> data = 'University of Texas at San Antonio'
>>> a = IP(dst='129.132.2.21') / TCP() / Raw(load=data)
>>> send(a)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With