[转载]FiltersScan2.pl
文章作者:superhei[code]
#!/usr/bin/perl
################################################################################
#FiltersScan2.pl
#By [email]SuperHei@ph4nt0m.org[/email]
#2006.3.17
#C:perlbin>perl x.pl get <a href="[url]http://www.thysea.com/ymdown/show.php?id=1049[/url]" target="_blank">[url]http://www.thysea.com/ymdown/show.php?id=1049</a>[/url] 网站是
最厉害的 /* */
###############################################################
#FiltersScan.pl by: SuperHei[S4T]
#x.pl [Mod <a href=" [判断字符] [注释符号]
#x.pl get [url]http://www.thysea.com/ymdown/show.php?id=1049" target="_blank"> [判断字符] [注释符号]
#x.pl...how.php?id=1049</a> 网站 /* */
#
#提交的url: <a href="[url]http://www.thysea.com/ymdown/show.php?id=1049/[/url]*select*/" target="_blank">[url]http://www.thysea.com/ymdown/show.php?id=1049/[/url]*select*/</a>
#[Mod] get/post
#[判断字符] 正确显示的字符
#/* */ 还可以用其他的注释号如 -- #等
#
###############################################################
#× select
#√ and
#√ And
#√ or
################################################################################
use LWP::UserAgent;
$mod= $ARGV[0];
$path = $ARGV[1];
$string= $ARGV[2];
$file="2.txt";
usage();
open(DB, $file) || die "Can't open $file.";
@H = <DB>;
close (DB);
foreach $fstr (@H){
chomp $fstr;
#print "$fstr\n";
$que = $path.$ARGV[3].$fstr.$ARGV[4];
#print "$que\n";
if ( &check($que) ){
print "× $fstr\n";}else{print "√ $fstr\n";}
}
sub check($){
$http_query = $_[0];
$mcb_reguest = LWP::UserAgent->new() or die;
if ($mod="get"){
$res = $mcb_reguest->get($http_query);}
if ($mod="post"){
$res = $mcb_reguest->post($http_query);
}
@results = $res->content;
@num=grep /$string/, @results;
$size=@num;
if ($size == 0) { return 1; }
return 0;
}
sub usage {
print "###############################################################\n";
print "FiltersScan.pl by: [email]SuperHei@ph4nt0m.org[/email]\n";
print "$0 [Mod [Url] [判断字符] \n";
print "$0 get <a href="[url]http://www.thysea.com/ymdown/show.php?id=1049[/url]" target="_blank">[url]http://www.thysea.com/ymdown/show.php?id=1049</a>[/url] 网站 /* */\n";
print "###############################################################\n";
#exit;
}
[/code]
页:
[1]