Metabrik-Repository

 view release on metacpan or  search on metacpan

lib/Metabrik/Antivirus/Clamav.pm  view on Meta::CPAN

         'clamscan' => [ ],
      },
      need_packages => {
         ubuntu => [ qw(clamav) ],
         debian => [ qw(clamav) ],
         kali => [ qw(clamav) ],
      },
   };
}

sub update {
   my $self = shift;

   my $datadir = $self->datadir;

   my $cmd = "freshclam";

   $self->log->verbose($cmd);

   return $self->sudo_system($cmd);
}

lib/Metabrik/Brik/Tool.pm  view on Meta::CPAN


=cut
EOF
;

   $ft->write($data, $filename) or return;

   return $filename;
}

sub update_core {
   my $self = shift;

   my $datadir = $self->datadir;

   my $url = 'https://github.com/onyphe/metabrik-core';

   my $dg = Metabrik::Devel::Git->new_from_brik_init($self) or return;
   $dg->use_pager(0);
   my $pm = Metabrik::Perl::Module->new_from_brik_init($self) or return;
   $pm->use_pager(0);

lib/Metabrik/Client/Elasticsearch.pm  view on Meta::CPAN

   return $self->reindex($index, $new, $json);
}

#
# Search::Elasticsearch::Client::5_0::Direct
#
# To execute this Command using routing requires to use the correct field
# value directly in $hash->{routing}. We cannot "guess" it from arguments,
# this would be a little bit complicated to do in an efficient way.
#
sub update_document {
   my $self = shift;
   my ($doc, $id, $index, $type, $hash) = @_;

   $index ||= $self->index;
   $type ||= $self->type;
   my $es = $self->_es;
   $self->brik_help_run_undef_arg('open', $es) or return;
   $self->brik_help_run_undef_arg('update_document', $doc) or return;
   $self->brik_help_run_invalid_arg('update_document', $doc, 'HASH') or return;
   $self->brik_help_run_undef_arg('update_document', $id) or return;

lib/Metabrik/Database/Cvesearch.pm  view on Meta::CPAN

      'sbin/db_mgmt.py -p', 'sbin/db_mgmt_cpe_dictionary.py', 'sbin/db_updater.py -c'
   ) {
      my $cmd = $repo.'/'.$this;
      $self->log->verbose("init_database: cmd [$cmd]");
      $self->execute($cmd);
   }

   return 1;
}

sub update_database {
   my $self = shift;

   my $repo = $self->repo;

   for my $this ('sbin/db_updater.py -v') {
      my $cmd = $repo.'/'.$this;
      $self->execute($cmd);
   }

   return 1;

lib/Metabrik/Database/Cwe.pm  view on Meta::CPAN

         load => [ qw(cwe_xml_file) ],
         search => [ qw(cwe_pattern) ],
      },
      require_modules => {
         'Metabrik::File::Compress' => [ ],
         'Metabrik::File::Xml' => [ ],
      },
   };
}

