tableplus deviceID获取
### tableplus deviceID盲猜是md5用frida hook cc_md5
```
Interceptor.attach(Module.findExportByName(null, 'CC_MD5'), {
onEnter: function (args) {
console.log("[+] --------------------------------------------------------------");
try {
const deviceid_ram = Memory.readUtf8String(args, args.toInt32());
LOG("[+] args: " + deviceid_ram);
onLeave: function (retval) {
// retval == args
var ByteArray = Memory.readByteArray(ArgPtr, 16);
var uint8Array = new Uint8Array(ByteArray);
var str = "";
for (var i = 0; i < uint8Array.length; i++) {
var hextemp = (uint8Array.toString(16))
if (hextemp.length == 1) {
hextemp = "0" + hextemp
}
str += hextemp;
}
LOG("[+] MD5 Hash: " + str);
}
});
```
从显示看出md5的参数是有一个网卡mac地址+序列号生成的,
类似这样11:11:11:11:11:11abcdefabcdef
- mac地址获取
```
ifconfig en0 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'
```
- 序列号获取
```
system_profiler SPHardwareDataType | grep Serial
```
deviceID = md5(mac+Serial) 3c:06:30:30:7d:35C02G64QMQ05D
88548E5A38EEEE04E89C5621BA04BC7E
跟我 hook 出来的一样, 没问题
页:
[1]