require LWP::UserAgent; use HTTP::Request::Common; use Digest::MD5; $ua = LWP::UserAgent->new; $ua->credentials("datafeedsCentral.com", "Datafeeds", $user, $password); # URL where to download the database and its updates $url = "http://datafeedsCentral.com/datafeeds/$user/vuldb/"; # download the initial database dump from the server sub download_dump { my $response; print "Downloading initial database dump.\n"; $response = $ua->request(GET("$url/vdb-dump.tgz"), 'vdb-dump.tgz'); if (!$response->is_success) { die "Can't download vdb-dump.tgz: " . $response->status_line . "\n"; }