sub update {
   my $self = shift;

   my $datadir = $self->datadir;

   my $uri = 'http://cwe.mitre.org/data/xml/views/2000.xml.zip';
   my $file_zip = "2000.xml.zip";

   my @updated = ();
   my $files = $self->mirror($uri, $file_zip) or return;
   if (@$files > 0) {  # Some new stuff

lib/Metabrik/Database/Nvd.pm  view on Meta::CPAN

# http://nvd.nist.gov/download.cfm
# nvdcve-2.0-Modified.xml.gz includes all recently published and recently updated vulnerabilities.
# nvdcve-2.0-Recent.xml.gz includes all recently published vulnerabilities.
# nvdcve-2.0-2002.xml includes vulnerabilities prior to and including 2002.
my $resource = {
   uri => 'http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-NAME.xml.gz',
   gz => 'nvdcve-2.0-NAME.xml.gz',
   xml => 'nvdcve-2.0-NAME.xml',
};

sub update {
   my $self = shift;
   my ($type) = @_;

   $type ||= 'recent';

   if ($type ne 'recent'
   &&  $type ne 'modified'
   &&  $type ne 'others'
   &&  $type ne 'all') {
      return $self->log->error($self->brik_help_run('update'));

lib/Metabrik/Database/Ripe.pm  view on Meta::CPAN

      },
      require_modules => {
         'Metabrik::Client::Www' => [ ],
         'Metabrik::File::Compress' => [ ],
         'Metabrik::File::Read' => [ ],
         'Metabrik::File::Text' => [ ],
      },
   };
}

sub update {
   my $self = shift;

   my @urls = qw(
      ftp://ftp.apnic.net/apnic/whois/apnic.db.inetnum.gz
      ftp://ftp.apnic.net/apnic/whois/apnic.db.inet6num.gz
      ftp://ftp.ripe.net/ripe/dbase/ripe.db.gz
      ftp://ftp.afrinic.net/dbase/afrinic.db.gz
      http://ftp.apnic.net/apnic/dbase/data/jpnic.db.gz
      http://ftp.apnic.net/apnic/dbase/data/krnic.db.gz
      http://ftp.apnic.net/apnic/dbase/data/twnic.db.gz

lib/Metabrik/Database/Rir.pm  view on Meta::CPAN

         ip_to_asn => [ qw(ipv4_address) ],
      },
      require_modules => {
         'Metabrik::Client::Www' => [ ],
         'Metabrik::File::Read' => [ ],
         'Metabrik::Network::Address' => [ ],
      },
   };
}

sub update {
   my $self = shift;

   my @urls = qw(
      ftp://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest
      ftp://ftp.ripe.net/ripe/stats/delegated-ripencc-extended-latest
      ftp://ftp.afrinic.net/pub/stats/afrinic/delegated-afrinic-extended-latest
      ftp://ftp.apnic.net/pub/stats/apnic/delegated-apnic-extended-latest
      ftp://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-extended-latest
   );

lib/Metabrik/Database/Vfeed.pm  view on Meta::CPAN

   my $cpe = $vfeed->get_cpe($id);
   my $cwe = $vfeed->get_cwe($id);

   return {
      cve => $cve,
      cpe => $cpe,
      cwe => $cwe,
   };
}

sub update {
   my $self = shift;

   my $db = $self->db;
   my $datadir = $self->datadir;
   my $url = 'http://www.toolswatch.org/vfeed/vfeed.db.tgz';

   my $cw = Metabrik::Client::Www->new_from_brik_init($self) or return;
   my $files = $cw->mirror($url, 'vfeed.db.tgz', $datadir);
   if (@$files) { # An update was found
      $self->log->info("update: a new version was found");

lib/Metabrik/Devel/Git.pm  view on Meta::CPAN

      $directory .= '/'.$name;
   }

   my $cmd = "git clone $repository $directory";

   $self->execute($cmd) or return;

   return $directory;
}

sub update {
   my $self = shift;
   my ($repository, $directory) = @_;

   $self->brik_help_run_undef_arg('update', $repository) or return;

   if (! defined($directory)) {
      my $datadir = $self->datadir;

      $directory ||= $datadir;
      my ($name) = $repository =~ m{^.*/(.*)$};
      $directory .= '/'.$name;
   }

   my $cmd = "git pull -u $repository $directory";

   $self->execute($cmd) or return;

   return $directory;
}

sub update_or_clone {
   my $self = shift;
   my ($repository, $directory) = @_;

   $self->brik_help_run_undef_arg('update_or_clone', $repository) or return;

   if (defined($directory) && -d $directory) {
      return $self->update($repository, $directory);
   }

   return $self->clone($repository, $directory);

lib/Metabrik/Devel/Mercurial.pm  view on Meta::CPAN

   my $r = $self->execute($cmd);

   if (length($directory)) {
      $she->run_cd($cwd) or return;
   }

   return $r;
}

