#!/usr/bin/perl # phpMyAdmin Checker # Author: cha0x # 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 ); if(@ARGV !=1) { print "Usage: perl phpmyadmin.pl 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=; 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";} } }