由于要使用到https登录,所以要安装Crypt::SSLeay,
一、linux下安装
在Ubuntu的源里有libcrypt-ssleay-perl模块的,直接
$sudo apt-get install libcrypt-ssleay-perl
就OK,开始不知道,还要下载来自己安装,浪费时间,在此感谢CU上的dajun。
二、在win下安装
C:\Perl\bin>ppm-shell
ppm 4.01
Copyright (C) 2007 ActiveState Software Inc. All rights reserved.
ppm> install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd
Downloading Crypt-SSLeay-0.53...done
Unpacking Crypt-SSLeay-0.53...done
Generating HTML for Crypt-SSLeay-0.53...done
Updating files in site area...done
Downloading Crypt-SSLeay-0.53 install script...done
Running Crypt-SSLeay-0.53 install script...
**************************************************************************
This software package uses strong cryptography, so even if it is created,
maintained and distributed from countries where it is legal to do this,
it falls under certain export/import and/or use restrictions in some
other parts of the world.
PLEASE REMEMBER THAT EXPORT/IMPORT AND/OR USE OF STRONG CRYPTOGRAPHY
SOFTWARE, PROVIDING CRYPTOGRAPHY HOOKS OR EVEN JUST COMMUNICATING
TECHNICAL DETAILS ABOUT CRYPTOGRAPHY SOFTWARE IS ILLEGAL IN SOME PARTS
OF THE WORLD. SO, WHEN YOU IMPORT THIS PACKAGE TO YOUR COUNTRY,
RE-DISTRIBUTE IT FROM THERE OR EVEN JUST EMAIL TECHNICAL SUGGESTIONS
OR EVEN SOURCE PATCHES TO THE AUTHOR OR OTHER PEOPLE YOU ARE STRONGLY
ADVISED TO PAY CLOSE ATTENTION TO ANY EXPORT/IMPORT AND/OR USE LAWS
WHICH APPLY TO YOU. THE AUTHORS OF OPENSSL ARE NOT LIABLE FOR ANY
VIOLATIONS YOU MAKE HERE. SO BE CAREFUL, IT IS YOUR RESPONSIBILITY.
CREDIT INFORMATION: This product includes cryptographic software
written by Eric A. Young (
[email protected]). This product
includes software written by Tim J. Hudson (
[email protected]).
**************************************************************************
Proceed with installation? [yes] yes
A copy of the needed library ssleay32.dll was found in
C:\WINDOWS\system32\ssleay32.dll. If this is compatible with the version (0.9.8a
)
used to compile the Perl module, all that is needed to
complete the installation is to ensure
C:\WINDOWS\system32\ssleay32.dll is in your PATH environment variable.
Fetch ssleay32.dll? [no] no
Aborting download of ssleay32.dll.
done
13 files installed
ppm>
在linux下如果源没有此模块,就要自己去下载安装,不过好象我不成功,
n3tl04d@security:~/Crypt-SSLeay-0.57$ sudo apt-get install libssl-dev
n3tl04d@security:~$ wget http://www.perl.org/CPAN/authors/id/D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz
--2009-08-16 17:07:49-- http://www.perl.org/CPAN/authors/id/D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz
正在解析主机 www.perl.org... 207.171.7.63
正在连接 www.perl.org|207.171.7.63|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 301 Moved Permanently
位置:http://www.cpan.org/authors/id/D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz [跟随至新的 URL]
--2009-08-16 17:07:50-- http://www.cpan.org/authors/id/D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz
正在解析主机 www.cpan.org... 66.39.76.93
正在连接 www.cpan.org|66.39.76.93|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 122980 (120K) [application/x-tar]
保存到‘Crypt-SSLeay-0.57.tar.gz’
100%[======================================>] 122,980 57.9K/s in 2.1s
2009-08-16 17:07:52 (57.9 KB/s) - `Crypt-SSLeay-0.57.tar.gz' 已经保存 [122980/122980]
n3tl04d@security:~$ tar -zxvf Crypt-SSLeay-0.57.tar.gz
Crypt-SSLeay-0.57
Crypt-SSLeay-0.57/t
Crypt-SSLeay-0.57/Changes
Crypt-SSLeay-0.57/lib
Crypt-SSLeay-0.57/certs
Crypt-SSLeay-0.57/MANIFEST
Crypt-SSLeay-0.57/TODO
Crypt-SSLeay-0.57/typemap
Crypt-SSLeay-0.57/MANIFEST.SKIP
Crypt-SSLeay-0.57/eg
Crypt-SSLeay-0.57/SSLeay.pm
Crypt-SSLeay-0.57/SSLeay.xs
Crypt-SSLeay-0.57/README
Crypt-SSLeay-0.57/Makefile.PL
Crypt-SSLeay-0.57/META.yml
Crypt-SSLeay-0.57/eg/lwp-ssl-test
Crypt-SSLeay-0.57/eg/net-ssl-test
Crypt-SSLeay-0.57/certs/ca-bundle.crt
Crypt-SSLeay-0.57/certs/notacakeynopass.pem
Crypt-SSLeay-0.57/certs/notacacert.pem
Crypt-SSLeay-0.57/lib/Crypt
Crypt-SSLeay-0.57/lib/Net
Crypt-SSLeay-0.57/lib/Net/SSL.pm
Crypt-SSLeay-0.57/lib/Crypt/SSLeay
Crypt-SSLeay-0.57/lib/Crypt/SSLeay/MainContext.pm
Crypt-SSLeay-0.57/lib/Crypt/SSLeay/Conn.pm
Crypt-SSLeay-0.57/lib/Crypt/SSLeay/X509.pm
Crypt-SSLeay-0.57/lib/Crypt/SSLeay/Err.pm
Crypt-SSLeay-0.57/lib/Crypt/SSLeay/CTX.pm
Crypt-SSLeay-0.57/t/00-basic.t
Crypt-SSLeay-0.57/t/02-live.t
Crypt-SSLeay-0.57/t/01-connect.t
n3tl04d@security:~$ cd Crypt-SSLeay-0.57/
n3tl04d@security:~/Crypt-SSLeay-0.57$ ls
certs eg Makefile.PL MANIFEST.SKIP README SSLeay.xs TODO
Changes lib MANIFEST META.yml SSLeay.pm t typemap
n3tl04d@security:~/Crypt-SSLeay-0.57$ sudo perl Makefile.pl
[sudo] password for n3tl04d:
Can't open perl script "Makefile.pl": 没有该文件或目录
n3tl04d@security:~/Crypt-SSLeay-0.57$ sudo perl Makefile.PL
========================================================================
No installed SSL libraries found in any of the following places.
/local
/local/ssl
/opt/ssl
/usr
/usr/local
/usr/local/ssl
/usr/local/openssl
You will have to either specify a directory location at the following
prompt, or rerun the Makefile.PL program and use the --lib switch
to specify the path. If the path in question is considered standard
on your platform, please consider filing a bug report in order to
have it taken into account in a subsequent version of Crypt::SSLeay.
This host looks like it is running Debian. Crypt::SSLeay needs to
be compiled with C headers that the libssl-dev package makes
available. Please install that package before trying to build this
module. (You can always deinstall the package afterwards, once
Crypt::SSLeay has been built).
Which SSL install path do you want to use? /usr/local/ssl
/usr/local/ssl does not appear to be an SSL library installation, since
the required header files were not found. The build cannot proceed.
n3tl04d@security:~/Crypt-SSLeay-0.57$ sudo perl Makefile.PL