# alias to pull
sub update {
   my $self = shift;

   return $self->pull(@_);
}

sub diff {
   my $self = shift;
   my ($data) = @_;

   $data ||= '.';

lib/Metabrik/Format/Latex.pm  view on Meta::CPAN

         pdflatex => [ ],
      },
      need_packages => {
         ubuntu => [ qw(texlive texlive-latex-extra texlive-lang-french) ],  # Sorry, the author is French
         debian => [ qw(texlive texlive-latex-extra texlive-lang-french) ],  # Sorry, the author is French
         kali => [ qw(texlive texlive-latex-extra texlive-lang-french) ],  # Sorry, the author is French
      },
   };
}

sub update {
   my $self = shift;

   my $datadir = $self->datadir;

   my @urls = (
      'ftp://ftp.springer.de/pub/tex/latex/llncs/latex2e/llncs.cls',
      'https://www.usenix.org/sites/default/files/usenix.sty_.txt',
      'https://www.usenix.org/sites/default/files/template.la_.txt',
   );

lib/Metabrik/Lookup/Alexa.pm  view on Meta::CPAN

         from_pattern => [ qw(domain) ],
         list_from_pattern => [ qw(domain) ],
      },
      require_modules => {
         'Metabrik::File::Compress' => [ ],
         'Metabrik::File::Csv' => [ ],
      },
   };
}

sub update {
   my $self = shift;

   my $datadir = $self->datadir;
   my $url = $self->url;
   my $outfile_zip = $datadir.'/alexa-top1m.csv.zip';
   my $outfile_csv = $datadir.'/alexa-top1m.csv';

   my $files = $self->mirror($url, $outfile_zip) or return;

   my @updated = ();

lib/Metabrik/Lookup/Countrycode.pm  view on Meta::CPAN

   my @tlds = sort { $a cmp $b } keys %list;

   return \@tlds;
}

#
# Port numbers:
# http://www.iana.org/protocols
# http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
#
sub update {
   my $self = shift;

   my $input = $self->input;

   my $sf = Metabrik::System::File->new_from_brik_init($self) or return;
   $sf->remove($input);

   my $uri = 'http://www.iana.org/domains/root/db';

   my $get = $self->get($uri) or return;

lib/Metabrik/Lookup/Iplocation.pm  view on Meta::CPAN

   my $self = shift;

   my $init = $self->SUPER::brik_init or return;

   my $na = Metabrik::Network::Address->new_from_brik_init($self) or return;
   $self->_na($na);

   return 1;
}

sub update {
   my $self = shift;

   my $datadir = $self->datadir;

   my $dl_path = 'http://geolite.maxmind.com/download/geoip/database/';

   my %mirror = (
      'GeoIP.dat.gz' => 'GeoLiteCountry/GeoIP.dat.gz',
      'GeoIPv6.dat.gz' => 'GeoIPv6.dat.gz',
      'GeoLiteCity.dat.gz' => 'GeoLiteCity.dat.gz',

lib/Metabrik/Lookup/Ipoption.pm  view on Meta::CPAN

         from_hex => [ qw(hex_number) ],
         from_string => [ qw(ip_option_string) ],
      },
      require_modules => {
         'Metabrik::Client::Www' => [ ],
         'Metabrik::File::Text' => [ ],
      },
   };
}

sub update {
   my $self = shift;
   my ($output) = @_;

   my $url = 'http://www.iana.org/assignments/ip-parameters/ip-parameters-1.csv';
   my ($file) = $self->input;

   my $datadir = $self->datadir;
   $output ||= $datadir.'/'.$file;

   my $cw = Metabrik::Client::Www->new_from_brik_init($self) or return;

lib/Metabrik/Lookup/Oui.pm  view on Meta::CPAN

         from_hex => [ qw(mac_address) ],
         from_string => [ qw(company_string) ],
         all => [ ],
      },
      require_modules => {
         'Metabrik::Client::Www' => [ ],
      },
   };
}

