Advertisement
Goddino

remove_rabbit.php

Feb 28th, 2020
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php
  2.     $testo = shell_exec("find /mnt/c/ -name 'desktop.ini'");
  3.     $file = fopen("result.txt", "w");
  4.     fwrite($file, $testo);
  5.     fclose($file);
  6.     $lettura = file("result.txt");
  7.     foreach ($lettura as $directory)
  8.     {
  9.         if(strpos(" ", $directory)
  10.             $directory = str_replace(" ", "\ ", $directory);
  11.         shell_exec("rm -f " . $directory);
  12.         echo "deleted " . $directory . "\n";
  13.     }
  14.     echo "\nRabbit eliminato\n";
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement