h-eibot / reaver-wps

Automatically exported from code.google.com/p/reaver-wps
0 stars 0 forks source link

[PATCH]Fix M7 oddity #426

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I got this odd behavior during a reaver session:

[+] Trying pin 73016854
[+] Sending EAPOL START request
[!] WARNING: Receive timeout occurred
[+] Sending EAPOL START request
[+] Received identity request
[+] Sending identity response
[+] Received M1 message
[+] Sending M2 message
[+] Received M3 message
[+] Sending M4 message
[+] Received M7 message
[+] Sending WSC NACK
[+] Sending WSC NACK
[+] Pin cracked in 125 seconds
[+] WPS PIN: '73016854'

The pin was incorrect and as a result no PSK or SSID. My guess is because of no 
M5 packet received. So I wrote a patch. Untested atm.

--- /root/reaver/src/exchange.c 2012-10-26 16:50:21.889444629 -0400
+++ /root/Desktop/exchange2.c   2012-10-26 16:49:31.109443263 -0400
@@ -132,6 +132,11 @@
                                 break;
            case M7:
                cprintf(VERBOSE, "[+] Received M7 message\n");
+               if(!m6_sent)
+               {
+                   tx_type = SEND_WSC_NACK;
+                   terminated = 1;
+               }
                /* Fall through */
            case DONE:
                if(get_key_status() == KEY2_WIP) 

Original issue reported on code.google.com by ros...@gmail.com on 26 Oct 2012 at 9:08