1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| import frida import sys
rdev = frida.get_remote_device()
session = rdev.attach("车智赢+")
scr = """ Java.perform(function () { // 包.类 var LaunchModel = Java.use("com.che168.autotradercloud.launch.model.LaunchModel");
// Hook,替换 LaunchModel.lambda$initRequestCommonParams$0.implementation = function(i,treeMap){ console.log("执行了,参数:",treeMap); console.log("执行了,参数,转成字符串,更好看:",treeMap.toString()); console.log("执行了,参数,i:",i); // 执行原来的方法 var res = this.lambda$initRequestCommonParams$0(i,treeMap); console.log("执行了,返回值:",res); console.log("执行了,参数:",res.toString()); return res; } }); """
script = session.create_script(scr)
script.load() sys.stdin.read()
''' 执行了,参数,转成字符串,更好看: {pwd=fcea920f7412b5da7be0cf42b8c93759, username=18953675222} 执行了,参数,i: 1 执行了,参数: {_appid=atc.android, _sign=A440920EEAA62E8275643B417B370EE8, appversion=3.37.0, channelid=csy, pwd=fcea920f7412b5da7be0cf42b8c93759, udid=iEavSW4QycaRf6qULa18YDJEOmuw10SBwdVu62EN/19ClE+3LfYj23uQsd2i 3/hlcXoUytJ2Px89TxWA/PbLgw==, username=18953675222}
# 一开始只有: pwd=fcea920f7412b5da7be0cf42b8c93759, username=18953675222 #####经过方法后,放入了#### _appid=atc.android, appversion=3.37.0, channelid=csy, udid=iEavSW4QycaRf6qULa18YDJEOmuw10SBwdVu62EN/19ClE+3LfYj23uQsd2i 3/hlcXoUytJ2Px89TxWA/PbLgw==, ###把上面这一堆,使用 SignManager.INSTANCE.signByType(i, treeMap) 加密了,得到结果,放到了字典中 i 是1,treeMap是上面所有,不包含_sign _sign=A440920EEAA62E8275643B417B370EE8,
'''
|