use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Headers;
use HTTP::Response;
use Encode;
use File::Temp qw/tempfile/;
my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 }, );;
$ua->timeout(10);
$ua->env_proxy;
my $now = time();
$ua->agent("Mozilla/8.0");
my $cookie_jar = HTTP::Cookies->new( file => 'lwp_cookies.txt',
autosave => 1,
ignore_discard => 1
);
$ua->cookie_jar($cookie_jar);
my $str=(rand(1));
#system ("del/f/s/q c:\wj_qrcod*.jpg");
my $response = $ua->get("https://www.zjtest2.com/validcode/generate-validcode.do?$str"); print "\$str is $str\n";
if ($response->is_success) {
$r = $response->decoded_content;
# print $response->decoded_content; # or whatever
}
else {
print $response->decoded_content;
die $response->status_line;
}; my ( $fh, $filename ) =
tempfile( "wj_qrcode_XXXX", SUFFIX => ".jpg", DIR => 'c:\\' );
binmode $fh;
print $fh $r;
close $fh;
print "登录二维码已经下载到本地 [ $filename ] \n"; ##打开图片
system("start $filename "); my $validCode = <STDIN>;
chomp $validCode ;
print "\$validCode is $validCode\n"; #my $url="https://www.zjtest2.com/business/dispatch_post.do"; my $login_url = 'https://www.zjtest2.com/business/dispatch_post.do'; my $res = $ua->post($login_url,{
'action'=>'doLogin',
'userName'=>'kevin',
'followId'=>'',
'userPass'=>'3d24b838770ee90773804e8599e549ff',
'validCode'=> "$validCode"
});
print "---------------\n"; my $head =$res->header('Location');
print $res->header('Location');
print "\n"; print $res->status_line."\n";
print $res->as_string();#获取的是原始内容,包括响应头,响应正文 my $content=$res->content();
print $res->content(); #获取的是响应正文 my $spool = encode("gbk",decode("utf8","$content"));
print "\$spool is $spool\n";
print "\n"; my $response = $ua->get("$head");
if ($response->is_success) {
print $response->content;
$r = $response->content; $str=encode("gbk",decode("utf8","$r"));
print "\$str is $str\n"; }else{ $r = $response->content;
print $response->content; }; my $url="https://www.zjtest2.com/business/dispatch_get.do?action=doDeposit";
my $response = $ua->get("$url");
if ($response->is_success) {
print $response->content;
$r = $response->content; $str=encode("gbk",decode("utf8","$r"));
print "\$str is $str\n"; }else{ $r = $response->content;
print $response->content; }; while(1==1){ ##转入2级市场现金现金
##https://www.zjtest2.com/web/auth?method=%2Fwze%2Ftransfer%2Fcash%2Fin&amount=1&tradePassword=79e8fe923f031f46221a9283d0c9263a&_=1460426257542
##1460426541
my $now = time();
my $url="https://www.zjtest2.com/web/auth?method=%2Fwze%2Ftransfer%2Fcash%2Fin&amount=2&tradePassword=3d24b838770ee90773804e8599e549ff&_=$now";
my $response = $ua->get("$url");
if ($response->is_success) {
print $response->content;
$r = $response->content; $str=encode("gbk",decode("utf8","$r"));
print "\$str is $str\n"; }else{ $r = $response->content;
print $response->content; }; ###转出到1级市场现金
##https://www.zjtest2.com/web/auth?method=%2Fwze%2Ftransfer%2Fcash%2Fin&amount=2&tradePassword=3d24b838770ee90773804e8599e549ff&_=1460441529452
###https://www.zjtest2.com/web/auth?method=%2Fwze%2Ftransfer%2Fcash%2Fout&amount=2&tradePassword=79e8fe923f031f46221a9283d0c9263a&_=$now my $url="https://www.zjtest2.com/web/auth?method=%2Fwze%2Ftransfer%2Fcash%2Fout&amount=2&tradePassword=3d24b838770ee90773804e8599e549ff&_=$now";
my $response = $ua->get("$url");
if ($response->is_success) {
print $response->content;
$r = $response->content; $str=encode("gbk",decode("utf8","$r"));
print "\$str is $str\n"; }else{ $r = $response->content;
print $response->content; }; };

