Upstream update, dropped patches directory
Mati Aharoni (Kali Linux Developer)
9 years ago
0 | reaver (1.5.2-1kali1) kali; urgency=low | |
1 | ||
2 | * Upstream update | |
3 | ||
4 | -- Mati Aharoni <[email protected]> Thu, 30 Apr 2015 04:09:40 -0400 | |
5 | ||
0 | 6 | reaver (1.4-2kali10) kali; urgency=low |
1 | 7 | |
2 | 8 | * Added verbosity patch |
0 | Index: reaver/src/exchange.c | |
1 | =================================================================== | |
2 | --- reaver.orig/src/exchange.c 2013-05-25 22:28:24.559921449 +0200 | |
3 | +++ reaver/src/exchange.c 2013-05-25 22:32:01.387918548 +0200 | |
4 | @@ -240,7 +240,7 @@ | |
5 | * Only treat the timeout as a NACK if this feature is enabled. | |
6 | */ | |
7 | if(get_timeout_is_nack() && | |
8 | - (last_msg == M3 || last_msg == M5)) | |
9 | + ((last_msg == M3 && (get_key_status() == KEY1_WIP)) || last_msg == M5)) | |
10 | { | |
11 | ret_val = KEY_REJECTED; | |
12 | } |
0 | Index: reaver/src/cracker.c | |
1 | =================================================================== | |
2 | --- reaver.orig/src/cracker.c 2013-05-25 22:23:44.971925189 +0200 | |
3 | +++ reaver/src/cracker.c 2013-05-25 22:41:17.059911113 +0200 | |
4 | @@ -285,18 +285,65 @@ | |
5 | } | |
6 | } | |
7 | ||
8 | +char *get_max_time_remaining(int average, int attempts_remaining) | |
9 | +{ | |
10 | + char *max_time, hours[8], minutes[3], seconds[3]; | |
11 | + int max_hours = 0, max_minutes = 0, max_seconds = 0; | |
12 | + | |
13 | + max_time = malloc(16); | |
14 | + | |
15 | + if(!max_time) | |
16 | + exit(-1); | |
17 | + | |
18 | + if(average) | |
19 | + { | |
20 | + max_seconds = attempts_remaining * average; | |
21 | + if(max_seconds > 60) | |
22 | + { | |
23 | + max_minutes = max_seconds / 60; | |
24 | + max_seconds -= max_minutes * 60; | |
25 | + } | |
26 | + if(max_minutes > 60) | |
27 | + { | |
28 | + max_hours = max_minutes / 60; | |
29 | + max_minutes -= max_hours * 60; | |
30 | + } | |
31 | + | |
32 | + if(max_seconds < 0 || max_minutes < 0 || max_hours < 0) | |
33 | + { | |
34 | + free(max_time); | |
35 | + return NULL; | |
36 | + } | |
37 | + | |
38 | + sprintf(hours, "%d", max_hours); | |
39 | + sprintf(minutes, "%s%d", max_minutes > 9 ? "" : "0", max_minutes); | |
40 | + sprintf(seconds, "%s%d", max_seconds > 9 ? "" : "0", max_seconds); | |
41 | + | |
42 | + sprintf(max_time, "%s:%s:%s", hours, minutes, seconds); | |
43 | + } | |
44 | + else | |
45 | + { | |
46 | + free(max_time); | |
47 | + return NULL; | |
48 | + } | |
49 | + | |
50 | + return max_time; | |
51 | +} | |
52 | + | |
53 | /* Displays the status and rate of cracking */ | |
54 | void display_status(float pin_count, time_t start_time) | |
55 | { | |
56 | float percentage = 0; | |
57 | int attempts = 0, average = 0; | |
58 | + int attempts_remaining = 0; | |
59 | time_t now = 0, diff = 0; | |
60 | struct tm *tm_p = NULL; | |
61 | - char time_s[256] = { 0 }; | |
62 | + char time_s[256] = { 0 }, *max_time; | |
63 | ||
64 | if(get_key_status() == KEY1_WIP) | |
65 | { | |
66 | attempts = get_p1_index() + get_p2_index(); | |
67 | + attempts_remaining = 11000 - attempts; | |
68 | } | |
69 | /* | |
70 | * If we've found the first half of the key, then the entire key1 keyspace | |
71 | @@ -305,10 +352,12 @@ | |
72 | else if(get_key_status() == KEY2_WIP) | |
73 | { | |
74 | attempts = P1_SIZE + get_p2_index(); | |
75 | + attempts_remaining = 11000 - attempts; | |
76 | } | |
77 | else if(get_key_status() == KEY_DONE) | |
78 | { | |
79 | attempts = P1_SIZE + P2_SIZE; | |
80 | + attempts_remaining = 0; | |
81 | } | |
82 | ||
83 | percentage = (float) (((float) attempts / (P1_SIZE + P2_SIZE)) * 100); | |
84 | @@ -335,7 +384,12 @@ | |
85 | average = 0; | |
86 | } | |
87 | ||
88 | + max_time = get_max_time_remaining(average, attempts_remaining); | |
89 | + | |
90 | cprintf(INFO, "[+] %.2f%% complete @ %s (%d seconds/pin)\n", percentage, time_s, average); | |
91 | + cprintf(INFO, "[+] Max time remaining at this rate: %s (%d pins left to try)\n", max_time ? max_time : "(undetermined)", attempts_remaining); | |
92 | + | |
93 | + free(max_time); | |
94 | ||
95 | return; | |
96 | } |
0 | Index: src/wps/wps_registrar.c | |
1 | =================================================================== | |
2 | --- reaver/src/wps/wps_registrar.c (revision 119) | |
3 | +++ reaver/src/wps/wps_registrar.c (working copy) | |
4 | @@ -1695,6 +1695,16 @@ | |
5 | wpa_hexdump(MSG_DEBUG, "WPS: Enrollee Nonce", | |
6 | wps->nonce_e, WPS_NONCE_LEN); | |
7 | ||
8 | + printf("[P] E-Nonce: "); | |
9 | + int pixiecnt = 0; | |
10 | + for (; pixiecnt < WPS_NONCE_LEN; pixiecnt++) { | |
11 | + printf("%02x", wps->nonce_e[pixiecnt]); | |
12 | + if (pixiecnt != WPS_NONCE_LEN - 1) { | |
13 | + printf(":"); | |
14 | + } | |
15 | + } | |
16 | + printf("\n"); | |
17 | + | |
18 | return 0; | |
19 | } | |
20 | ||
21 | @@ -1753,6 +1763,16 @@ | |
22 | os_memcpy(wps->peer_hash1, e_hash1, WPS_HASH_LEN); | |
23 | wpa_hexdump(MSG_DEBUG, "WPS: E-Hash1", wps->peer_hash1, WPS_HASH_LEN); | |
24 | ||
25 | + printf("[P] E-Hash1: "); | |
26 | + int pixiecnt = 0; | |
27 | + for (; pixiecnt < WPS_HASH_LEN; pixiecnt++) { | |
28 | + printf("%02x", wps->peer_hash1[pixiecnt]); | |
29 | + if (pixiecnt != WPS_HASH_LEN - 1) { | |
30 | + printf(":"); | |
31 | + } | |
32 | + } | |
33 | + printf("\n"); | |
34 | + | |
35 | return 0; | |
36 | } | |
37 | ||
38 | @@ -1767,6 +1787,16 @@ | |
39 | os_memcpy(wps->peer_hash2, e_hash2, WPS_HASH_LEN); | |
40 | wpa_hexdump(MSG_DEBUG, "WPS: E-Hash2", wps->peer_hash2, WPS_HASH_LEN); | |
41 | ||
42 | + printf("[P] E-Hash2: "); | |
43 | + int pixiecnt = 0; | |
44 | + for (; pixiecnt < WPS_HASH_LEN; pixiecnt++) { | |
45 | + printf("%02x", wps->peer_hash2[pixiecnt]); | |
46 | + if (pixiecnt != WPS_HASH_LEN - 1) { | |
47 | + printf(":"); | |
48 | + } | |
49 | + } | |
50 | + printf("\n"); | |
51 | + | |
52 | return 0; | |
53 | } | |
54 | ||
55 | @@ -1899,6 +1929,16 @@ | |
56 | if (wps->dh_pubkey_e == NULL) | |
57 | return -1; | |
58 | ||
59 | + printf("[P] PKE: "); | |
60 | + int pixiecnt = 0; | |
61 | + for (; pixiecnt < 192; pixiecnt++) { | |
62 | + printf("%02x", pk[pixiecnt]); | |
63 | + if (pixiecnt != 191) { | |
64 | + printf(":"); | |
65 | + } | |
66 | + } | |
67 | + printf("\n"); | |
68 | + | |
69 | return 0; | |
70 | } | |
71 | ||
72 | Index: src/wps/wps_dev_attr.c | |
73 | =================================================================== | |
74 | --- reaver/src/wps/wps_dev_attr.c (revision 119) | |
75 | +++ reaver/src/wps/wps_dev_attr.c (working copy) | |
76 | @@ -186,6 +186,13 @@ | |
77 | ||
78 | wpa_hexdump_ascii(MSG_DEBUG, "WPS: Manufacturer", str, str_len); | |
79 | ||
80 | + printf("[P] WPS Manufacturer: "); | |
81 | + int pixiecnt = 0; | |
82 | + for (; pixiecnt < str_len; pixiecnt++) { | |
83 | + printf("%c", (char *) str[pixiecnt]); | |
84 | + } | |
85 | + printf("\n"); | |
86 | + | |
87 | os_free(dev->manufacturer); | |
88 | dev->manufacturer = os_malloc(str_len + 1); | |
89 | if (dev->manufacturer == NULL) | |
90 | @@ -228,6 +235,13 @@ | |
91 | ||
92 | wpa_hexdump_ascii(MSG_DEBUG, "WPS: Model Number", str, str_len); | |
93 | ||
94 | + printf("[P] WPS Model Number: "); | |
95 | + int pixiecnt = 0; | |
96 | + for (; pixiecnt < str_len; pixiecnt++) { | |
97 | + printf("%c", (char *) str[pixiecnt]); | |
98 | + } | |
99 | + printf("\n"); | |
100 | + | |
101 | os_free(dev->model_number); | |
102 | dev->model_number = os_malloc(str_len + 1); | |
103 | if (dev->model_number == NULL) | |
104 | Index: src/wps/wps_common.c | |
105 | =================================================================== | |
106 | --- reaver/src/wps/wps_common.c (revision 119) | |
107 | +++ reaver/src/wps/wps_common.c (working copy) | |
108 | @@ -126,6 +126,16 @@ | |
109 | wps->keywrapkey, WPS_KEYWRAPKEY_LEN); | |
110 | wpa_hexdump_key(MSG_DEBUG, "WPS: EMSK", wps->emsk, WPS_EMSK_LEN); | |
111 | ||
112 | + printf("[P] AuthKey: "); | |
113 | + int pixiecnt = 0; | |
114 | + for (; pixiecnt < WPS_AUTHKEY_LEN; pixiecnt++) { | |
115 | + printf("%02x", wps->authkey[pixiecnt]); | |
116 | + if (pixiecnt != WPS_AUTHKEY_LEN - 1) { | |
117 | + printf(":"); | |
118 | + } | |
119 | + } | |
120 | + printf("\n"); | |
121 | + | |
122 | return 0; | |
123 | } | |
124 |
0 | Index: reaver/src/exchange.c | |
1 | =================================================================== | |
2 | --- reaver.orig/src/exchange.c 2013-03-19 06:29:10.015904570 -0400 | |
3 | +++ reaver/src/exchange.c 2013-03-19 06:30:35.350152557 -0400 | |
4 | @@ -132,6 +132,11 @@ | |
5 | break; | |
6 | case M7: | |
7 | cprintf(VERBOSE, "[+] Received M7 message\n"); | |
8 | + if(!m6_sent) | |
9 | + { | |
10 | + tx_type = SEND_WSC_NACK; | |
11 | + terminated = 1; | |
12 | + } | |
13 | /* Fall through */ | |
14 | case DONE: | |
15 | if(get_key_status() == KEY2_WIP) |