wlanhcx2psk: Allow running without hcx input (just output all the generic
stuff).  Also makes the generic "weak passwords" optional (-w), in case
user *only* wants stuff actually derived from input data.
@@ -27,6 +27,7 @@ hcx_t *hcxdata = NULL;
bool stdoutflag = false;
bool fileflag = false;
+bool weakflag = false;
bool wpsflag = false;
bool eudateflag = false;
bool usdateflag = false;
@@ -1038,6 +1039,7 @@ printf("%s %s (C) %s ZeroBeat\n"
"-i <file> : input hccapx file\n"
"-o <file> : output plainkeys to file\n"
"-s : output plainkeys to stdout (pipe to hashcat)\n"
+ "-w : include generic weak passwords\n"
"-W : include complete wps keys\n"
"-D : include complete european dates\n"
"-d : include complete american dates\n"
@@ -1062,7 +1064,7 @@ eigenpfadname = strdupa(argv[0]);
eigenname = basename(eigenpfadname);
setbuf(stdout, NULL);
-while ((auswahl = getopt(argc, argv, "i:o:sWDdNhv")) != -1)
+while ((auswahl = getopt(argc, argv, "i:o:swWDdNhv")) != -1)
{
switch (auswahl)
{
@@ -1079,6 +1081,10 @@ while ((auswahl = getopt(argc, argv, "i:o:sWDdNhv")) != -1)
stdoutflag = true;
break;
+ case 'w':
+ weakflag = true;
+ break;
+
case 'W':
wpsflag = true;
break;
@@ -1106,6 +1112,8 @@ if(globalinit() == false)
exit(EXIT_FAILURE);
}
+if (hcxinname != NULL)
+ {
hcxorgrecords = readhccapx(hcxinname);
if(hcxorgrecords == 0)
@@ -1113,6 +1121,7 @@ if(hcxorgrecords == 0)
fprintf(stderr, "%ld records loaded\n", hcxorgrecords);
return EXIT_SUCCESS;
}
+ }
if(pskfilename != NULL)
{
@@ -1125,9 +1134,13 @@ if(pskfilename != NULL)
if((stdoutflag == true) || (fileflag == true))
{
+ if(weakflag == true)
keywriteweakpass();
+ if(hcxorgrecords > 0)
+ {
processbssid(hcxorgrecords);
processessid(hcxorgrecords);
+ }
if(wpsflag == true)
keywriteallwpskeys();
if(eudateflag == true)
