elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado:


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Perl] PirateBay Manager 0.3
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] PirateBay Manager 0.3  (Leído 2,320 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl] PirateBay Manager 0.3
« en: 23 Diciembre 2013, 00:27 am »

Un simple script para usar en Windows para bajar torrents desde la famosa pagina llamada PirateBay.

El codigo.

Código
  1. #!usr/bin/perl
  2. #PirateBay Manager 0.3
  3. #(C) Doddy Hackman 2013
  4.  
  5. use LWP::UserAgent;
  6. use Time::HiRes "usleep";
  7.  
  8. my $nave = LWP::UserAgent->new;
  9. $nave->agent(
  10. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
  11. );
  12.  
  13. my $requisito = "C:/Archivos de programa/uTorrent/uTorrent.exe";
  14.  
  15. head();
  16.  
  17. print "[+] Write the search : ";
  18. chomp( my $busqueda = <stdin> );
  19.  
  20. $busqueda =~ s/ /%20/;
  21.  
  22. print "\n[+] Searching ...";
  23.  
  24. my $code = toma( "http://thepiratebay.se/search/" . $busqueda . "/0/99/0" );
  25.  
  26. my @links;
  27. $contador = -1;
  28.  
  29. while ( $code =~
  30. /(.*?)class="detLink" title="Details for (.*?)">(.*?)<a href="magnet(.*?)" title="Download this torrent using magnet"(.*?)<font class="detDesc">(.*?)<\/font>(.*?)<td align="right">(.*?)<\/td>(.*?)<td align="right">(.*?)<\/td>(.*?)/migs
  31.  )
  32. {
  33.  
  34.    my $nombre         = $2;
  35.    my $link_torrent   = magnet . $4;
  36.    my $limpiando_data = $6;
  37.    my $data;
  38.    my $seeders  = $8;
  39.    my $leechers = $10;
  40.  
  41.    if ( $limpiando_data =~ /(.*), ULed by </ ) {
  42.        $limpiando_data_2 = $1;
  43.        $limpiando_data_2 =~ s/&nbsp;/ /migs;
  44.        $data = $limpiando_data_2;
  45.    }
  46.  
  47.    $contador++;
  48.  
  49.    print "\n\n[+] ID : " . $contador;
  50.    print "\n[+] Name : " . $nombre;
  51.    push( @links, $link_torrent );
  52.    print "\n[+] Data : " . $data . ", Seeders $seeders, Leechers $leechers";
  53.  
  54. }
  55.  
  56. print "\n\n[+] ID to download : ";
  57. chomp( my $id_to = <stdin> );
  58.  
  59. print "\n[+] Executed !\n";
  60.  
  61. system( $requisito, $links[$id_to] );
  62.  
  63. copyright();
  64.  
  65. ## Functions
  66.  
  67. sub head {
  68.  
  69.    my @logo = (
  70.        "#=============================================#", "\n",
  71.        "#           PirateBay Manager 0.3             #", "\n",
  72.        "#---------------------------------------------#", "\n",
  73.        "# Written By Doddy H                          #", "\n",
  74.        "# Email: lepuke[at]hotmail[com]               #", "\n",
  75.        "# Website: doddyhackman.webcindario.com       #", "\n",
  76.        "#---------------------------------------------#", "\n",
  77.        "# The End ?                                   #", "\n",
  78.        "#=============================================#", "\n"
  79.    );
  80.  
  81.    print "\n";
  82.  
  83.    marquesina(@logo);
  84.  
  85.    print "\n\n";
  86.  
  87. }
  88.  
  89. sub copyright {
  90.  
  91.    my @fin = ("-- == (C) Doddy Hackman 2013 == --");
  92.  
  93.    print "\n\n";
  94.    marquesina(@fin);
  95.    print "\n\n";
  96.  
  97.    <stdin>;
  98.  
  99.    exit(1);
  100.  
  101. }
  102.  
  103. sub marquesina {
  104.  
  105.    #Effect based in the exploits by Jafer Al Zidjali
  106.  
  107.    my @logo = @_;
  108.  
  109.    my $car = "|";
  110.  
  111.    for my $uno (@logo) {
  112.        for my $dos ( split //, $uno ) {
  113.  
  114.            $|++;
  115.  
  116.            if ( $car eq "|" ) {
  117.                mostrar( "\b" . $dos . $car, "/" );
  118.            }
  119.            elsif ( $car eq "/" ) {
  120.                mostrar( "\b" . $dos . $car, "-" );
  121.            }
  122.            elsif ( $car eq "-" ) {
  123.                mostrar( "\b" . $dos . $car, "\\" );
  124.            }
  125.            else {
  126.                mostrar( "\b" . $dos . $car, "|" );
  127.            }
  128.            usleep(40_000);
  129.        }
  130.        print "\b ";
  131.    }
  132.  
  133.    sub mostrar {
  134.        print $_[0];
  135.        $car = $_[1];
  136.    }
  137.  
  138. }
  139.  
  140. sub toma {
  141.    return $nave->get( $_[0] )->content;
  142. }
  143.  
  144. #The End ?
  145.  

