Browse Source

Also show rebuild version

master
Nico Schottelius 3 years ago
parent
commit
ff4a190d8e
  1. 8
      bin/send_udp_packet_v4.py

8
bin/send_udp_packet_v4.py

@ -12,10 +12,18 @@ if __name__ == '__main__':
u = UDP(dport=80, sport=80)
d = "V4-OK"
v6 = IPv6(src="2001:db8:1::a00:1", dst="2001:db8::1")
pkg = e / i / u / d
pkg_v6 = e / v6 / u / d
packet_rebuild = pkg.__class__(str(pkg))
print("pkg = {}".format(pkg.__repr__()))
print("checksum = {}".format(packet_rebuild[UDP].chksum))
v6_rebuild = pkg_v6.__class__(str(pkg_v6))
print("v6: {} - {}".format(v6_rebuild.__repr__(), v6_rebuild[UDP].chksum))
sendp(pkg, iface=iface, verbose=True)

Loading…
Cancel
Save