Foro de elhacker.net

Programación => Scripting => Mensaje iniciado por: BigBear en 14 Mayo 2013, 00:13 am



Título: [Perl] AnonFiles Uploader
Publicado por: BigBear en 14 Mayo 2013, 00:13 am
Traduccion a Perl del programa hecho por $DoC llamado AnonFiles Uploader (http://www.indetectables.net/viewtopic.php?f=12&t=43782) hecho para subir archivos a la pagina AnonFiles.

Código
  1. #!usr/bin/perl
  2. #AnonFiles Uploader
  3. #Original author: $ DoC
  4. #Translations made by Doddy H
  5. #
  6. #ppm install http://www.bribes.org/perl/ppm/Crypt-SSLeay.ppd
  7. #
  8.  
  9. use LWP::UserAgent;
  10.  
  11. my $nave = LWP::UserAgent->new;
  12. $nave->agent(
  13. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
  14. );
  15. $nave->timeout(5);
  16.  
  17. unless ( $ARGV[0] ) {
  18.    print "\n[+] Sintax : $0 <file>\n";
  19. }
  20. else {
  21.  
  22.    print "\n[+] Uploading ...\n";
  23.  
  24.    my $code = $nave->post(
  25.        "https://anonfiles.com/api?plain",
  26.        Content_Type => "form-data",
  27.        Content      => [ file => [ $ARGV[0] ] ]
  28.    )->content;
  29.  
  30.    if ( $code =~ /https:\/\/anonfiles\.com\/file\// ) {
  31.        print "\n[+] Link : " . $code . "\n";
  32.    }
  33.    else {
  34.        print "\n[-] Error\n";
  35.    }
  36.  
  37. }
  38.  
  39. #The End ?
  40.