有段时间需要采集Virus total的数据作安全厂商扫描器的评估,想着通过wget写了一个简单的perl的爬虫,来抓取Virustotal的数据。代码如下,如果对你有用,直接拿下。
#!/usr/bin/perl -w
# author : linux_feixue
# create time : 2012.9
use strict;
use warnings;
use myconfig;
use mydatabase;
BEGIN
{
my $path;
if ($^O eq 'MSWin32')
{
if ($0=~m/^(.+)\\/) { $path = $1; } else { $path = readpipe('cd'); chomp($path); }
unshift(@INC, $path);
}elsif ($^O eq 'linux')
{
if ($0=~m/^(.+)\//) { $path = $1; } else { $path = readpipe('pwd'); chomp($path); }
unshift(@INC, $path);
}else
{
die("Unkown system: $^O\n");
}
}
my $dbh;
my $total = 0; #总处理样本数量
my $vt_has_total = 0; #Vt上面有数据的数量
sub usage
{
print "Usage:\n";
print "\t--id=[specify the id of task]\n";
exit(0);
}
sub replace{
my ($str) = @_;
$str=~s/\-/_/g;
return $str;
}
sub print_erro
{
my($erro) = @_;
my $output = "erro.log";

博主分享了一段Perl代码,用于爬取VirusTotal网站上的数据,旨在进行安全厂商扫描器的评估。该爬虫可能对需要相关数据的研究者有所帮助。
最低0.47元/天 解锁文章
818

被折叠的 条评论
为什么被折叠?



