Skip to content

Commit

Permalink
Message when handshake captured & config warning
Browse files Browse the repository at this point in the history
You'll now see when you captured a handshake.

More importantly, cracking handshakes required an accurate SSID. When in mana
mode we don't know what SSID the station tried to associate to yet. As such,
I've prevented a config with both enable_mana and mana_wpaout set in the
meantime.

Technically, by viewing the context, one could edit the capture file and put in
the right SSID, but that's going to lead to too many github issues. I'd rather
do it right.
  • Loading branch information
singe committed Jan 7, 2019
1 parent a03d486 commit f22f37a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hostapd/config_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2139,6 +2139,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
} else if (os_strcmp(buf, "enable_mana") == 0) {
int val = atoi(pos);
conf->enable_mana = (val != 0);
if (conf->mana_wpaout) {
wpa_printf(MSG_ERROR, "MANA: For now, you can't use mana mode with WPA/2 handshake capture. See the Wiki.");
return 1;
}
if (conf->enable_mana) {
wpa_printf(MSG_DEBUG, "MANA: Enabled");
}
Expand Down
1 change: 1 addition & 0 deletions src/ap/wpa_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,7 @@ void wpa_receive(struct wpa_authenticator *wpa_auth,
fwrite("\x00",1,1,hccapx);
}
fclose(hccapx);
wpa_printf(MSG_INFO, "MANA: Captured a WPA/2 handshake from: " MACSTR, MAC2STR(sm->addr));
}
}
//MANA End
Expand Down

0 comments on commit f22f37a

Please sign in to comment.