Exemplo n.º 1
0
 def setUp(self):
     # 802.11 Data Frame 
     #
     self.frame_orig='\x08\x49\x24\x00\x00\x21\x29\x68\x33\x5d\x00\x15\xaf\xe4\xf1\x0f\x00\x21\x29\x68\x33\x5b\xe0\x31\x1b\x13\x00\x20\x00\x00\x00\x00\x84\x7d\x6a\x30\x8c\x60\x7e\x3b\x22\xdc\x16\xc1\x4b\x28\xd3\x26\x76\x9d\x2e\x59\x96\x31\x3e\x01\x6f\x61\xa2\x59\xc8\xdc\xd3\xc4\xad\x7c\xcc\x32\xa8\x9f\xf6\x03\x02\xe1\xac\x1d\x1e\x02\x8a\xcd\x5b\x94\x20\x2d\xfc\x6e\x37\x40\x2e\x46\x17\x19\x0c\xc0\x34\x07\xae\xe7\x77\xaf\xf9\x9f\x41\x53'
     d = Dot11(self.frame_orig)
     
     self.assertEqual(d.get_type(),Dot11Types.DOT11_TYPE_DATA)
     self.assertEqual(d.get_subtype(),Dot11Types.DOT11_SUBTYPE_DATA)
     self.assertEqual(d.get_type_n_subtype(),Dot11Types.DOT11_TYPE_DATA_SUBTYPE_DATA)
     
     data = Dot11DataFrame(d.get_body_as_string())
     d.contains(data)
     
     self.wpa2_header = Dot11WPA2(data.body_string)
     data.contains(self.wpa2_header)
     
     self.wpa2_data = Dot11WPA2Data(self.wpa2_header.body_string)
     self.wpa2_header.contains(self.wpa2_data)
Exemplo n.º 2
0
 def setUp(self):
     # 802.11 Data Frame 
     #
     self.frame_orig=b'\x08\x42\x00\x00\xff\xff\xff\xff\xff\xff\x00\x21\x29\x68\x33\x5d\x00\x1b\xfc\x1e\xca\x40\xa0\x16\x02\x22\x5a\x60\x00\x00\x00\x00\xa2\x0e\x77\x36\xea\x90\x76\x0f\x7a\x9f\x6e\x6c\x78\xb9\xe0\x3e\xb4\x9d\x09\xca\xde\xef\x95\x58\x28\x97\x17\x46\x53\x43\x41\x2b\x2a\xc6\xbe\xe4\x59\x60\xf0\x17\x1d\x20\x8c\xca\x3c\x26\x0d\x5d\x6b\x10\x81\xbc\xc6\xba\x90\xa5\x77\x0e\x83\xd0\xd0\xb9\xdd\xbf\x80\xbf\x65\x17\xee\xc0\x3a\x52\x32\x34\x75\xac\x0c\xc2\xbb\x25\x28\x8f\x6a\xe6\x96\x7a\x53\x4a\x77\xcc\x2b\xe5\x9a\x9a\x73\xc2\x08\x4c\x42\x15\xe9\x26\xa0\xce\x70\x0e\x50\x9b\x2d\xa2\x6e\xcb\x92\x54\xc0\x6d\xbc\x13\xfe\x4d\xd8\x6b\x8c\x76\x98\x9a\x71\x4d\x51\xb1\xf5\x4f\xe2\x43\x1b\xfa\x6f\x5c\x98\x6a\x3a\x64\x4f\x50\xc4\x09\x7d\x10\x3f\xa2\x64\xd9\xad\x6e\x44\xe3\x84\x3d\x2b\x77\x11\xd8\x04\x9d\x9d\xd4\x32\x35\xe8\x3d\xeb\xd5\x9a\xde\xf3\xb5\x41\x67\x94\xf9\xb1\xe0\x7a\xea\x33\xb2\x00\xef\x6a\x2e\x6c\x3b\xea\x23\x49\x23\xc2\xca\x24\x53\xea\xc0\x7e\x8c\xcf\x73\xcb\x2d\x0c\x8e\xdb\x7b\x9e\x0a\x66\x81\x90'
     d = Dot11(self.frame_orig)
     
     self.assertEqual(d.get_type(),Dot11Types.DOT11_TYPE_DATA)
     self.assertEqual(d.get_subtype(),Dot11Types.DOT11_SUBTYPE_DATA)
     self.assertEqual(d.get_type_n_subtype(),Dot11Types.DOT11_TYPE_DATA_SUBTYPE_DATA)
     
     data = Dot11DataFrame(d.get_body_as_string())
     d.contains(data)
     
     self.wpa_header = Dot11WPA(data.body_string)
     data.contains(self.wpa_header)
     
     self.wpa_data = Dot11WPAData(self.wpa_header.body_string)
     self.wpa_header.contains(self.wpa_data)
