如何使用scapy创建带有GRE头的包

2024-09-29 07:31:56 发布

您现在位置:Python中文网/ 问答频道 /正文

我在这个pdf中找到了一个例子http://www.secdev.org/conf/scapy_Aachen.pdf。在

send(IP(dst="1.1.1.1",proto="GRE")/'\x00\x00\x00\xfe\x83\x1b\x01\x06\x12\x01\xff\x07\xff\xff\xff\xff\xff\xff\xff \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x07\x00\x00')

但我得到KEY ERROR "GRE" 也许有人能帮我解决这个问题?在


Tags: orgsendhttppdfconfwww例子scapy
2条回答

我自己设法找到了答案。生成正确的数据包并与

send( IP(dst="")/GRE(proto=254)/b’\x83\x1b\x01\x06\x12\x01\xff\x07\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x07 \x00\x00’)

试试这个:

sendp(Ether(dst=“00:00:00:00:00:03”)/IP(dst=“10.0.0.2”)/GRE(key_present=1,key=900)/fuzz(Ether(dst=“00:00:00:00:00:03”)/IP(dst=“10.0.0.2”)/TCP()/Raw(load=“GRE tunnels FTW”))

作品

相关问题 更多 >