Python Forum

Full Version: Need Help with creating an IP packet with timestamp field using Scapy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all
I am new with scapy. I tried creating an IP packet with options field having security set with the following scapy code.

packet = IP(dst="10.230.228.146", options=IPOption('\x81\x30'))

But every time I try running it, it throws an ICMP reply with type field set to 12, code field set to 0 and pointer field also set to 0.

<IP version=4 ihl=5 tos=0x0 len=52 id=16349 flags= frag=0 ttl=128 proto=icmp chksum=0x7793 src=10.*.*.* dst=10.*.*.* |<ICMP type=parameter-problem code=ip-header-bad chksum=0xf3ea ptr=0 length=0 unused=None |<IPerror version=4 ihl=6 tos=0x0 len=24 id=1 flags= frag=0 ttl=64 proto=ip chksum=0x40b src=10.*.*.* dst=10.*.*.* options=[<IPOption_Security copy_flag=1 optclass=debug option=security length=129 security=12288 |>] |>>>


Please help if you know how to correct this.

Thanks