Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding payload in packet

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)
like image 520
Chetan Avatar asked Jul 07 '11 02:07

Chetan


People also ask

What is a payload in packet?

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.

Can TCP be a payload of an IP packet?

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.

What is payload TCP?

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.


1 Answers

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)
like image 149
phoenix Avatar answered Oct 09 '22 01:10

phoenix