Exemplo n.º 3
0
 def setUp(self):
     # 802.11 Data Frame 
     #
     self.frame_orig=b'\x08\x01\x30\x00\x00\x08\x54\xac\x2f\x85\x00\x23\x4d\x09\x86\xfe\x00\x08\x54\xac\x2f\x85\x40\x44\xaa\xaa\x03\x00\x00\x00\x08\x00\x45\x00\x00\x28\x72\x37\x40\x00\x80\x06\x6c\x22\xc0\xa8\x01\x02\xc3\x7a\x97\x51\xd7\xa0\x00\x50\xa5\xa5\xb1\xe0\x12\x1c\xa9\xe1\x50\x10\x4e\x75\x59\x74\x00\x00\xed\x13\x22\x91'
     
     d = Dot11(self.frame_orig)
     
     type = d.get_type()
     self.assertEqual(type,Dot11Types.DOT11_TYPE_DATA)
     
     subtype = d.get_subtype()
     self.assertEqual(subtype,Dot11Types.DOT11_SUBTYPE_DATA)
     
     typesubtype = d.get_type_n_subtype()
     self.assertEqual(typesubtype,Dot11Types.DOT11_TYPE_DATA_SUBTYPE_DATA)
         
     self.data = Dot11DataFrame(d.get_body_as_string())
         
     d.contains(self.data)
 def setUp(self):
     # 802.11 Data Frame
     #
     self.dot11frame = b'\x08\x41\x2c\x00\x00\x21\x29\x68\x33\x5d\x00\x18\xde\x7c\x37\x9f\x00\x21\x29\x68\x33\x5b\xf0\xd6\x0c\x31\x65\x00\x8d\x23\x81\xe9\x25\x1c\xb5\xaa\x83\xd2\xc7\x16\xba\x6e\xe1\x8e\x7d\x3a\x2c\x71\xc0\x0f\x6a\xb8\x2f\xbc\x54\xc4\xb0\x14\xab\x03\x11\x5e\xde\xcc\xab\x2b\x18\xeb\xeb\x25\x0f\x75\xeb\x6b\xf5\x7f\xd6\x5c\xb9\xe1\xb2\x6e\x50\xba\x4b\xb4\x8b\x9f\x34\x71\xda\x9e\xcf\x12\xcb\x8f\x36\x1b\x02\x53'
     
     d = Dot11(self.dot11frame, FCS_at_end = False)
     
     self.assertEqual(d.get_type(),Dot11Types.DOT11_TYPE_DATA)
     self.assertEqual(d.get_subtype(),Dot11Types.DOT11_SUBTYPE_DATA)
     self.assertEqual(d.get_type_n_subtype(),Dot11Types.DOT11_TYPE_DATA_SUBTYPE_DATA)
     
     data = Dot11DataFrame(d.get_body_as_string())
     d.contains(data)
     
     self.wep_header = Dot11WEP(data.body_string)
     data.contains(self.wep_header)
     
     self.wep_data = Dot11WEPData(self.wep_header.body_string)
     self.wep_header.contains(self.wep_data)
     
     self.km=KeyManager()
     self.km.add_key([0x00,0x21,0x29,0x68,0x33,0x5d],unhexlify(b'999cbb701ca2ef030e302dcc35'))