GET URL:
https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?
ticket=AazAjnUKYDH8jZJMoCSzTHvD@qrticket_0
&uuid=4fVPJo_Jkw==
&lang=zh_CN
&scan=1454072830
&fun=new
&version=v2
参数:
fun new
lang zh_CN
scan 1454072830
ticket AazAjnUKYDH8jZJMoCSzTHvD@qrticket_0
uuid 4fVPJo_Jkw==
version v2
响应:
<error><ret>0</ret><message>OK</message><skey>@crypt_597aeefd_95352fe37541ae84f1c15b4d8a86e710</skey
><wxsid>zJpU4C7YK9KeMmQ0</wxsid><wxuin>1284510822</wxuin><pass_ticket>ovyLkGVM8W6lUAbZpt%2BhgJdeomQYRPOu8yf6FkW
%2B7GE5Meq4S3qn4Qz%2FQyD64vsD</pass_ticket><isgrayscale>1</isgrayscale></error>
skey @crypt_597aeefd_95352fe37541ae84f1c15b4d8a86e710
wxsid zJpU4C7YK9KeMmQ0
wxuin 1284510822
pass_ticket ovyLkGVM8W6lUAbZpt%2BhgJdeomQYRPOu8yf6FkW%2B7GE5Meq4S3qn4Qz%2FQyD64vsD
perl 程序:
my $api="https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=$ticket&uuid=$uuid&lang=zh_CN&scan=$user&fun=new&version=v2&lang=zh_CN";
if ($r =~/<error.*<skey>(.*?)</skey><wxsid>(.*?)</wxsid><wxuin>(.*?)</wxuin><pass_ticket>(.*?)</pass_ticket.*/)
获取deviceid:
my $a = "e";
for(my $b = 0;15 > $b;$b++){
$a .= POSIX::floor(10 * rand());
};
$DeviceID=$a;