Also show rebuild version
This commit is contained in:
parent
66bf50e2b5
commit
ff4a190d8e
1 changed files with 8 additions and 0 deletions
|
@ -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…
Reference in a new issue