Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # Custom 404 Page Finder
- # written by localh0t
- # Contact: mattdch0@gmail.com
- # Follow: @mattdch
- # www.localh0t.com.ar
- use HTTP::Request;
- use LWP::UserAgent;
- if(!$ARGV[2])
- {
- print "\n\n[!] Use: perl $0 [WEBSITE] [DIRS FILE] [PATTERN OF CUSTOM 404 ERROR PAGE]\n";
- print "Ex: perl $0 http://website.com hiddens_dirs.txt \"Error de 404\"\n\n";
- exit (0);
- }
- my ($website, $list, $custom) = @ARGV;
- $agent = LWP::UserAgent->new;
- $agent->agent("Google Bot");
- if ( $website !~ /^http:/ )
- {
- $website = "http://" . $website;
- }
- print "\n[!] Scanning $website...\n";
- open(DIRS,"<".$list) || die "\n[-] File not found ($list)\n\n";
- foreach $dir(<DIRS>)
- {
- $trydir = $agent->request(HTTP::Request->new(GET => $website."/".$dir));
- $response = $trydir->content();
- if ($response !~ /$custom/)
- {
- print "[+] Found!: $website/$dir";
- }
- }
- close(DIRS);
- exit(0);
- __END__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement