mirror of
https://github.com/imapsync/imapsync.git
synced 2024-11-17 00:02:29 +01:00
34 lines
745 B
Perl
Executable File
34 lines
745 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
|
|
use strict ;
|
|
use warnings ;
|
|
use English ;
|
|
use IO::Socket::SSL ;
|
|
|
|
printf( "Perl %vd", $PERL_VERSION ) ;
|
|
print
|
|
"\nIO::Socket $IO::Socket::VERSION\n" ,
|
|
"IO::Socket::INET $IO::Socket::INET::VERSION \n",
|
|
"IO::Socket::INET6 $IO::Socket::INET6::VERSION \n",
|
|
"IO::Socket::SSL $IO::Socket::SSL::VERSION \n",
|
|
"Net::SSLeay $Net::SSLeay::VERSION \n",
|
|
" \n",
|
|
;
|
|
|
|
|
|
my $sock = IO::Socket::SSL->new(
|
|
# where to connect
|
|
PeerHost => "www.google.com",
|
|
PeerPort => "https",
|
|
|
|
# certificate verification
|
|
SSL_verify_mode => SSL_VERIFY_NONE,
|
|
SSL_verifycn_schema => 'http',
|
|
) or die "failed connect or ssl handshake: $!,$SSL_ERROR";
|
|
|
|
# send and receive over SSL connection
|
|
print $sock "GET / HTTP/1.0\r\n\r\n";
|
|
print <$sock>;
|
|
|