Ejemplo n.º 1
0
def ip_cksum_test():
    p = Packet(tlspkt)
    before = p.get_ip_cksum()
    p.update_cksum()
    after = p.get_ip_cksum()
    assert (before == after)
Ejemplo n.º 2
0
def ip_attrib_test():
    p = Packet(tlspkt)
    assert (p.get_src() == '\x48\x0E\xCC\x67')
    assert (p.get_dst() == '\x80\x59\x50\xF8')
    assert (p.get_ip_cksum() == 0xc3a7)
    assert (p.protocol == 6)