Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //error_reporting(1);
- error_reporting(E_ALL);
- ini_set('display_errors', TRUE);
- ini_set('display_startup_errors', TRUE);
- $argv = $_SERVER['argv'];
- $file_ls = trim($argv['1']);
- if ($file_ls == ''){
- echo "\LIMPADOR DE SITES\n---\n";
- echo "Uso: php ".trim($argv['0'])." lista.txt\n---\n";
- echo "* by Kevinho\n";
- exit(1);
- }
- echo "\LIMPADOR DE SITES\n---\n";
- echo "Uso: php ".trim($argv['0'])." lista.txt\n---\n";
- echo "* by Kevinho\n";
- ////////////////////////////////////////////////
- $h = fopen($file_ls, "r");
- $fp = fopen("tmp_sites.txt", "a");
- $i = 0;
- if ($h) {
- while (!feof($h)) {
- $urll = trim(fgets($h));
- if(strpos($urll, "option=")){
- $i++;
- $aux = explode("index.php", $urll);
- $url = $aux[0];
- //$scheme = parse_url($url, PHP_URL_SCHEME);// sem o ://
- //if($scheme == ''){$scheme = 'http';}
- //$host = parse_url($url, PHP_URL_HOST);
- //$path = parse_url($url, PHP_URL_PATH);
- //$url_final = $scheme . "://" . $host;
- $url_final = $url;
- fwrite($fp, $url_final."\n");
- echo "[$i] URL: ".$url_final."\n";
- }
- }
- fclose($h);
- }
- $cmd = system("sort tmp_sites.txt |uniq > OK_JOOM.txt");
- $cmd2 = system("wc -l OK_JOOM.txt");
- $cmd3 = system("rm -rf tmp_sites.txt");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement