1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl
#
# Der WAN-Reader soll vom Router eine die WAN-Adresse auslesen und auf Anfrage per Mail versenden
#
#
#
use strict;
use warnings;
use IO::Socket::SSL;
use LWP::Simple;
use LWP::Protocol::https;
# use Crypt:SSLeay;
my $browser=LWP::UserAgent->new();
my $seite=$browser->get('https://speedport.ip/top_status.stm');
print $seite;
print "\n\n 2. Version";
my $seite_code = $seite->decoded_content();
1
2
3
4
5
6
andreas@rpihead ~/Desktop/Scripte/Perl/WAN-Scan $ perl WAN-Reader.pl
HTTP::Response=HASH(0x1071758)
2. VersionCan't connect to speedport.ip:443 (certificate verify failed)
LWP::Protocol::https::Socket: SSL connect attempt failed error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed at /usr/local/share/perl/5.14.2/LWP/Protocol/http.pm line 49.
$ENV{HTTPS_CA_FILE}='/pfad/auf/cacert.pem';
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;