Pueden bajar solo uno o hacer que el programa busque links de pastebin en una pagina y bajarlos a todos.
El codigo :
Código
#!usr/bin/perl #PasteBin Downloader 0.1 #Coded By Doddy H use LWP::UserAgent; 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 ) { } unless ( $ARGV[0] and $ARGV[1] ) { } else { if ( $ARGV[0] eq "-single" ) { download_this( $ARGV[1] ); } if ( $ARGV[0] eq "-page" ) { download_all( $ARGV[1] ); } } sub download_all { my $code = toma($page); my @links_all = repes( get_links($code) ); for my $page_down (@links_all) { download_this($page_down); } } sub download_this { my $titulo = ""; my $num = ""; my $code = toma($page); if ( $page =~ /http:\/\/(.*)\/(.*)/ ) { $num = $2; if ( $code =~ /<div class="paste_box_line1" title="(.*)">/ ) { $titulo = $1; if ( download( "http://pastebin.com/download.php?i=$num", $titulo . ".txt" ) ) { } else { } } } } sub download { if ( $nave->mirror( $_[0], $_[1] ) ) { if ( -f $_[1] ) { return true; } } } sub repes { my @limpio; foreach $test (@_) { } } sub toma { } sub get_links { $test = HTML::LinkExtor->new( \&agarrar )->parse( $_[0] ); sub agarrar { my ( $a, %b ) = @_; } } #The End ?