Ejemplos:
users.txt
Código:
root
ftp
mysql
bin
daemon
ibsoc
ifsca
aminen
dpisf
idsum
ieduc
ivivi
itcp
sergio
juan
backup
imosp
publish
gbrusa
igobi
iforo
ispyc
amoran
mysqldump
mesaadm
sinrespuesta
amgarcia
mcabrera
boletinoficial
dsum
improd
patricia
mauro
agostina
lucila
hyperic
nagios
clamav
dirs.txt
Código:
index.htm
index.html
index.php
.bash_history
.bashrc
.ftpquota
.gbent
.grc
.gui
.host
.hosts
.jpilot
.master
.members
.mysql_history
.net
.nsconfig
.pass
.passes
.pwd
.ssh/
.ssh/know_hosts
.ssh/id_rsa
.ssh/id_rsa.pub
.ssh/id_rsa.priv
.ssh/id_rsa.key
host
hosts
passwd
shadow
Funcionamiento:
Salida (results.html):
Code:
Código:
#!/usr/bin/perl
use HTTP::Request;
use LWP::UserAgent;
if(!$ARGV[3])
{
print "\n\n#####################################";
print "\n# Apache Files Finder By Login-Root #";
print "\n#####################################";
print "\n\nUso: perl $0 [WEBSITE] [USERS LIST] [DIRECTORY LIST] [PATH TO SAVE (HTML)]";
print "\nEx : perl $0 http://www.website.com users.txt dirs.txt results.html\n\n";
exit(0);
}
$ua = LWP::UserAgent->new;
$ua->agent("Google Bot");
($web, $users, $dirs, $save) = @ARGV;
if ( $web !~ /^http:/ )
{
$web = "http://" . $web;
}
open USERS, $users;
open SAVE, ">>$save";
print "\n[!] Scanning $web for files in users, saving in $save\n\n";
foreach $lista(<USERS>)
{
chomp($lista);
open DIRS, $dirs;
foreach $dir(<DIRS>)
{
chomp($dir);
$host = $web.`/~`.$lista.`/`.$dir;
$req = HTTP::Request->new(GET => "$host");
$res = $ua->request($req);
$result = $res->code;
if ($result != 404 and $result != 403)
{
print "\n".$res->status_line.": $host";
print SAVE $res->status_line.` : <a href="`.$host.`" TARGET="_new">`.$host.`</a><br>`;
}
}
close(DIRS);
}
print "\n";
close(USERS,SAVE);
__END__