7.6 C
Vancouver
Saturday, April 20, 2024

Getting https pages with Perl

Must read

Perl’s LWP package is a great way to get web pages and display the content of the resulting http header. Out of the box it does not support https, the following describes how to configure perl to access https pages.

Configure CPAN

The first thing to do is to setup perl to manage modules using CPAN. As root run:

perl -MCPAN -e shell \;

run through the configuration if you haven’t done so.

Install LWP

Inside the CPAN shell run:

install LWP
This will install all then necessary modules for accessing websites. Make sure you select y for GET, POST and HEAD, these are great scripts for getting at web page information from the command line.

Install OpenSSL

If you don’t have openssl-devel installed on your system you will need to install it. Check using:

rpm -q openssl-devel

Install openssl-devel with up2date:

up2date openssl-devel

Install Crypt-SSL

Install Crypt-SSL with perl:

perl -MCPAN -e shell \;

inside the shell run:

install Crypt::SSLeay

Test

GET https://www.markcallen.com

 

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article