mirror of
https://github.com/wiire-a/pixiewps.git
synced 2025-07-27 15:54:29 +02:00
fix display of psk for null pin
This commit is contained in:
parent
189a51b6fd
commit
cf25128e28
@ -1507,6 +1507,7 @@ static int crack_first_half(struct global *wps, char *pin, const uint8_t *es1_ov
|
|||||||
const uint8_t *es1 = es1_override ? es1_override : wps->e_s1;
|
const uint8_t *es1 = es1_override ? es1_override : wps->e_s1;
|
||||||
|
|
||||||
if (check_empty_pin_half(es1, wps, wps->e_hash1)) {
|
if (check_empty_pin_half(es1, wps, wps->e_hash1)) {
|
||||||
|
memcpy(wps->psk1, wps->empty_psk, WPS_HASH_LEN);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1528,8 +1529,10 @@ static int crack_first_half(struct global *wps, char *pin, const uint8_t *es1_ov
|
|||||||
/* returns non-zero if pin found, -1 if empty pin found, 0 if not found */
|
/* returns non-zero if pin found, -1 if empty pin found, 0 if not found */
|
||||||
static int crack_second_half(struct global *wps, char *pin)
|
static int crack_second_half(struct global *wps, char *pin)
|
||||||
{
|
{
|
||||||
if (!pin[0] && check_empty_pin_half(wps->e_s2, wps, wps->e_hash2))
|
if (!pin[0] && check_empty_pin_half(wps->e_s2, wps, wps->e_hash2)) {
|
||||||
|
memcpy(wps->psk2, wps->empty_psk, WPS_HASH_LEN);
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned second_half, first_half = atoi(pin);
|
unsigned second_half, first_half = atoi(pin);
|
||||||
char *s_pin = pin + strlen(pin);
|
char *s_pin = pin + strlen(pin);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user