吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 16552|回复: 46
收起左侧

[Android 原创] 《动物餐厅》方法一--------------利用anyproxy

[复制链接]
wjmtgg 发表于 2019-12-20 21:56
再利用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');
//此处require  md5加密算法
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);


免费评分

参与人数 8吾爱币 +15 热心值 +7 收起 理由
枫舞何夕 + 1 + 1 2月7日 貌似失效了 设置参数之前都正常 但是代{过}{滤}理的情况下 进不去游.
qtfreet00 + 9 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
仓佑加错 + 1 + 1 谢谢@Thanks!
的了吗不呢 + 1 热心回复!
pumishuo + 1 谢谢@Thanks!
FleTime + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩!
祈福 + 1 + 1 谢谢@Thanks!
luanshils + 2 + 1 我很赞同!

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

wuzonghui 发表于 2019-12-21 15:34
[JavaScript] 纯文本查看 复制代码
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[str] = jiami(1, str);
                        }
                        for (var i = 1; i < 7; i++) {
                            var str = 'customer_unlock_booth_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_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);
2Burhero 发表于 2019-12-21 00:40
 楼主| wjmtgg 发表于 2019-12-20 21:59
鱼干一次最多一个亿   星星随便加   盘子20w用不完      顾客信件全解锁
w64180974 发表于 2019-12-20 23:54
出个详细教程吧老大
 楼主| wjmtgg 发表于 2019-12-21 09:51
2Burhero 发表于 2019-12-21 00:40
代码风格,排版太乱

哈哈哈哈    确实  
自己都能看晕来
头像被屏蔽
神秘高手Mars偉 发表于 2019-12-21 10:16
提示: 作者被禁止或删除 内容自动屏蔽
Xjl955666 发表于 2019-12-21 10:58
大佬发一篇详细的教程吧,小白一枚表示看不懂了。
tvrcfdfe 发表于 2019-12-21 12:53
haha  66666666666666666
Hegemonism 发表于 2019-12-21 13:35
支持一下,
温柔的笑 发表于 2019-12-21 14:03
看了几行,觉得有点想吐,晕
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-4-16 20:14

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表