Hack x Crack - Comunidad de Seguridad informática
Programación => Scripting => Perl => Mensaje iniciado por: BigBear en Mayo 14, 2013, 08:15:05 pm
-
Un simple script para subir imagenes a Imageshack.
El codigo :
#!usr/bin/perl
#Imageshack Uploader 0.1
#Coded By Doddy H
#ppm install http://www.bribes.org/perl/ppm/Crypt-SSLeay.ppd
use LWP::UserAgent;
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(5);
head();
unless ( $ARGV[0] ) {
print "\n[+] Sintax : $0 <image>\n";
}
else {
my $your_key = "YOURKEY"; #Your API Key
print "\n[+] Uploading ...\n";
my $code = $nave->post(
"https://post.imageshack.us/upload_api.php",
Content_Type => "form-data",
Content => [
key => $your_key,
fileupload => [ $ARGV[0] ],
format => "json"
]
)->content;
if ( $code =~ /"image_link":"(.*?)"/ ) {
print "\n[+] Link : " . $1 . "\n";
}
else {
print "\n[-] Error\n";
}
}
copyright();
sub head {
print "\n-- == Imageshack Uploader 0.1 == --\n";
}
sub copyright {
print "\n[+] Written By Doddy H\n";
}
#The End ?