Script of removal from filed information files



  • How to change the violin so that the information I'm going to ask is removed.

    <?
    $RD = dirname(__FILE__);
    function delVirus($dir)
    {
        $m = glob($dir.'/*.js');
        $ml = sizeof($m);
        if($m)
            for($i = 0; $i < $ml; ++$i)
            {
                $t = file_get_contents($m[$i]);
                echo '['.$m[$i].']';
                if($s = strpos($t, "function OQWCY"))
                {
                    $t = substr($t, 0, $s);
                    $t = file_put_contents($m[$i], $t);
                    echo ' +';
                }
                echo '<br>';
            }
    
    if(!$handle = opendir($dir))
        break;
    while(false !== ($file = readdir($handle)))
    {
        if($file != '.' &amp;&amp; $file != '..' &amp;&amp; is_dir($dir.'/'.$file))
        {
            delVirus($dir.'/'.$file);
        }
    }
    

    }
    delVirus($RD);
    ?>



  • All I have to do is delete what I'm going to do is "tweet" the exact text from the beginning to the end.

    if($s = strpos($t, "function OQWCY"))
    {
        $t = substr($t, 0, $s);
        $t = file_put_contents($m[$i], $t);
        echo ' +';
    }
    

    Change.

    $t = str_replace('_toDelete_', '', $t);
    $t = file_put_contents($m[$i], $t);
    echo ' +';
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2