scapy.contrib.vtp
VTP Scapy Extension
- version
2009-02-15
- copyright
2009 by Jochen Bartl
- license
GPL v2
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- TODO
Join messages
RE MD5 hash calculation
Have a closer look at 8 byte padding in summary adv:
“debug sw-vlan vtp packets” says the TLV length is invalid, when I change the values:
b'\x00\x00\x00\x01\x06\x01\x00\x02'x00x00 ?
x00x01 tlvtype?
x06 length?
x00x02 value?
h2i function for VTPTimeStampField
- References
- Understanding VLAN Trunk Protocol (VTP)
- class scapy.contrib.vtp.VTP(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.Packet- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VER | CODE | FOLLOWERS | SEQ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESERVED | DOMNAMELEN | DOMNAME | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | REV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | UID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TIMESTAMP | MD5 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VLANINFO | STARTVALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. VTPVTP fields ver
2code
1followers
ByteField(Cond)1seq
ByteField(Cond)1reserved
ByteField(Cond)0domnamelen
Nonedomname
b'manbearpig'rev
SignedIntField(Cond)0uid
IPField(Cond)'192.168.0.1'timestamp
VTPTimeStampField(Cond)b'930301000000'md5
StrFixedLenField(Cond)b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'vlaninfo
PacketListField(Cond)[]startvalue
ShortField(Cond)0
- class scapy.contrib.vtp.VTPVlanInfo(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.Packet- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | STATUS | TYPE | VLANNAMELEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VLANID | MTU | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DOT10INDEX | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VLANNAME | TLVLIST | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. VTPVlanInfoVTPVlanInfo fields len
Nonestatus
0type
1vlannamelen
Nonevlanid
1mtu
1500dot10index
Nonevlanname
b'default'tlvlist
PacketListField(Cond)[]
- class scapy.contrib.vtp.VTPVlanInfoTlv(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.Packet- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE | LENGTH | VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. VTPVlanInfoTlvVTPVlanInfoTlv fields type
0length
0value
None