zoukankan      html  css  js  c++  java
  • perl 自动登录盈盈理财



    use  LWP::UserAgent;
    use HTTP::Date qw(time2iso str2time time2iso time2isoz);
    use Net::Ping;  
    use Socket;
    use Net::SMTP;
    use LWP;
    use LWP::Simple;
    use LWP::UserAgent;
    use HTTP::Cookies;
    use HTTP::Headers;
    use HTTP::Response;
    use Encode;
    use URI::Escape;
    use URI::URL;
    my $ua = LWP::UserAgent->new;
    $ua->timeout(5);
    $ua->env_proxy;
    $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);
    
    #$var='https://licai.yingyinglicai.com/index.htm';
    
    $var='https://licai.yingyinglicai.com/user/loginByPwd.do';
    my $response = $ua->get($var);
    
    
    if ($response->is_success) {
    }
    $var= $response->decoded_content;
    print "$var is $var
    ";
    
    ##<input type="hidden" id="token" name="token" value="7C84D7FD0889D23EAA8D266979552D2D"/>
    
    if ($var =~/.*token"s+value="(.*?)"/.*/)
    {print "$1 is $1
    ";
    $token=$1;
    };
    
     my $login_url = 'https://licai.yingyinglicai.com/user/loginByPwd.do';
                    
           my $res = $ua->post($login_url,{
                              'cell'=>1807xx237,
                              'password'=>80xx5,
                              'token'=>$token
                                                    });
         my $homepage; 
         # 判断响应头里面的location,确定是否登陆成功  
                                                                                                                                                                                                                                           print "---------------
    ";
          print $res->header('Location');
    
     $cc=$ua->get('http://licai.yingyinglicai.com/index.htm');
    print $cc->decoded_content;
     $dd=$ua->get('https://licai.yingyinglicai.com/safe/real_name_iden.htm');
    print $dd->decoded_content;


  • 相关阅读:
    sql语句中的一些常用语法
    torch_12_BigGAN全文解读
    torch_12_dataset和dataLoader,Batchnormalization解读
    torch_11_BEGAN
    torch_11_风格迁移和cycleGAN
    torch_10_stackGAN-V2
    torch_09_DCGAN_注意的细节
    torch_09_GAN
    pytorch-04-激活函数
    torch_07_卷积神经网络案例分析
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13351227.html
Copyright © 2011-2022 走看看