mirror of
https://github.com/wiire-a/pixiewps.git
synced 2025-07-27 15:54:29 +02:00
Add option for output file
This commit is contained in:
parent
64ecc3e8c2
commit
622b086572
@ -65,6 +65,7 @@ Optional Arguments:
|
|||||||
-b, --e-bssid : Enrollee BSSID
|
-b, --e-bssid : Enrollee BSSID
|
||||||
-S, --dh-small : Small Diffie-Hellman keys (PKr not needed) [No]
|
-S, --dh-small : Small Diffie-Hellman keys (PKr not needed) [No]
|
||||||
-v, --verbosity : Verbosity level 1-3, 1 is quietest [3]
|
-v, --verbosity : Verbosity level 1-3, 1 is quietest [3]
|
||||||
|
-o, --output : Write output to file
|
||||||
|
|
||||||
-h : Display this usage screen
|
-h : Display this usage screen
|
||||||
--help : Verbose help and more usage examples
|
--help : Verbose help and more usage examples
|
||||||
|
@ -41,7 +41,7 @@ uint32_t ecos_rand_simple(uint32_t *seed);
|
|||||||
uint32_t ecos_rand_knuth(uint32_t *seed);
|
uint32_t ecos_rand_knuth(uint32_t *seed);
|
||||||
uint_fast8_t crack(struct global *g, unsigned int *pin);
|
uint_fast8_t crack(struct global *g, unsigned int *pin);
|
||||||
|
|
||||||
static const char *option_string = "e:r:s:z:a:n:m:b:Sfv:Vh?";
|
static const char *option_string = "e:r:s:z:a:n:m:b:Sfo:v:Vh?";
|
||||||
static const struct option long_options[] = {
|
static const struct option long_options[] = {
|
||||||
{ "pke", required_argument, 0, 'e' },
|
{ "pke", required_argument, 0, 'e' },
|
||||||
{ "pkr", required_argument, 0, 'r' },
|
{ "pkr", required_argument, 0, 'r' },
|
||||||
@ -53,6 +53,7 @@ static const struct option long_options[] = {
|
|||||||
{ "e-bssid", required_argument, 0, 'b' },
|
{ "e-bssid", required_argument, 0, 'b' },
|
||||||
{ "dh-small", no_argument, 0, 'S' },
|
{ "dh-small", no_argument, 0, 'S' },
|
||||||
{ "force", no_argument, 0, 'f' },
|
{ "force", no_argument, 0, 'f' },
|
||||||
|
{ "output", required_argument, 0, 'o' },
|
||||||
{ "verbosity", required_argument, 0, 'v' },
|
{ "verbosity", required_argument, 0, 'v' },
|
||||||
{ "version", no_argument, 0, 'V' },
|
{ "version", no_argument, 0, 'V' },
|
||||||
{ "help", no_argument, 0, 0 },
|
{ "help", no_argument, 0, 0 },
|
||||||
@ -167,6 +168,13 @@ memory_err:
|
|||||||
case 'f':
|
case 'f':
|
||||||
wps->bruteforce = 1;
|
wps->bruteforce = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'o':
|
||||||
|
if (!freopen(optarg, "w", stdout))
|
||||||
|
{
|
||||||
|
snprintf(wps->error, 256, "\n [!] Failed to open file for writing -- %s\n\n", optarg);
|
||||||
|
goto usage_err;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
if (get_int(optarg, &wps->verbosity) != 0 || wps->verbosity < 1 || wps->verbosity > 3) {
|
if (get_int(optarg, &wps->verbosity) != 0 || wps->verbosity < 1 || wps->verbosity > 3) {
|
||||||
snprintf(wps->error, 256, "\n [!] Bad verbosity level -- %s\n\n", optarg);
|
snprintf(wps->error, 256, "\n [!] Bad verbosity level -- %s\n\n", optarg);
|
||||||
|
@ -132,6 +132,7 @@ char usage[] =
|
|||||||
" -b, --e-bssid : Enrollee BSSID\n"
|
" -b, --e-bssid : Enrollee BSSID\n"
|
||||||
" -S, --dh-small : Small Diffie-Hellman keys (PKr not needed) [No]\n"
|
" -S, --dh-small : Small Diffie-Hellman keys (PKr not needed) [No]\n"
|
||||||
" -v, --verbosity : Verbosity level 1-3, 1 is quietest [3]\n"
|
" -v, --verbosity : Verbosity level 1-3, 1 is quietest [3]\n"
|
||||||
|
" -o, --output : Write output to file\n"
|
||||||
"\n"
|
"\n"
|
||||||
" -h : Display this usage screen\n"
|
" -h : Display this usage screen\n"
|
||||||
" --help : Verbose help and more usage examples\n"
|
" --help : Verbose help and more usage examples\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user