在数据包中添加负载
我可以用scapy把图片或文档(几兆大小)作为数据插入到数据包里吗?
这是我发送数据时所做的。
data = "University of texas at San Antonio"
a = IP(dst="129.132.2.21")/TCP()/data
send(a)
1 个回答
19
是的,你可以像这样发送原始数据。在这个例子中,数据将会使用ASCII编码。
>>> data = 'University of Texas at San Antonio'
>>> a = IP(dst='129.132.2.21') / TCP() / Raw(load=data)
>>> send(a)