Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use LWP::UserAgent;
- print "Scan Directory\n[+] Target \"www.xxx.xxx\" : ";
- chomp($domain=<STDIN>);
- unless ($domain=~/http:\/\//) {
- $domain='http://'.$domain;
- }
- print "Scan Directory : ",$domain,"\n";
- $agent=LWP::UserAgent->new;
- $agent->max_redirect(0);
- open(FILE,"dir.txt");
- @dir=<FILE>;
- close(FILE);
- foreach (@dir) {
- chomp;
- $url=$domain.'/'.$_;
- $response=$agent->head($url);
- print "[] Scan : $url";
- unless ($response->status_line=~/^404|^302/) {
- print " ..... ",$response->status_line;
- }
- print "\n";
- }
- #http://comfreedom.blogspot.com/2011/02/perl-scan-directory.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement