[英]How can i create packet with GRE header using scapy
I found an example in this pdf http://www.secdev.org/conf/scapy_Aachen.pdf . 我在此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')
but i get KEY ERROR "GRE"
Maybe someone can help me with this problem? 但是我收到
KEY ERROR "GRE"
也许有人可以帮助我解决这个问题?
I managed to find the answer myself. 我设法自己找到答案。 A correct packet is built and send with
构建正确的数据包并与之一起发送
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’)
Try this: 尝试这个:
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"))) 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“))))
works 作品
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.