1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
#!/usr/bin/perl use strict; use warnings; use 5.010; my $env = { }; my $load_ClamAV = sub { my ($env,$her_hin) = @_; delete $her_hin->{fehler} if defined $her_hin->{fehler}; # zurück setzen my %conf_local = ( abrufe => [ { url => 'http://database.clamav.net/daily.cvd', }, ], ); require LWP::UserAgent; require HTTP::CookieJar::LWP; my $jar = HTTP::CookieJar::LWP->new; my $ua = LWP::UserAgent->new( agent => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36', cookie_jar => $jar, protocols_allowed => ['http','https'], timeout => 10, ); foreach my $ref (@{$conf_local{abrufe}}) { my $response = $ua->get($ref->{url}); if ($response->is_success) { say __LINE__; print $response->decoded_content; } else { say __LINE__; say $response->status_line; say $response->headers()->as_string; say $response->header('content-type'); $her_hin->{fehler} = "Abruf der URL '" .$ref->{url} ."' ist gescheitert mit HTTP Status-Code " .$response->status_line ; last; } } return if defined $her_hin->{fehler}; }; ############################################################################### my %hin_her = ( ); $load_ClamAV->($env,\%hin_her); if (defined $hin_her{fehler}) { say "FEHLER!\n$hin_her{fehler}"; }
Quote42
503 Service Temporarily Unavailable
Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: close
Date: Wed, 22 Sep 2021 07:34:37 GMT
Server: cloudflare
Content-Type: text/html; charset=UTF-8
Expires: Thu, 01 Jan 1970 00:00:01 GMT
CF-RAY: 6929da16f80121b1-DUS
Client-Date: Wed, 22 Sep 2021 07:34:40 GMT
Client-Peer: 104.16.219.84:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Permissions-Policy: accelerometer=(),autoplay=(),camera=(),clipboard-read=(),clipboard-write=(),fullscreen=(),geolocation=(),gyroscope=(),hid=(),interest-cohort=(),magnetometer=(),microphone=(),payment=(),publickey-credentials-get=(),screen-wake-lock=(),serial=(),sync-xhr=(),usb=()
Refresh: 3
Title: Just a moment...
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Meta-Charset: UTF-8
X-Meta-Robots: noindex, nofollow
X-Meta-Viewport: width=device-width,initial-scale=1
X-UA-Compatible: IE=Edge,chrome=1
text/html; charset=UTF-8
FEHLER!
Abruf der URL 'http://database.clamav.net/daily.cvd' ist gescheitert mit HTTP Status-Code 503 Service Temporarily Unavailable
QuoteAfter checking that you are using a current version of ClamAV, please discontinue whatever method of download you are using and immediately move to using either FreshClam or cvdupdate. These are the two supported methods for downloading AV updates from ClamAV. All other methods may be rate limited, or blocked at our discretion. Use of Wget, Curl, or other command line tools that are scripted are explicitly denied.
2021-09-22T09:23:05 hajAber wo findet sich denn der JS Code?JavaScript ist standardisiert, aber LWP kann das nicht.
2021-09-22T18:56:32 biancaAber wo findet sich denn der JS Code?