腾讯WEB登陆协议p值算法,node.js编写,下面是服务端源码,算法请自行去github下载
var http = require('http');
var RequestUrl = require('url');
var login = require('./login');
http.createServer(function (request, response) {
var obj = RequestUrl.parse(request.url, true);
var get = obj.query;
if (get.uin == undefined || get.uin == '') {
response.end('uin is null!');
}
if (get.pwd == undefined || get.pwd == '') {
response.end('pwd is null!');
}
if (get.vcode == undefined || get.vcode == '') {
response.end('vcode is null!');
}
var uin = get.uin;
var pwd = get.pwd;
var vcode = get.vcode;
response.writeHeader(200, { "Content-type": "text/html;charset=utf8" })
try {
var p = login.getmd5(uin, pwd, vcode);
response.write(p);
} catch (err) {
response.write(err.toString());
}
response.end();
}).listen(1234);//端口号
版权属于:青城
本文链接:https://cloud.tencent.com/developer/article/1860309
转载时须注明出处及本声明
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有