1
  1. Этот сайт использует файлы cookie. Продолжая пользоваться данным сайтом, Вы соглашаетесь на использование нами Ваших файлов cookie. Узнать больше.
Приветствуем вас,Гость, на форуме IFUD.WS. Обязательно рекомендуется к прочтению правила форума http://ifud.ws/threads/obnovleno-pravila-foruma.7759

[Perl] PasteBin Downloader 0.1

Тема в разделе "Исходные коды", создана пользователем hisg, 6 июн 2015.

  1. TopicStarter Overlay
    hisg

    hisg

    Регистрация:
    6 июн 2015
    Сообщения:
    22
    Симпатии:
    1
    Код:
    #!usr/bin/perl
    #PasteBin Downloader 0.1
    #Coded By Doddy H
    
    use LWP::UserAgent;
    use URI::Split You are not allowed to view links.
     Register or Login(uri_split);
    use HTML::LinkExtor;
    
    my $nave = LWP::UserAgent->new;
    $nave->agent(
    "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
    );
    $nave->timeout(10);
    
    my $se = "downloads_pastebin";
    
    unless ( -d $se ) {
        You are not allowed to view links.
     Register or Login( $se, "777" );
    }
    
    You are not allowed to view links.
     Register or Login $se;
    
    You are not allowed to view links.
     Register or Login "\n-- == PasteBin Downloader 0.1 == --\n";
    
    unless ( $ARGV[0] and $ARGV[1] ) {
        You are not allowed to view links.
     Register or Login "\n[+] Sintax : $0 < -single / -page > <url>\n";
    }
    else {
        You are not allowed to view links.
     Register or Login "\n[+] Searching ...\n";
        if ( $ARGV[0] eq "-single" ) {
            download_this( $ARGV[1] );
        }
        if ( $ARGV[0] eq "-page" ) {
            download_all( $ARGV[1] );
        }
    }
    
    You are not allowed to view links.
     Register or Login "\n(C) Doddy Hackman 2013\n";
    
    sub download_all {
    
        my $page = You are not allowed to view links.
     Register or Login;
    
        my $code = toma($page);
        You are not allowed to view links.
     Register or Login $code;
    
        my @links_all = repes( get_links($code) );
    
        for my $page_down (@links_all) {
            download_this($page_down);
        }
    
    }
    
    sub download_this {
    
        my $page   = You are not allowed to view links.
     Register or Login;
        my $titulo = "";
        my $num    = "";
    
        You are not allowed to view links.
     Register or Login "\n[+] Checking : $page\n";
    
        my $code = toma($page);
    
        if ( $page =~ /http:\/\/(.*)\/(.*)/ ) {
            $num = $2;
    
            if ( $code =~ /<div class="paste_box_line1" title="(.*)">/ ) {
                $titulo = $1;
    
                You are not allowed to view links.
     Register or Login "[+] Downloading : http://pastebin.com/download.php?i=$num\n";
    
                if (
                    download(
                        "http://pastebin.com/download.php?i=$num",
                        $titulo . ".txt"
                    )
                  )
                {
                    You are not allowed to view links.
     Register or Login "[+] File Downloaded !\n";
                }
                else {
                    You are not allowed to view links.
     Register or Login "[-] Error\n";
                }
    
            }
        }
    
    }
    
    sub download {
    
        if ( $nave->mirror( $_[0], $_[1] ) ) {
            if ( -f $_[1] ) {
                You are not allowed to view links.
     Register or Login true;
            }
        }
    }
    
    sub repes {
        my @limpio;
        foreach $test (@_) {
            You are not allowed to view links.
     Register or Login @limpio, $test unless $repe{$test}++;
        }
        You are not allowed to view links.
     Register or Login @limpio;
    }
    
    sub toma {
        You are not allowed to view links.
     Register or Login $nave->get( $_[0] )->content;
    }
    
    sub get_links {
    
        $test = HTML::LinkExtor->new( \&agarrar )->parse( $_[0] );
        You are not allowed to view links.
     Register or Login @links;
    
        sub agarrar {
            my ( $a, %b ) = @_;
            You are not allowed to view links.
     Register or Login( @links, You are not allowed to view links.
     Register or Login %b );
        }
    }
    
    #The End ?
     
    Метки:

Поделиться этой страницей

Загрузка...