mirror of
https://github.com/hak5/nano-tetra-packages-community.git
synced 2025-10-29 16:59:28 +00:00
78 lines
2.0 KiB
Diff
78 lines
2.0 KiB
Diff
--- a/src/besside-ng.c 2014-07-11 19:24:03.000000000 -0700
|
|
+++ b/src/besside-ng.c 2014-12-15 09:06:29.702175482 -0800
|
|
@@ -1178,6 +1178,9 @@
|
|
if (!_conf.cf_do_wep && n->n_crypto == CRYPTO_WEP)
|
|
return 0;
|
|
|
|
+ if (!_conf.cf_do_wpa && n->n_crypto == CRYPTO_WPA)
|
|
+ return 0;
|
|
+
|
|
return 1;
|
|
}
|
|
|
|
@@ -3148,6 +3151,9 @@
|
|
" -W : WPA only\n"
|
|
" -v : verbose, -vv for more, etc.\n"
|
|
" -h : This help screen\n"
|
|
+ " -w : WEP only\n"
|
|
+ " -C <num> : Start WEP cracking at <num>\n"
|
|
+ " ^+ Default 5000\n"
|
|
"\n",
|
|
getVersion("Besside-ng", _MAJ, _MIN, _SUB_MIN, _REVISION, _BETA, _RC),
|
|
prog);
|
|
@@ -3165,14 +3171,53 @@
|
|
|
|
init_conf();
|
|
|
|
- while ((ch = getopt(argc, argv, "hb:vWs:c:p:R:")) != -1) {
|
|
+ while ((ch = getopt(argc, argv, "hb:vWws:c:p:R:C:")) != -1) {
|
|
switch (ch) {
|
|
case 's':
|
|
_conf.cf_wpa_server = optarg;
|
|
break;
|
|
|
|
case 'W':
|
|
+ if (_conf.cf_do_wpa != 0 )
|
|
+ {
|
|
_conf.cf_do_wep = 0;
|
|
+ }
|
|
+
|
|
+ else {
|
|
+ printf("ERROR :Please either WEP only or WPA only, but not both.\n");
|
|
+ printf(" :If you desire to scan both WEP & WPA, dont use either -w or -W.\n");
|
|
+ exit(1);
|
|
+ }
|
|
+
|
|
+ break;
|
|
+
|
|
+ case 'C':
|
|
+ // Used to set the ammount of iv's required to start cracking WEP key
|
|
+
|
|
+
|
|
+ _conf.cf_crack_int = (int) atoi(optarg);
|
|
+
|
|
+ // Check to make sure its not a null or negative number, if it is, then abort
|
|
+ if ( (_conf.cf_crack_int) <= 0 )
|
|
+ {
|
|
+ printf("ERROR: Please enter a value of 1 or higher for -C.\n");
|
|
+ exit(1);
|
|
+ }
|
|
+
|
|
+ break;
|
|
+
|
|
+ case 'w':
|
|
+ // Used to only scan for WEP networks
|
|
+ if (_conf.cf_do_wep != 0 )
|
|
+ {
|
|
+ _conf.cf_do_wpa = 0;
|
|
+ }
|
|
+ else {
|
|
+ printf("ERROR :Please either WEP only or WPA only, but not both.\n");
|
|
+ printf(" :If you desire to scan both WEP & WPA, dont use either -w or -W.\n");
|
|
+ exit(1);
|
|
+ }
|
|
+
|
|
break;
|
|
|
|
case 'p':
|