当前位置:编程学习 > 网站相关 >>

修改的一个perl扫描脚本

#!/usr/bin/perl
##
#  By www.hkmjj.com  www.zzzyk.com
#  修改:mer4en7y
#  Team:90Sec
##
use HTTP::Request;
use LWP::UserAgent;
system('cls');
print "\n";
print "======目录扫描工具===============\n";
print "======修改:mer4en7y==============\n" ;
print "======Team:90sec=================\n";
print "======扫描结束后,查看易做图.txt===\n\n";
print "请输入网址:\n";
$site=<STDIN>;
chomp $site;
print "\n\n";
print "请输入网站脚本类型:\n";
print "e.g.: asp, php, cfm, any\n";
print "--> ";
$code=<STDIN>;
chomp($code);
if ( $site !~ /^http:/ ) {
$site = 'http://' . $site;
}
#视字典而定,如果前面有/就注释掉
#if ( $site !~ /\/$/ ) {
#$site = $site . '/';
#}
print "\n";
print "->网址: $site\n";
print "->脚本: $code\n";
print "->扫描正在进行中,请等待...\n\n\n";
if($code eq "php"){
 open(FILE,"php.list") || die $!;
 while(my $line=<FILE>){
  chomp;
$final=$site.$line;
my $req=HTTP::Request->new(GET=>$final);
my $ua=LWP::UserAgent->new();
$ua->timeout(30);
my $response=$ua->request($req);
if($response->status_line =~ /200/ ||
$response->status_line =~ /403/){
print " \n[+] Found -> $final\n\n";
open fp,">>易做图.txt";
print fp "$final";
close(fp);
}
else{
print "[-] Not Found <- $final\n";
}
}
}

补充:Web开发 , 其他 ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,