• Publicidad

Imageshack Uploader 0.1

¿Estás desarrollando un proyecto, o piensas hacerlo? Pon aquí tu propuesta, lo más seguro es que alguien esté interesado en ayudarte.

Imageshack Uploader 0.1

Notapor BigBear » 2013-05-14 13:12 @591

Un simple script para subir imágenes a Imageshack.

El código :

Sintáxis: [ Descargar ] [ Ocultar ]
Using perl Syntax Highlighting
  1. #!usr/bin/perl
  2. #Imageshack Uploader 0.1
  3. #Coded By Doddy H
  4. #ppm install http://www.bribes.org/perl/ppm/Crypt-SSLeay.ppd
  5.  
  6. use LWP::UserAgent;
  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. $nave->timeout(5);
  13.  
  14. head();
  15.  
  16. unless ( $ARGV[0] ) {
  17.     print "\n[+] Sintax : $0 <image>\n";
  18. }
  19. else {
  20.  
  21.     my $your_key = "YOURKEY";    #Your API Key
  22.  
  23.     print "\n[+] Uploading ...\n";
  24.  
  25.     my $code = $nave->post(
  26.         "https://post.imageshack.us/upload_api.php",
  27.         Content_Type => "form-data",
  28.         Content      => [
  29.             key        => $your_key,
  30.             fileupload => [ $ARGV[0] ],
  31.             format     => "json"
  32.         ]
  33.     )->content;
  34.  
  35.     if ( $code =~ /"image_link":"(.*?)"/ ) {
  36.         print "\n[+] Link : " . $1 . "\n";
  37.     }
  38.     else {
  39.         print "\n[-] Error\n";
  40.     }
  41. }
  42.  
  43. copyright();
  44.  
  45. sub head {
  46.     print "\n-- == Imageshack Uploader 0.1 == --\n";
  47. }
  48.  
  49. sub copyright {
  50.     print "\n[+] Written By Doddy H\n";
  51. }
  52.  
  53. #The End ?
  54.  
Coloreado en 0.006 segundos, usando GeSHi 1.0.8.4
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Publicidad

Volver a Proyectos

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado

cron