sub update {
   my $self = shift;
   my ($output) = @_;

   my $input = $self->input;
   my $datadir = $self->datadir;
   $output ||= $input;

   # XXX: should also check for generic attribution:
   # http://www.iana.org/assignments/ethernet-numbers/ethernet-numbers-2.csv

lib/Metabrik/Lookup/Protocol.pm  view on Meta::CPAN

         from_hex => [ qw(hex_number) ],
         from_string => [ qw(protocol_string) ],
      },
      require_modules => {
         'Metabrik::Client::Www' => [ ],
         'Metabrik::File::Text' => [ ],
      },
   };
}

sub update {
   my $self = shift;
   my ($output) = @_;

   my $url = 'http://www.iana.org/assignments/protocol-numbers/protocol-numbers-1.csv';
   my ($file) = $self->input;

   my $datadir = $self->datadir;
   $output ||= $datadir.'/'.$file;

   my $cw = Metabrik::Client::Www->new_from_brik_init($self) or return;

lib/Metabrik/Lookup/Service.pm  view on Meta::CPAN

         from_string => [ qw(service_string) ],
      },
      require_modules => {
         'Metabrik::Client::Www' => [ ],
         'Metabrik::File::Compress' => [ ],
         'Metabrik::File::Text' => [ ],
      },
   };
}

sub update {
   my $self = shift;
   my ($output) = @_;

   my $url = 'http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv';

   my $input = $self->input;
   my $datadir = $self->datadir;
   $output ||= $input;

   my $cw = Metabrik::Client::Www->new_from_brik_init($self) or return;

lib/Metabrik/Lookup/Tcpoption.pm  view on Meta::CPAN

         from_hex => [ qw(hex_number) ],
         from_string => [ qw(protocol_string) ],
      },
      require_modules => {
         'Metabrik::Client::Www' => [ ],
         'Metabrik::File::Text' => [ ],
      },
   };
}

sub update {
   my $self = shift;
   my ($output) = @_;

   my $url = 'http://www.iana.org/assignments/tcp-parameters/tcp-parameters-1.csv';
   my ($file) = $self->input;

   my $datadir = $self->datadir;
   $output ||= $datadir.'/'.$file;

   my $cw = Metabrik::Client::Www->new_from_brik_init($self) or return;

lib/Metabrik/Lookup/Threatlist.pm  view on Meta::CPAN

      },
      require_modules => {
         'Metabrik::Client::Www' => [ ],
         'Metabrik::File::Compress' => [ ],
         'Metabrik::File::Text' => [ ],
         'Metabrik::Network::Address' => [ ],
      },
   };
}

sub update {
   my $self = shift;

   my $datadir = $self->datadir;

   my %mirror = (
      'iblocklist-tgbankumtwtrzllndbmb.gz' => 'http://list.iblocklist.com/?list=logmein',
      'iblocklist-nzldzlpkgrcncdomnttb.gz' => 'http://list.iblocklist.com/?list=nzldzlpkgrcncdomnttb',
      'iblocklist-xoebmbyexwuiogmbyprb.gz' => 'http://list.iblocklist.com/?list=bt_proxy',
      'iblocklist-zfucwtjkfwkalytktyiw.gz' => 'http://list.iblocklist.com/?list=zfucwtjkfwkalytktyiw',
      'iblocklist-llvtlsjyoyiczbkjsxpf.gz' => 'http://list.iblocklist.com/?list=bt_spyware',

lib/Metabrik/Network/Frame.pm  view on Meta::CPAN


   my $nd = Metabrik::Network::Device->new_from_brik_init($self) or return;

   my $device_info = $nd->get($device) or return;

   $self->log->debug("get_device_info: got info from device [$device]");

   return $device_info;
}

sub update_device_info {
   my $self = shift;
   my ($device) = @_;

   return $self->device_info($self->get_device_info($device));
}

sub from_read {
   my $self = shift;
   my ($frames) = @_;

lib/Metabrik/Network/Sinfp3.pm  view on Meta::CPAN

      file => $file,
   ) or return $self->log->error('brik_init: db::sinfp3 failed');
   $db->init;
   $global->db($db);

   $self->_global($global);

   return $self->SUPER::brik_init(@_);
}

