lwp-request安装:
- wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/libwww-perl-6.03.tar.gz
-
tar zxvf libwww-perl-6.03.tar.gz
-
cd libwww-perl-6.03/bin
-
cp lwp-request /usr/bin/GET
-
或者编译安装
-
cd libwww-perl-6.03
-
perl Makefile.PL #安装not found perl包
-
make
-
make test #test all ok
-
make install
-
cd /usr/bin/;ls lwp-*
-
lwp-download lwp-dump lwp-mirror lwp-request
需要安装以下perl包:
use URI;
use URI::Heuristic qw(uf_uri);
use Encode;
use Encode::Locale;
use HTTP::Status qw(status_message);
use HTTP::Date qw(time2str str2time);
#cpan URI URI::Heuristic Encode Encode::Local HTTP::Status HTTP::Date
#So, to check whether a site sets cookies for a specific URL, just do:
- GET -Used http://example.com/ |grep ^Set-Cookie
阅读(2281) | 评论(0) | 转发(0) |