perl 自动登陆网站发短信
来源:互联网 发布:java 接口变量 编辑:程序博客网 时间:2024/04/30 09:29
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;use URI::Escape; use File::Temp qw/tempfile/;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';my $response = $ua->get("http://121.52.220.246:8888/code.aspx");if ($response->is_success) { $r = $response->decoded_content; # print $response->decoded_content; # or whatever}else { die $response->status_line;};my ( $fh, $filename ) = tempfile( "sms_qrcode_XXXX", SUFFIX => ".jpg", DIR => 'c:\\' );binmode $fh;print $fh $r;close $fh;my $code=encode("gbk",decode("utf8",'请输入验证码'));print "$code.[ $filename ] \n";system("start $filename ");my $validCode = <STDIN>;chomp $validCode ;print "\$validCode is $validCode\n"; my $login_url = 'http://121.52.220.246:8888/chklogin.aspx'; my $res = $ua->post($login_url,{ 'account'=>'sc10624', 'action'=>'login', 'code'=>$validCode, 'password'=>'xx' }); my $content = $res->content(); print $res->status_line . "\n"; print "11111111111111111111\n"; print $res->as_string(); print "11111111111111111111\n"; my $Sign=uri_escape('【中均】');#http://121.52.220.246:8888/checkkeyword.aspx?action=add my $str=(rand(1)); my $login_url = 'http://121.52.220.246:8888/checkkeyword.aspx?action=add'; my $res = $ua->post($login_url,{ 'content'=>uri_escape('ABCDEFG'), 'keySign'=>"$str" });print encode("gbk",decode("utf8",$res->as_string())); my $login_url = 'http://121.52.220.246:8888/submitsms.aspx';#%E3%80%90%E4%B8%AD%E5%9D%87%E3%80%91 my $res = $ua->post($login_url,{ 'mobile'=>18072xx, 'mobilenumber'=>1, 'telephonenumber'=>0, 'iscall'=>1, 'msgcontent'=>uri_escape('ABCDEFG'), 'checkcontent'=>1, 'countnumber'=>1, 'usign'=>'【中均】', 'useUserSign'=>1, 'forceID'=>'undefined'}, 'User-Agent'=>'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0', 'Host'=>'121.52.220.246:8888', 'Referer'=>'http://121.52.220.246:8888/send.aspx','X-Requested-With'=>'XMLHttpRequest' ); my $content = $res->content(); print encode("gbk",decode("utf8",$content)); print $res->status_line . "\n"; print encode("gbk",decode("utf8",$res->as_string()));
0 0
- perl 自动登陆网站发短信
- perl 自动发邮件
- perl 自动发产品
- 自动发短信
- 自动发短信
- perl通过网关发短信程序
- 可以自动发短信了
- 自动登陆网站
- 网站通过移动网关发短信
- 在线发短信网站的程序讲解
- PHP网站发短信到手机
- 在线发短信网站的程序讲解
- 调用发短信功能,收件人自动填充
- 自动发短信的手机应用
- 直接/间接调用手机自动发短信。
- [Object-C]第三方微信登陆需要"发短信"
- 发短信
- 发短信
- Java集合类库 ArrayList 源码解析
- C#控制台 foreach 与引用型数组配合可以改变变量
- c语言中利用rand()time()srand()....产生随机数【4-5】猜数游戏
- Centos6 rpm 安装mysql5.5
- linux下查看最消耗CPU、内存的进程
- perl 自动登陆网站发短信
- 解决了一个butterknife,报空指针的bug
- 关于微信第三方授权登陆 使用code获取token时返回40029
- COCI2014/2015 Contest#2 F Solution
- TCP/IP编程之listen函数详解
- 初学ML笔记N0.3——凸优化、拉格朗日对偶
- 剑指offer面试题12 使用BigInteger来实现 打印1到最大的n位数
- HOG特征
- bzoj3158 千钧一发