80 likes | 159 Views
Toolbox. Struct. MyStruct. Integer. Length:UBInt16. Bytes. Value:Bytes(_). Struct. Data. 05. 40 41 42 43 44. 11 22 33 44 55 66 77 88 99 aa bb cc dd. length. value. MyStruct. File. View. Tools. Capture. WireSnake. _. x. ethernet. ipv4. class MacAddressAdapter(Adapter):
E N D
Toolbox Struct MyStruct Integer Length:UBInt16 Bytes Value:Bytes(_) Struct Data 05 40 41 42 43 44 11 22 33 44 55 66 77 88 99 aa bb cc dd length value MyStruct
File View Tools Capture WireSnake _ x ethernet ipv4 class MacAddressAdapter(Adapter): … … ethernet_header = Struct( … … … … ) • Debugger: • Traceback • Context analysis • Playback Struct A sequence of … Parameters: name – … subcons – … Buffer: 0172996a336c3b62811de6a70806 Result: Conatiner: dst=“01-72-99-6a-33-6c” src = …
Ethernet header Field(6) Field(6) UBInt16 01001001001001… Ethernet header Dest = \x01\x02\x03\x04\x05\x06 Source = \x07\x08\x09\x0a\x0b\x0c Type = 2054
MacAdapter def _decode… def _encode… Ethernet header MacAdapter MacAdapter UBInt16 Field(6) Field(6)
MacAdapter def _decode… def _encode… MacAddress MacAdapter Field(6) MacAddress MacAddress UBInt16 Ethernet header
MacAdapter def _decode… def _encode… MacAddress MacAdapter Field(6) Enum( IP = 0x0806, ARP = 0x0804) TypeEnum MacAddress MacAddress TypeEnum Ethernet header UBInt16 01001001001001… Ethernet header Dest = 01.02.03.04.05.06 Source = 07.08.09.0a.0b.0c Type = IP
PascalString UBInt8 Array( ) Field(1)
LengthValueAdapter def _decode… def _encode… LengthValue LengthValueAdapter <number> Array( ) Field(1) PascalString StringAdapter LengthValue PascalString8 PascalString PascalStringFoo PascalString UBInt8 Field(1)