Skip to content

Commit

Permalink
EXIT_FAILURE if user add only interface option -i
Browse files Browse the repository at this point in the history
  • Loading branch information
ZerBea committed Jun 6, 2022
1 parent 1ba194f commit f97a7b4
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions hcxdumptool.c
Original file line number Diff line number Diff line change
Expand Up @@ -9414,19 +9414,25 @@ while((auswahl = getopt_long(argc, argv, short_options, long_options, &index)) !
}
}

if(infinityflag == true)
setbuf(stdout, NULL);
if(argc < 2)
{
owm1m2roguemax = 1000000;
attackstopcount = 1000000;
fprintf(stderr, "no option selected\nrun %s --help to get more information\n", (basename(argv[0])));
exit(EXIT_FAILURE);
}

setbuf(stdout, NULL);
if(argc < 2)
if((argc == 3) && (interfacename[0] != 0))
{
fprintf(stderr, "no option selected\n");
fprintf(stderr, "not enough options selected for an attack vector\nrun %s --help to get more information\n", (basename(argv[0])));
exit(EXIT_FAILURE);
}

if(infinityflag == true)
{
owm1m2roguemax = 1000000;
attackstopcount = 1000000;
}

if(interfacename[0] != 0) getphyifname();

if((rebootflag == true) && (poweroffflag == true))
Expand Down

0 comments on commit f97a7b4

Please sign in to comment.