hi,
i begin in scapy and i don't understand :
specially the line in bold characters
and why _tlv_cls is beginning with an underscore(_)?
can you help me please?
i begin in scapy and i don't understand :
Quote:# Dictionnaire des types de sous paquet
_tlv_cls = { 0x0001: "STUN_Attribut1",
0x0002: "STUN_Attribut2",
...
0x8022: "STUN_Attribut7"
}
def _STUNGuessPayloadClass(p, **kargs):
cls = Raw
if len(p) >= 2:
t = struct.unpack("!H", p[:2])[0]
clsname = _tlv_cls.get(t, "Raw")
cls = globals()[clsname]
return cls(p, **kargs)
specially the line in bold characters
and why _tlv_cls is beginning with an underscore(_)?
can you help me please?