开发者

Adding payload in packet

开发者 https://www.devze.com 2023-03-18 08:48 出处:网络
Can I insert image or document (in MBs) as a data in packet using scapy? This is what I did to send data.

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)


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)
0

精彩评论

暂无评论...
验证码 换一张
取 消