All pastes #1439048 Raw Edit

cha0x

public text v1 · immutable
#1439048 ·published 2009-05-29 05:02 UTC
rendered paste body
#!/usr/bin/perl 

# phpMyAdmin Checker
# Author: cha0x <cha0x@darkc0de.com>

# Scans from a text file (e.g. iplist.txt) and saves the logs
# The IPs and URLs must be without the "http://" and the "/"
# in the end. For example:
# 82.170.162.142
# www.site.com


use LWP::UserAgent;
use HTTP::Request;

print q(
	
	phpMyAdmin Checker by cha0x
	   <cha0x@darkc0de.com>
	   	
);

if(@ARGV !=1) {
print "Usage: perl phpmyadmin.pl <IP/URL LIST> e.g. perl phpmyadmin.pl iplist.txt";
exit;
}


@path = ('/phpmyadmin/');

foreach $add(@path) {
print "[i] Scan Started\n";
$http = "http://";
$iplist = @ARGV[0];
open(IPLIST, $iplist) || die("[x] Error: File not found\n");  
@raw_data=<IPLIST>;

	foreach $line (@raw_data)
	{
	chomp($line);
	my $address = $http.$line.$add;
	my $con = HTTP::Request->new(GET=>$address);
	my $useragent = LWP::UserAgent->new();
	my $f = $useragent->request($con);

if($f->is_success) {
if($f->content =~ /200/) {
print "[!] Found!\n";
print "[URL] $address\n";
open (f,">>","found.txt");
print f "$address\n";
print "[i] Saving to: found.txt...\n";
close(f);
	}
}
else {
print "[x] Not Found!\n";}
}
}