Added contributing message

This commit is contained in:
wiire-a 2017-11-26 12:42:27 +01:00
parent 73a884fbd3
commit 0c9f51e171
2 changed files with 15 additions and 0 deletions

View File

@ -1409,6 +1409,19 @@ usage_err:
free(wps->warning);
}
if (found_p_mode == NONE) {
if ((!memcmp(wps->pke, wps_rtl_pke, WPS_PKEY_LEN) &&
((wps->e_nonce[0] & 0x80) || (wps->e_nonce[4] & 0x80) || (wps->e_nonce[8] & 0x80) || (wps->e_nonce[12] & 0x80))) ||
(!memcmp(wps->e_nonce, "\x00\x00", 2) && !memcmp(wps->e_nonce + 4, "\x00\x00", 2)) ||
(!memcmp(wps->e_nonce + 2, "\x00\x00", 2) && !memcmp(wps->e_nonce + 6, "\x00\x00", 2)) ||
(wps->e_nonce[0] == 0 && wps->e_nonce[4] == 0 && wps->e_nonce[8] == 0 && wps->e_nonce[12] == 0) ||
(wps->e_nonce[3] == 0 && wps->e_nonce[7] == 0 && wps->e_nonce[11] == 0 && wps->e_nonce[15] == 0))
printf(" " STR_CONTRIBUTE "\n\n");
}
else if (found_p_mode == ECOS_SIMPLE || found_p_mode == ECOS_SIMPLEST || found_p_mode == ECOS_KNUTH) {
printf(" " STR_CONTRIBUTE "\n\n");
}
free(wps->pke);
free(wps->pkr);
free(wps->e_hash1);

View File

@ -246,6 +246,8 @@ char v_usage[] =
" [?] pixiewps -e <pke> -r <pkr> -n <e-nonce> -m <r-nonce> -b <e-bssid> -7 <enc7> -5 <enc5> -s <e-hash1> -z <e-hash2> --mode 3\n"
"\n";
#define STR_CONTRIBUTE "[@] Looks like you have some interesting data! Please consider contributing with your data to improve pixiewps. Follow the instructions on http://0x0.st/tm - Thank you!"
/* One digit comma separated number parsing */
static inline uint_fast8_t parse_mode(char *list, uint_fast8_t *dst, const uint8_t max_digit)
{