Ejemplo de uso.

Código:
C:\Documents and Settings\Doddy\Escritorio\Warfactory VIII>piratebay.pl
 
#=============================================#
#           PirateBay Manager 0.3             #
#---------------------------------------------#
# Written By Doddy H                          #
# Email: lepuke[at]hotmail[com]               #
# Website: doddyhackman.webcindario.com       #
#---------------------------------------------#
# The End ?                                   #
#=============================================#
 

[+] Write the search : batman

[+] Searching ...
 
[+] ID : 0
[+] Name : Batman and Robin v2 25 (2014)(2 cvrs)(1440+2048px-HD)(BrightEyes
[+] Data : Uploaded 11-23 03:43, Size 89.67 MiB, Seeders 24, Leechers 5
 
[+] ID : 1
[+] Name : Batman '66 022 (2013) (digital) (Son of Ultron-Empire) (- Nem -)
[+] Data : Uploaded 11-27 14:25, Size 40.39 MiB, Seeders 25, Leechers 1
 
[+] ID : 2
[+] Name : Batman O Retorno (1992) DVDRip Dublado Repostagem
[+] Data : Uploaded 11-25 20:58, Size 811.15 MiB, Seeders 0, Leechers 5
 
[+] ID : 3
[+] Name : Batman O Retorno (1992) DVDRip Dublado By Eliasjustino
[+] Data : Uploaded 11-25 19:10, Size 811.15 MiB, Seeders 1, Leechers 0
 
[+] ID : 4
[+] Name : BATMAN - LI'L GOTHAM 002 (2013) (Print) (c2c) (GreenManGroup-DCP
[+] Data : Uploaded 11-25 16:10, Size 37.15 MiB, Seeders 10, Leechers 2
 
[+] ID : 5
[+] Name : BATMAN - LI'L GOTHAM 001 (2013) (Print) (c2c) (GreenManGroup-DCP
[+] Data : Uploaded 11-25 16:09, Size 38.28 MiB, Seeders 10, Leechers 2
 
[+] ID : 6
[+] Name : BATMAN - LI'L GOTHAM 023 (2013) (digital) (Son of Ultron-Empire)
[+] Data : Uploaded 11-25 11:21, Size 30.81 MiB, Seeders 10, Leechers 1
 
[+] ID : 7
[+] Name : Batman 1966 Complete Season 3 Uncut TV RIP
[+] Data : Uploaded Y-day 07:43, Size 5.19 GiB, Seeders 12, Leechers 6
 
[+] ID : 8
[+] Name : Batman Arkham Origins (Update 7 + 6 DLC) Repack by z10yded
[+] Data : Uploaded Y-day 04:00, Size 8.11 GiB, Seeders 163, Leechers 230
 
[+] ID : 9
[+] Name : Batman.Arkham.Origins.Update.v2.0.Incl.DLC-RELOADED
[+] Data : Uploaded 11-27 19:27, Size 308.21 MiB, Seeders 125, Leechers 14
 
[+] ID : 10
[+] Name : Batman The Dark Knight 025 (2014) (Digital) (Zone-Empire)
[+] Data : Uploaded 11-27 15:27, Size 23.32 MiB, Seeders 81, Leechers 5
 
[+] ID : 11
[+] Name : Batman - Long Shadows
[+] Data : Uploaded 11-27 13:10, Size 59.59 MiB, Seeders 31, Leechers 2
 
[+] ID : 12
[+] Name : Batman.Arkham.Trilogy-R.G. Mechanics
[+] Data : Uploaded 11-27 05:05, Size 25.36 GiB, Seeders 41, Leechers 67
 
[+] ID : 13
[+] Name : Batman.Arkham.Origins.Update.v20131125-FTS
[+] Data : Uploaded 11-26 21:43, Size 253.1 MiB, Seeders 19, Leechers 2
 
[+] ID : 14
[+] Name : Batman Arkham Origins - FULL GAME PC - LAST UPDATES
[+] Data : Uploaded 11-24 12:50, Size 16.51 GiB, Seeders 17, Leechers 52
 
[+] ID : 15
[+] Name : Damian - Son of Batman 02 (of 04) (2014) (Digital) (Nahga-Empire
[+] Data : Uploaded 11-27 13:39, Size 45.2 MiB, Seeders 188, Leechers 24
 
[+] ID : 16
[+] Name : BATMAN - KNIGHTFALL Volume 1 to 3 (DC) (Digital) (TheHand-Empire
[+] Data : Uploaded 11-19 17:21, Size 2.52 GiB, Seeders 29, Leechers 7
 
[+] ID : 17
[+] Name : BATMAN '66  021 (2013) (DC Comics) (digital) (Son of Ultron-Empi
[+] Data : Uploaded 11-21 01:02, Size 68.39 MiB, Seeders 9, Leechers 1
 
[+] ID : 18
[+] Name : BATMAN AND TWO-FACE 025 (2014) (Digital) (Zone-Empire)
[+] Data : Uploaded 11-20 19:44, Size 27.07 MiB, Seeders 43, Leechers 0
 
[+] ID : 19
[+] Name : BATMAN '66  020 (2013) (DC Comics) (digital) (Son of Ultron-Empi
[+] Data : Uploaded 11-14 14:47, Size 71.7 MiB, Seeders 5, Leechers 1
 
[+] ID : 20
[+] Name : BATMAN - SUPERMAN 005 (2013) (Webrip) (2 covers) (The Last Krypt
[+] Data : Uploaded 11-06 13:36, Size 43.09 MiB, Seeders 32, Leechers 1
 
[+] ID : 21
[+] Name : Batman - Legends of the Dark Knight 077 (2013)(OlJoe-DCP)
[+] Data : Uploaded 11-20 13:05, Size 12.53 MiB, Seeders 13, Leechers 0
 
[+] ID : 22
[+] Name : Batman - Ego (2000).cbr (- Nem -)
[+] Data : Uploaded 11-17 17:28, Size 15.34 MiB, Seeders 13, Leechers 0
 
[+] ID : 23
[+] Name : Batman Beyond 2.0 (001 - 008) (ongoing) (- Nem -)
[+] Data : Uploaded 11-17 17:18, Size 201.42 MiB, Seeders 21, Leechers 3
 
[+] ID : 24
[+] Name : Batman Beyond 2.0 008 (2013) (digital) (Son of Ultron-Empire).cb
[+] Data : Uploaded 11-17 17:16, Size 29.28 MiB, Seeders 10, Leechers 0
 
[+] ID : 25
[+] Name : Batman Beyond 2.0 007 (2013) (digital) (Son of Ultron-Empire).cb
[+] Data : Uploaded 11-17 17:14, Size 24.96 MiB, Seeders 8, Leechers 0
 
[+] ID : 26
[+] Name : Batman Beyond 2.0 006 (2013) (digital) (Son of Ultron-Empire).cb
[+] Data : Uploaded 11-17 17:13, Size 25.21 MiB, Seeders 8, Leechers 0
 
[+] ID : 27
[+] Name : Batman v2 25 (2014) (2 covers) (1440+2048px-HD) (theProletariat-
[+] Data : Uploaded 11-15 19:20, Size 113.44 MiB, Seeders 26, Leechers 4
 
[+] ID : 28
[+] Name : Batman.O.Cavaleiro.das.Trevas_P1 e 2 PTBR
[+] Data : Uploaded 11-14 07:16, Size 543.94 MiB, Seeders 6, Leechers 0
 
[+] ID : 29
[+] Name : Batman - Ano Um (2011) 720p HD Dublado / Dual Audio pt-BR
[+] Data : Uploaded 11-13 18:05, Size 501.99 MiB, Seeders 37, Leechers 3
 
[+] ID to download : 0
 
[+] Executed !
 
 
-- == (C) Doddy Hackman 2013 == --


En línea

Max00355

Desconectado Desconectado

Mensajes: 12



Ver Perfil
Re: [Perl] PirateBay Manager 0.3
« Respuesta #1 en: 3 Enero 2014, 22:22 pm »

¿Guión interesante, tienes un GitHub?


En línea

Lo siento, mi español no es bueno.
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
Re: [Perl] PirateBay Manager 0.3
« Respuesta #2 en: 4 Enero 2014, 20:54 pm »

Si.
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Perl] Manager 0.3
Scripting
BigBear 0 1,606 Último mensaje 19 Enero 2012, 20:35 pm
por BigBear
[Perl] FTP Manager 0.2
Scripting
BigBear 0 1,648 Último mensaje 22 Abril 2012, 05:03 am
por BigBear
[Perl Tk] FTP Manager 0.2
Scripting
BigBear 0 1,646 Último mensaje 22 Abril 2012, 05:03 am
por BigBear
[Perl] SMF Manager 0.1
Scripting
BigBear 2 1,816 Último mensaje 7 Diciembre 2012, 20:45 pm
por BigBear
[Delphi] PirateBay Manager 0.8
Programación General
BigBear 3 2,657 Último mensaje 20 Febrero 2014, 21:48 pm
por cron0ar8R
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines