《动物餐厅》方法一--------------利用anyproxy
再利用anyproxy《消灭病毒》之后,我又来发《动物餐厅》的anyproxy教程和代码了。------------------------------------------------------------------------
giao语:怎么说呢?
动物餐厅value是加密过的,
通过反编译源码查看加密函数如下
function jiami(e, t, i) {
i || (i = 100 + Math.floor(900 * Math.random()));
var o = e + 100 + i,
a = md5(o + id + t).toString();
return "t" + (a.charAt(17) + a.charAt(3) + a.charAt(27) + a.charAt(11) + a.charAt(23)) + i + e;
}
分析一下 jiami(990000,'money',123) 给money这个key加密value值为990000加三位随机数返回加密后字符串 格式是这样的tabcde123990000
-------------------------------------------------------------------------------
使用方法和我上一篇一样的就不过多介绍了。
有人不会的话我之后会出一篇教程吧。
-------------------------------------------------------------------------------
PS:这个方法算是个偷懒麻烦,当时懒得继续看源码找到sign加密方法,
就直接用anyproxy了。之后又研究了,找到了利用post请求的方法。
post请求的方法会在下一次发出来。
------------------------------------------------------------------------------
源码如下:
var http = require('http');
//此处requiremd5加密算法
var querystring = require('querystring');
var tmoney, tstar, pmoney, gk, xj, jnw;
const AnyProxy = require('anyproxy');
const options = {
port: 8001,
rule: {
summary: 'Rule to modify request data',
* beforeSendResponse(requestDetail, responseDetail) {
if (requestDetail.url.indexOf('downloadRecord') != -1) {
var newResponse = Object.assign({}, responseDetail.response)
var str = newResponse.body.toString();
var all = JSON.parse(str);
var re = JSON.parse(all.record);
var id = JSON.parse(re.openid).openid;
var rere = JSON.parse(re.recordItemBag);
function jiami(e, t, i) {
i || (i = 100 + Math.floor(900 * Math.random()));
var o = e + 100 + i,
a = md5(o + id + t).toString();
return "t" + (a.charAt(17) + a.charAt(3) + a.charAt(27) + a.charAt(11) + a.charAt(23)) + i + e;
}
try {
rere = { coin: { building_1_group: { incomeSum: tmoney, nodesCount: 3, endPos: { x: -500, y: 150 } } }, star: { building_1_group: { incomeSum: parseInt(10000) + parseInt(tstar), nodesCount: 4, endPos: { x: -200, y: 150 } }, building_2_group: { incomeSum: parseInt(-10000), nodesCount: 5, endPos: { x: -200, y: -150 } } } };
n = hex_md5(JSON.stringify(rere) + id);
rere.checkSign = n.charAt(9) + n.charAt(16) + n.charAt(7) + n.charAt(21) + n.charAt(22);
re.recordItemBag = JSON.stringify(rere);
} catch (err) { };
xj = parseInt(xj);
try {
if (xj != 0) {
mail = { mailList: ['mail_1', 'mail_2', 'mail_3', 'mail_4', 'mail_5', 'mail_6', 'mail_7', 'mail_8', 'mail_9', 'mail_10', 'mail_11', 'mail_12', 'mail_13', 'mail_14', 'mail_15', 'mail_16', 'mail_17', 'mail_18', 'mail_19', 'mail_20', 'mail_21', 'mail_22', 'mail_23', 'mail_24', 'mail_25', 'mail_26', 'mail_27', 'mail_28', 'mail_29', 'mail_30', 'mail_31', 'mail_32', 'mail_33', 'mail_34', 'mail_35', 'mail_36', 'mail_37', 'mail_38', 'mail_39', 'mail_40', 'mail_41', 'mail_42', 'mail_43', 'mail_44', 'mail_45', 'mail_46', 'mail_47', 'mail_48', 'mail_49', 'mail_50', 'mail_51', 'mail_52', 'mail_53', 'mail_54', 'mail_55', 'mail_56'] }
g = hex_md5(JSON.stringify(mail.mailList) + id);
mail.sign = g.charAt(17) + g.charAt(3) + g.charAt(27) + g.charAt(11) + g.charAt(23);
re.mailData = JSON.stringify(mail);
}
} catch (err) { };
try {
if (pmoney != 0) {
re.money_plate = jiami(parseInt(pmoney), 'money_plate');
}
} catch (err) { };
gk = parseInt(gk);
try {
if (gk != 0) {
for (var i = 1; i < 85; i++) {
var str = 'customer_unlock_customer_' + i;
re[str] = jiami(1, str);
}
for (var i = 1; i < 10; i++) {
var str = 'customer_unlock_npc_' + i;
re[str] = jiami(1, str);
}
re.customer_unlock_customer_spring_1 = jiami(1, 'customer_unlock_customer_spring_1');
re.customer_unlock_customer_spring_2 = jiami(1, 'customer_unlock_customer_spring_2')
re.customer_unlock_customer_summer_1 = jiami(1, 'customer_unlock_customer_summer_1')
re.customer_unlock_customer_summer_2 = jiami(1, 'customer_unlock_customer_summer_2')
re.customer_unlock_customer_autumn_1 = jiami(1, 'customer_unlock_customer_autumn_1')
re.customer_unlock_customer_autumn_2 = jiami(1, 'customer_unlock_customer_autumn_2')
re.customer_unlock_customer_community = jiami(1, 'customer_unlock_customer_community')
re.customer_unlock_customer_community2 = jiami(1, 'customer_unlock_customer_community2')
}
} catch (err) { };
all.record = JSON.stringify(re);
newResponse.body = JSON.stringify(all);
return { response: newResponse };
}
}
},
webInterface: {
enable: true,
webPort: 8002
},
throttle: 10000,
forceProxyHttps: true,
wsIntercept: false,
silent: false
};
const proxyServer = new AnyProxy.ProxyServer(options);
proxyServer.start();
var postHTML =
'<html><head><meta charset="utf-8"><title>Dong Wu Xiu Gai</title></head>' +
'<body>' +
'<form method="post">' +
'YuGan<input name="tmoney"><br>' +
'XingXing<input name="tstar"><br>' +
'PanZi<input name="pmoney"><br>' +
'GuKe<input name="gk"><br>' +
'XinJian<input name="xj"><br>' +
'<input type="submit">' +
'</form>' +
'</body></html>';
http.createServer(function (req, res) {
var body = "";
console.log(req.url);
req.on('data', function (chunk) {
body += chunk;
//console.log("chunk:",chunk);
});
req.on('end', function () {
body = querystring.parse(body);
console.log("body:", body);
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf8' });
if (body.tmoney) {
tmoney = body.tmoney;
console.log(tmoney);
};
if (body.tstar) {
tstar = body.tstar;
console.log(tstar);
};
if (body.pmoney) {
pmoney = body.pmoney;
console.log(pmoney);
};
if (body.gk) {
gk = body.gk;
};
if (body.xj) {
xj = body.xj;
};
if ((body.tstar) || (body.tmoney) || (body.pmoney)) { res.write('Success YuGan:' + tmoney + ',XingXing:' + tstar + ',PanZi:' + pmoney + ',XinJian:' + xj + ',GuKe' + gk + '.') } else { res.write(postHTML); };
res.end();
});
}).listen(8003);
var http = require('http');
var md5 = require('md5-node');
var hex_md5 = require('md5-node');
var querystring = require('querystring');
var tmoney, tstar, pmoney, gk, xj, jnw;
const AnyProxy = require('anyproxy');
const options = {
port: 8001,
rule: {
summary: 'Rule to modify request data',
*beforeSendResponse(requestDetail, responseDetail) {
if (requestDetail.url.indexOf('downloadRecord') != -1) {
var newResponse = Object.assign({},
responseDetail.response);
var str = newResponse.body.toString();
var all = JSON.parse(str);
var re = JSON.parse(all.record);
var id = JSON.parse(re.openid).openid;
var rere = JSON.parse(re.recordItemBag);
function jiami(e, t, i) {
i || (i = 100 + Math.floor(900 * Math.random()));
var o = e + 100 + i;
try {
var a = md5(o + id + t);
}
catch(err) {};
return "t" + (a.charAt(17) + a.charAt(3) + a.charAt(27) + a.charAt(11) + a.charAt(23)) + i + e;
}
try {
rere = {
coin: {
building_1_group: {
incomeSum: tmoney,
nodesCount: 3,
endPos: {
x: -500,
y: 150
}
}
},
star: {
building_1_group: {
incomeSum: parseInt(10000) + parseInt(tstar),
nodesCount: 4,
endPos: {
x: -200,
y: 150
}
},
building_2_group: {
incomeSum: parseInt( - 10000),
nodesCount: 5,
endPos: {
x: -200,
y: -150
}
}
}
};
n = hex_md5(JSON.stringify(rere) + id);
rere.checkSign = n.charAt(9) + n.charAt(16) + n.charAt(7) + n.charAt(21) + n.charAt(22);
re.recordItemBag = JSON.stringify(rere);
} catch(err) {};
xj = parseInt(xj);
try {
if (xj != 0) {
mail = {
mailList: ['mail_1', 'mail_2', 'mail_3', 'mail_4', 'mail_5', 'mail_6', 'mail_7', 'mail_8', 'mail_9', 'mail_10', 'mail_11', 'mail_12', 'mail_13', 'mail_14', 'mail_15', 'mail_16', 'mail_17', 'mail_18', 'mail_19', 'mail_20', 'mail_21', 'mail_22', 'mail_23', 'mail_24', 'mail_25', 'mail_26', 'mail_27', 'mail_28', 'mail_29', 'mail_30', 'mail_31', 'mail_32', 'mail_33', 'mail_34', 'mail_35', 'mail_36', 'mail_37', 'mail_38', 'mail_39', 'mail_40', 'mail_41', 'mail_42', 'mail_43', 'mail_44', 'mail_45', 'mail_46', 'mail_47', 'mail_48', 'mail_49', 'mail_50', 'mail_51', 'mail_52', 'mail_53', 'mail_54', 'mail_55', 'mail_56']
}
g = hex_md5(JSON.stringify(mail.mailList) + id);
mail.sign = g.charAt(17) + g.charAt(3) + g.charAt(27) + g.charAt(11) + g.charAt(23);
re.mailData = JSON.stringify(mail);
}
} catch(err) {};
try {
if (pmoney != 0) {
re.money_plate = jiami(parseInt(pmoney), 'money_plate');
}
} catch(err) {};
gk = parseInt(gk);
try {
if (gk != 0) {
for (var i = 1; i < 85; i++) {
var str = 'customer_unlock_customer_' + i;
re = jiami(1, str);
}
for (var i = 1; i < 7; i++) {
var str = 'customer_unlock_booth_customer_' + i;
re = jiami(1, str);
}
for (var i = 1; i < 10; i++) {
var str = 'customer_unlock_npc_' + i;
re = jiami(1, str);
}
re.customer_unlock_customer_spring_1 = jiami(1, 'customer_unlock_customer_spring_1');
re.customer_unlock_customer_spring_2 = jiami(1, 'customer_unlock_customer_spring_2');
re.customer_unlock_customer_summer_1 = jiami(1, 'customer_unlock_customer_summer_1');
re.customer_unlock_customer_summer_2 = jiami(1, 'customer_unlock_customer_summer_2');
re.customer_unlock_customer_autumn_1 = jiami(1, 'customer_unlock_customer_autumn_1');
re.customer_unlock_customer_autumn_2 = jiami(1, 'customer_unlock_customer_autumn_2');
re.customer_unlock_customer_winter_1 = jiami(1, 'customer_unlock_customer_winter_1');
re.customer_unlock_customer_winter_2 = jiami(1, 'customer_unlock_customer_winter_2');
re.customer_unlock_customer_community = jiami(1, 'customer_unlock_customer_community');
re.customer_unlock_customer_community2 = jiami(1, 'customer_unlock_customer_community2');
}
} catch(err) {};
all.record = JSON.stringify(re);
newResponse.body = JSON.stringify(all);
return {
response: newResponse
};
}
}
},
webInterface: {
enable: true,
webPort: 8002
},
throttle: 10000,
forceProxyHttps: true,
wsIntercept: false,
silent: false
};
const proxyServer = new AnyProxy.ProxyServer(options);
proxyServer.start();
var postHTML = '<html><head><meta charset="utf-8"><title>Dong Wu Xiu Gai</title></head>' + '<body>' + '<form method="post">' + 'YuGan<input name="tmoney"><br>' + 'XingXing<input name="tstar"><br>' + 'PanZi<input name="pmoney"><br>' + 'GuKe<input name="gk"><br>' + 'XinJian<input name="xj"><br>' + '<input type="submit">' + '</form>' + '</body></html>';
http.createServer(function(req, res) {
var body = "";
console.log(req.url);
req.on('data',
function(chunk) {
body += chunk;
//console.log("chunk:",chunk);
});
req.on('end',
function() {
body = querystring.parse(body);
console.log("body:", body);
res.writeHead(200, {
'Content-Type': 'text/html; charset=utf8'
});
if (body.tmoney) {
tmoney = body.tmoney;
console.log(tmoney);
};
if (body.tstar) {
tstar = body.tstar;
console.log(tstar);
};
if (body.pmoney) {
pmoney = body.pmoney;
console.log(pmoney);
};
if (body.gk) {
gk = body.gk;
};
if (body.xj) {
xj = body.xj;
};
if ((body.tstar) || (body.tmoney) || (body.pmoney)) {
res.write('Success YuGan:' + tmoney + ',XingXing:' + tstar + ',PanZi:' + pmoney + ',XinJian:' + xj + ',GuKe' + gk + '.')
} else {
res.write(postHTML);
};
res.end();
});
}).listen(8003); 代码风格,排版太乱 鱼干一次最多一个亿 星星随便加 盘子20w用不完 顾客信件全解锁 出个详细教程吧老大 2Burhero 发表于 2019-12-21 00:40
代码风格,排版太乱
哈哈哈哈 确实
自己都能看晕来 大佬发一篇详细的教程吧,小白一枚表示看不懂了。 {:1_911:} haha66666666666666666 支持一下, 看了几行,觉得有点想吐,晕