| 693 | return wpa2_data |
| 694 | |
| 695 | class LLCDecoder(Decoder): |
| 696 | def __init__(self): |
| 697 | pass |
| 698 | |
| 699 | def decode(self, aBuffer): |
| 700 | d = dot11.LLC(aBuffer) |
| 701 | self.set_decoded_protocol( d ) |
| 702 | |
| 703 | if d.get_DSAP()==dot11.SAPTypes.SNAP: |
| 704 | if d.get_SSAP()==dot11.SAPTypes.SNAP: |
| 705 | if d.get_control()==dot11.LLC.DLC_UNNUMBERED_FRAMES: |
| 706 | snap_decoder = SNAPDecoder() |
| 707 | packet = snap_decoder.decode(d.body_string) |
| 708 | d.contains(packet) |
| 709 | return d |
| 710 | |
| 711 | # Only SNAP is implemented |
| 712 | data_decoder = DataDecoder() |
| 713 | packet = data_decoder.decode(d.body_string) |
| 714 | d.contains(packet) |
| 715 | return d |
| 716 | |
| 717 | class SNAPDecoder(Decoder): |
| 718 | def __init__(self): |