我在用Nginx漏洞扫描程序的过程中出现了:
目前正在扫描:*******(url隐藏)
Undefined subroutine &main::say called at C:\Perl\bin\bbs.pl line 28.
这样的提示,然后就中断了,在PL文件中28行对应的语句是:$response->is_success or say("Failed to get '$url':\n", $response->status_line);
谁能告诉我这个是什么问题,是不是PHP环境没有搭建呢?作者: 柔肠寸断 时间: 2010-6-17 16:20
#!usr/bin/perl -w
#用处:测试nginx是否存在该漏洞
use LWP;
use LWP::ConnCache;
my $browser = LWP::UserAgent->new;
$browser->timeout( 15 );
my $conncache = LWP::ConnCache->new;
$browser->conn_cache($conncache);
#先用列表吧,没有用记事本保存列表再读再扫嘿嘿
my @bbslist1;
push @bbslist1,"http://www.3ast.com.cn/";
#Server: nginx/0.8.13
#Content-Type: text/html
print "\t\tNginx漏洞扫描程序 By x13ky\@qq.com\n\n";
foreach my $url (@bbslist1){
print "目前正在扫描:$url\n";
my $response= $browser->get( $url);
$response->is_success or say("Failed to get '$url':\n", $response->status_line);
my $servertype = $response->server;
print "$servertype\n";
if ($servertype=~/nginx/){
my $typeold=$response->content_type;
print "$typeold\n";
my $url2=$url.'/xysky.php';
my $response2 = $browser->get( $url2);
$response2->is_success or say("Failed to get '$url2':\n", $response->status_line);
#!usr/bin/perl -w
#用处:测试nginx是否存在该漏洞
use LWP;
use LWP::ConnCache;
my $browser = LWP::UserAgent->new;
$browser->timeout( 15 );
my $conncache = LWP::ConnCache->new;
$browser->conn_cache($conncache);
#先用列表吧,没有用记事本保存列表再读再扫嘿嘿
my @bbslist1;
push @bbslist1,"http://bbs.yinxxx.info/";
#Server: nginx/0.8.13
#Content-Type: text/html
print "\t\tNginx漏洞扫描程序 By x13ky\@qq.com\n\n";
foreach my $url (@bbslist1){
print "目前正在扫描:$url\n";
my $response= $browser->get( $url);
$response->is_success or say("Failed to get '$url':\n", $response->status_line);
my $servertype = $response->server;
print "$servertype\n";
if ($servertype=~/nginx/){
my $typeold=$response->content_type;
print "$typeold\n";
my $url2=$url.'/xysky.php';
my $response2 = $browser->get( $url2);
$response2->is_success or say("Failed to get '$url2':\n", $response->status_line);
my $typenew=$response2->content_type;
print "$typenew\n";
if ($typeold eq $typenew){
print "站点 $url 暂没有发现漏洞.\n\n";
}else{
print "站点 $url 存在该漏洞.\n\n";
}
}else{
print "站点不是nginx,Sorry!\n\n";
}
}作者: hyrz 时间: 2010-6-17 23:58