我有这个ICMP包,我想要更改IP in ICMP
字段(我也试图了解这个内部IP报头是什么),我如何访问它?我尝试过像packICMP.fieldname这样的东西,但是到目前为止没有什么效果。
###[ IP ]###
version = 4
ihl = 5
tos = 0x0
len = 84
id = 2531
flags = DF
frag = 0
ttl = 63
proto = icmp
chksum = 0x1ab3
src = 192.168.100.2
dst = 192.168.100.1
\options \
###[ ICMP ]###
type = dest-unreach
code = fragmentation-needed
chksum = 0xfcfb
reserved = 0
length = 0
nexthopmtu= 0
unused = ''
###[ IP in ICMP ]###
version = 9
ihl = 2
tos = 0x5f
len = 59487
id = 0
flags =
frag = 0
ttl = 231
proto = esp
chksum = 0x800
src = 0.0.0.0
dst = 16.17.18.19
\options \
|###[ IP Option Router Alert ]###
| copy_flag = 0
| optclass = control
| option = router_alert
| length = 21
| alert = 5655
|###[ IP Option ]###
| copy_flag = 0
| optclass = control
| option = upstream_multicast_packet
| length = 25
| value = '\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+'
发布于 2020-12-27 03:18:35
不过,我已经找到了答案:一个ICMP()错误封装了他原来的IP头,所以是IP/ICMP/IP
IPerror
是允许更改它的字段。
https://stackoverflow.com/questions/65464948
复制