perl lwp关闭ssl校验的更多相关文章

  1. haproxy 关闭ssl 3.0 加密

    global log 127.0.0.1 local3 maxconn 65535 chroot /usr/local/haproxy uid 500 gid 500 daemon ssl-defau ...

  2. 关闭SSL证书验证

    转载 Python3之关闭SSL证书验证 转载 Python requests 移除SSL认证,控制台输出InsecureRequestWarning取消方法 报错信息: Traceback (mos ...

  3. vue项目关闭eslint校验

    [前言] eslint是一个JavaScript的校验插件,通常用来校验语法或代码的书写风格.这篇文章主要介绍了vue项目关闭eslint校验,需要的朋友可以参考下 [主体] 简介eslint esl ...

  4. 用vue ui创建的项目怎么关闭eslint校验

    在Vue Cli的控制面板找到配置-ESLint configuration,然后关闭保存时检查就可以了

  5. perl lwp 超时问题

    lwp 超时问题: jrhmpt01:/root/async# cat a1.pl use LWP::UserAgent; use utf8; use DBI; use POSIX; use Data ...

  6. perl lwp 默认的请求头

    </pre><pre name="code" class="html">[root@dr-mysql01 ~]# cat getx.pl ...

  7. perl lwp 获取请求头

    <pre name="code" class="html">[root@dr-mysql01 ~]# cat getx.pl use LWP::Us ...

  8. perl LWP::UserAgent获取源码与响应

    #!/usr/bin/perl -w use strict; use LWP::UserAgent; my $useragent = new LWP::UserAgent; my $url = 'ht ...

  9. 关闭SSL服务[iRedMail]

    相信有很多朋友接触并使用地iRedMail这个软件了, 其强大的邮件收发功能, 垃圾及病毒检索能力自不用说了. 其自身携带的dovecot组件提供的SSL也足以使人们对这个软件侧目, 但是正是由于这个 ...

随机推荐

  1. Deep Learning(深度学习)学习笔记整理系列之(六)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  2. VSS的配置和使用

    目录:   〇. 摘要一. 开发前的准备二. 创建空的SourceSafe数据库三. 新建项目并加入版本控制四. 获取SourceSafe中的项目五. 版本控制的几个概念六. 版本控制项目的管理七. ...

  3. Windows窗体Winform----show()与showDialog()的区别

    show()与showDialog()的区别 最常见的显示一个新的窗体的方法有两种,下面直接上代码!! A.WinForm中窗体显示 显示窗体可以有以下2种方法:   Form.ShowDialog( ...

  4. hadoop搭建杂记:Linux下ssh免密码登陆

    关于ssh免密码登陆的问题 关于ssh免密码登陆的问题 linux下可以用ssh-keygen来生成公钥/私钥对 ①生成id_rsa和id_rsa.pub公钥/私钥对,自动在~/.ssh下生成文件(亦 ...

  5. 【转】Centos 设置IP地址的几种方式

    对于很多刚刚接触linux的朋友来说,如何设置linux系统的IP地址,作为第一步,下面小编以centos系统为例,给大家演示如何给centos设置IP地址,如何修改linux 系统IP地址? 查看I ...

  6. 使用 http://httpbin.org/ 验证代理地址

    发现一个很方便的工具,在Linux 下使用  curl  http://httpbin.org/   可以返回当前使用的一些网络信息

  7. C语言负数的除法和求余运算

    假定我们让 a 除以 b,商为 q,余数为 r: q = a / b; r = a % b; 这里,不妨假定 b 大于 0. 我们希望 a.b.q.r 之间维持怎样的关系呢? 1.最重的一点,我们希望 ...

  8. MYSQL group_concat() 函数

    看来看一下表中的数据 select * from t; 下一步来看一下group_concat函数的用法 select ID,group_concat(Name) from t group by ID ...

  9. ODI中的CDC

    ODI中的CDC是通过一组所谓的日志知识模块(Journal Knowledge Module,JKM)实现的,在项目中加在了这些模块后,就可以在接口设计时选择全量数据,还是变化数据.   ODI共提 ...

  10. NPO贴片电容容量范围对照表

    NPO贴片电容简述 NPO(COG)贴片电容属于Class 1温度补偿型电容.它的容量稳定,几乎不随温度.电压.时间的变化而变化.尤其适用于高频电子电路. NPO(COG)贴片电容特性 具有最高的电容 ...