Skip to content

Instantly share code, notes, and snippets.

@openstrike
Created November 27, 2017 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save openstrike/a1feb72d62aad5c0cea6115bb58f0029 to your computer and use it in GitHub Desktop.
Save openstrike/a1feb72d62aad5c0cea6115bb58f0029 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
print "Content-type: text/html\n\n";
my $ua = LWP::UserAgent->new;
$ua->ssl_opts ({ SSL_version => 'TLSv1_2' });
my $res = $ua->get ('https://tlstest.nochex.com');
unless ($res->is_success && $res->content =~ /NOCHEX_Connection_OK/) {
print "<h1>Test Failed</h1>", $res->content; die $res->code;
}
print "<h1>Test passed</h1>\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment