Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

[PHP] Simple Google Code Downloader

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    Tools [PHP] Simple Google Code Downloader

    Boas minha gente,
    Escrevi este script simples que tem como função efetuar o download de arquivos via google code em massa.
    Bom para quem baixa diversos codes e tem a necessidade de fazer o mesmo em grandes proporções.

    Código PHP:
    <?php
    /*
    Simple Google code Downloader v1.0.
    All files been downloadedS! ;)
    -------------------------------------
    # Need curl lib
    Use: php google_code.php user

    Url of google codE:
    http://code.google.com/p/bugsec/
                               |
                               -> User
    Example:
    php google_code.php bugsec
    -------------------------------------
    Hugs for bug-secTeam members!
    2013

    By Rodrigo Nascimento a.k.a n4sss
    Greetx => Willian-Wigli - Chooko - B127Y - MiyaChung
    Damane-dz - Hackinho - Bug-sec-Team - GH-Members - H - DPU-Team - Roger - St4tus - Lck - thor.
    And all others friends!
     
    Contact: nstruct[noSpam]jabber[dot]org;
    Twitter: @n4sss

    #BOF_
    */

    set_time_limit(0);
    Class 
    google
    {
        public 
    $user;
            
        private function 
    cat_list($user)
        {
                
    $regex "#$user.googlecode.com/files/(.*?)\" onclick=\"#";
                
    $url "http://code.google.com/p/$user/downloads/list?num=500";
                
    $ch curl_init();
                
    curl_setopt($chCURLOPT_URL$url);
                
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
                
    $exec curl_exec($ch);
                
    preg_match_all($regex$exec$result);
                return 
    $result[1];
        }

        public function 
    download_files($content)
        {
            
    $time1 time();
            
    $total 0;
            foreach(
    $content as $download)
                {
                print 
    "Downloading => http://".$this->user.".googlecode.com/files/".$download."\n";
                
    $url  "http://".$this->user.".googlecode.com/files/$download";
                
    $path dirname(__FILE__) . "/".$this->user."/$download";
                
    $ch curl_init($url);
                
    curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
                
    $data curl_exec($ch);
                
    curl_close($ch);
                
    file_put_contents($path$data);
                
    $total++;
                }
                
    $time2 time();
                print 
    "[+]Elapsed time -> ".($time2-$time1)." seconds\n";
                print 
    "[+]All $total files writed to folder => $this->user\n";
                print 
    "[+]@n4sss\n";
        }
        
        public function 
    cat($user)
        {
                print 
    "[+] User selected: $user\n";
                
    $content self::cat_list($this->user);
                print 
    "[+] Files to download:".count($content)."\n";
                
    sleep(5);
                if(!
    is_dir("$user"))
                {
                print 
    "[+] Mkdir -> $user\n";
                print 
    "[+] Wait the download\n";
                
    mkdir("$user");
                
    self::download_files($content);
                }else{print 
    "[+] Wait the download\n";self::download_files($content);}
        }

    }    
        if(!@
    $argv[1])
        {
            print 
    "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n";
            print 
    "@   Simple google code downloader  @\n";
            print 
    "@           by n4sss               @\n";
            print 
    "@ Just 4 aux in the list download! @\n";
            print 
    "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n";
            print 
    "@=> Use: php google_code.php user    @\n";
            print 
    "@EXAMPLE: php google_code.php bugsec @\n";
            print 
    "@http://n4sss.blogspot.com.br        @\n";
            print 
    "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n";
            exit(
    0);
        }else
            {
            print 
    "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n";
            print 
    "@   Simple google code downloader  @\n";
            print 
    "@           by n4sss               @\n";
            print 
    "@ Just 4 aux in the list download! @\n";
            print 
    "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n";
            
    sleep(2);
            
    $magic = new google;
            
    $magic->user $argv[1];
            
    $magic->cat($magic->user);
            }
            
    //EOF_
    ?>
    Youtube:
    Apenas usuários registrados e ativados podem ver os links., Clique aqui para se cadastrar...

    []'s
    n4sss@m4g1cl4b~#$I
    just this.

  • Font Size
    #2
    Muito bom n4sss, mandou bem xP
    .

    - PHP & VB C0d3r.

    Nickguitar.dll@hotmail.com

    http://www.youtube.com/user/superskate56 <~ Hacking tuts =)

    Quando aprendemos a ouvir, também aprendemos a falar..
    Quando aprendemos a ler, também aprendemos a escrever.
    Então, quando aprendemos a usar um computador, por que não aprender a programa-lo ?


    I'm C0ding for $$$

    #~: Just $this :~#

    Comment

    X
    Working...
    X