nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* |
2 | * coWPAtty - Brute-force dictionary attack against WPA-PSK. |
||
3 | * |
||
4 | * Copyright (c) 2004-2005, Joshua Wright <jwright@hasborg.com> |
||
5 | * |
||
6 | * $Id: utils.h,v 4.1 2007-11-03 20:28:39 jwright Exp $ |
||
7 | * |
||
8 | * This program is free software; you can redistribute it and/or modify |
||
9 | * it under the terms of the GNU General Public License version 2 as |
||
10 | * published by the Free Software Foundation. See COPYING for more |
||
11 | * details. |
||
12 | * |
||
13 | * coWPAtty is distributed in the hope that it will be useful, |
||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
16 | * GNU General Public License for more details. |
||
17 | */ |
||
18 | |||
19 | /* |
||
20 | * Significant code is graciously taken from the following: |
||
21 | * wpa_supplicant by Jouni Malinen. This tool would have been MUCH more |
||
22 | * difficult for me if not for this code. Thanks Jouni. |
||
23 | */ |
||
24 | |||
25 | /* Prototypes */ |
||
26 | void lamont_hdump(unsigned char *bp, unsigned int length); |
||
27 | char *printmac(unsigned char *mac); |
||
28 | int IsBlank(char *s); |
||
29 | int radiotap_offset(pcap_t *p, struct pcap_pkthdr *h); |
||
30 | |||
31 | |||
32 | #define __swab16(x) \ |
||
33 | ({ \ |
||
34 | uint16_t __x = (x); \ |
||
35 | ((uint16_t)( \ |
||
36 | (((uint16_t)(__x) & (uint16_t)0x00ffU) << 8) | \ |
||
37 | (((uint16_t)(__x) & (uint16_t)0xff00U) >> 8) )); \ |
||
38 | }) |
||
39 | |||
40 | #ifdef WORDS_BIGENDIAN |
||
41 | #warning "Compiling for big-endian" |
||
42 | #define le16_to_cpu(x) __swab16(x) |
||
43 | #else |
||
44 | #define le16_to_cpu(x) (x) |
||
45 | #endif |