Extract data from a WPA packet @pkt with temporal key @tk
(pkt, tk)
| 322 | |
| 323 | |
| 324 | def parse_data_pkt(pkt, tk): |
| 325 | """Extract data from a WPA packet @pkt with temporal key @tk""" |
| 326 | TSC, TA, data = parse_TKIP_hdr(pkt) |
| 327 | TK = [orb(x) for x in tk] |
| 328 | |
| 329 | rc4_key = gen_TKIP_RC4_key(TSC, TA, TK) |
| 330 | return ARC4_decrypt(rc4_key, data) |
| 331 | |
| 332 | |
| 333 | class ICVError(Exception): |
no test coverage detected