上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 48 下一页
摘要: 平台有个需求要导入信息到MYSQL..分析了下,写了个脚本,几分钟搞定。。。while(){ @tmp=split(/\t/,$_); @xieyi=split(/\//,$tmp[1]); if($xieyi[1] eq 'tcp'){ if($tmp[3]=~m/^\#(.*)/){ print "portname:$tmp[0] port_number:$xieyi[0] port_text:$1 \n"; } }}sub db_insert{ my $name=shift; my $text=shift; my $port=shift; m... 阅读全文
posted @ 2013-10-31 17:45 墨迹哥's 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 可能脚本会有Bug,我只是用来工作上用一下,具体有没有BUG没测。项目估计马上结束了。 这个入库的是MYSQL的。原理是先Ping,如果通的话,则加入队列,通过队列再进行SYN探测。#!/usr/bin/perluse threads;use DBI;use Thread::Queue;use Thread::Semaphore;use Net::Ping;use Term::ProgressBar;# create queuemy $q=new Thread::Queue;# read for check listmy @target=;my $se_max = Thread::Semaph 阅读全文
posted @ 2013-10-13 19:34 墨迹哥's 阅读(1011) 评论(0) 推荐(0) 编辑
摘要: 坑爹的是不知道怎么报错。。头疼。。 #!/usr/bin/perl use strict; use DBI; use Net::Ping; my @oder=(); my $in=DBI->connect("DBI:mysql:database=port_scan;host=localhost","root","") or die "NO :$!"; if($in){ print "OK\n"; } my $p = Net::Ping->new("syn"); f 阅读全文
posted @ 2013-10-11 10:26 墨迹哥's 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 不知道为什么停不下来,坑爹。。#!/usr/bin/perluse threads;use Thread::Queue;use Thread::Semaphore;use Net::Ping;# create queuemy $q=new Thread::Queue;# read for check listmy @target=;my $se_max = Thread::Semaphore->new( 100 );foreach my $ip (@target){ chomp($ip); foreach my $port(1..65535){ $q->enqueue(" 阅读全文
posted @ 2013-10-10 15:47 墨迹哥's 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 一直研究SYN可行的扫描方案,想了一下,自己模拟写了一个,但是感觉特别不理想。还得修改,mark一下。 #!/usr/bin/perl use threads; use Thread::Queue; use Thread::Semaphore; use Net::Ping; # create queue my $q=new Thread::Queue; # read for check list my @target=; foreach my $ip (@target){ foreach my $port (1..6553... 阅读全文
posted @ 2013-10-10 14:59 墨迹哥's 阅读(183) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 48 下一页