File: get_page.pl

package info (click to toggle)
libnet-ssleay-perl 1.80-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,828 kB
  • ctags: 926
  • sloc: perl: 6,018; makefile: 3
file content (20 lines) | stat: -rwxr-xr-x 507 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl
# 8.6.1998, Sampo Kellomaki <sampo@iki.fi>
# Get a page via HTTP and print some info about it.

use Net::SSLeay;

($site, $port, $path) = @ARGV;
die "Usage: ./get_page.pl www.cryptsoft.com 443 /\n" unless $path;

($page, $result, %headers) = &Net::SSLeay::get_https($site, $port, $path);

print "Result was `$result'\n";
foreach $h (sort keys %headers) {
    print "Header `$h'\tvalue `$headers{$h}'\n";
}

print "=================== Page follows =================\n";
print $page;

__END__