sub update {
   my $self = shift;

   my $db = $self->db;
   my $datadir = $self->datadir;

   my $url = $self->_update_url;

   my $cw = Metabrik::Client::Www->new_from_brik_init($self) or return;
   my $files = $cw->mirror($url, $db, $datadir) or return;
   if (@$files > 0) {

lib/Metabrik/Password/Rockyou.pm  view on Meta::CPAN

      require_modules => {
         'Metabrik::File::Compress' => [ ],
      },
   };
}

#
# More password lists are available at: 
# http://downloads.skullsecurity.org/passwords/
#
sub update {
   my $self = shift;

   my @urls = qw(
      https://downloads.skullsecurity.org/passwords/rockyou.txt.bz2
      https://downloads.skullsecurity.org/passwords/rockyou-withcount.txt.bz2
   );

   my $datadir = $self->datadir;

   my $fc = Metabrik::File::Compress->new_from_brik_init($self) or return;

lib/Metabrik/Remote/Sysmon.pm  view on Meta::CPAN

      },
      require_binaries => {
      },
      optional_binaries => {
      },
      need_packages => {
      },
   };
}

sub update {
   my $self = shift;

   my $datadir = $self->datadir;

   my $cw = Metabrik::Client::Www->new_from_brik_init($self) or return;
   $cw->user_agent("Metabrik-Remote-Sysmon-mirror/1.00");
   $cw->datadir($datadir);

   my $fc = Metabrik::File::Compress->new_from_brik_init($self) or return;
   $fc->datadir($datadir);

lib/Metabrik/System/Docker.pm  view on Meta::CPAN

   my ($name) = @_;

   $self->brik_help_run_undef_arg('delete', $name) or return;

   my $cmd = "docker rmi -f $name";
   $self->SUPER::execute($cmd) or return;

   return $name;
}

sub update {
   my $self = shift;

   # XXX: needed?

   return 1;
}

sub console {
   my $self = shift;
   my ($name, $shell) = @_;

lib/Metabrik/System/Freebsd/Ezjail.pm  view on Meta::CPAN

         $self->sudo_system($cmd);
      }
      return 1;
   }

   my $cmd = "ezjail-admin delete -fw $jail_name";

   return $self->sudo_system($cmd);
}

sub update {
   my $self = shift;

   my $cmd = "ezjail-admin update -u";

   return $self->sudo_system($cmd);
}

sub console {
   my $self = shift;
   my ($jail_name) = @_;

lib/Metabrik/System/Freebsd/Iocage.pm  view on Meta::CPAN

}

sub fetch {
   my $self = shift;

   my $cmd = "iocage fetch";

   return $self->sudo_system($cmd);
}

sub update {
   my $self = shift;

   return $self->fetch(@_);
}

sub create {
   my $self = shift;
   my ($tag, $interface, $ipv4_address, $ipv6_address) = @_;

   $self->brik_help_run_undef_arg('create', $tag) or return;

lib/Metabrik/System/Freebsd/Package.pm  view on Meta::CPAN

         $r = $self->sudo_system('pkg install '.$this);
      }
   }
   else {
      $r = $self->sudo_system('pkg install '.$package);
   }

   return $r;
}

sub update {
   my $self = shift;

   my $cmd = 'pkg update';

   return $self->sudo_system($cmd);
}

sub upgrade {
   my $self = shift;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.620 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )