added ratio percent value to --check_injection
@@ -5799,6 +5799,7 @@ static int fdnum;
static fd_set readfds;
static uint64_t injectionhit;
static uint64_t injectioncount;
+static uint64_t injectionratio;
static scanlist_t *zeiger;
static struct timespec tsfd;
@@ -5885,7 +5886,17 @@ for(zeiger = scanlist; zeiger < scanlist +SCANLIST_MAX; zeiger++)
injectionhit += zeiger->counthit;
injectioncount += zeiger->count;
}
-if(injectionhit != 0) printf("packet injection is working!\nratio: %" PRIu64 " to %" PRIu64" \n", injectioncount, injectionhit);
+if(injectionhit > 0)
+ {
+ injectionratio = (injectionhit *100) /injectioncount;
+ printf("packet injection is working!\nratio: %" PRIu64 "%% (count: %" PRIu64 " hit: %" PRIu64 ")", injectionratio, injectioncount, injectionhit);
+ if(injectionratio < 25) printf(" your ratio is poor - improve your antenna and get closer to the target\n");
+ if((injectionratio >= 25) && (injectionratio < 50)) printf(" your ratio is average, but there is still room for improvement\n");
+ if((injectionratio >= 50) && (injectionratio < 75)) printf(" your ratio is good\n");
+ if((injectionratio >= 75) && (injectionratio < 90)) printf(" your ratio is excellent, let's ride\n");
+ if(injectionratio > 90) printf(" ratio is huge - say kids what time is it: It's showtime\n");
+
+ }
else printf("warning: no PROBERESPONSE received - packet injection is probably not working!\n");
globalclose();
return;
