清理 z, 删除 setFunctionNamesIfNecessary

This commit is contained in:
shenjack 2024-03-04 00:19:03 +08:00
parent 93674c6f9e
commit b7421ffc89
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 28 additions and 29 deletions

36
md5.js
View File

@ -15,36 +15,18 @@
} }
} }
var z = function () { var z = function () {
var s = function () { } // checkEnvironment
s.prototype = { if (typeof navigator !== "undefined" && navigator.userAgent.includes("Chrome/")) {
p: {} return true;
} }
var r = new s()
if (!(r.__proto__ && r.__proto__.p === s.prototype.p)) return false
try {
if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0) return true
if (typeof version == "function" && version.length == 0) {
var q = version()
if (/^\d+\.\d+\.\d+\.\d+$/.test(q)) return true
}
} catch (p) { }
return false
}()
function setFunctionNamesIfNecessary(a) { if (typeof version === "function" && version.length === 0 && /^\d+\.\d+\.\d+\.\d+$/.test(version())) {
function t() { }; return true;
if (typeof t.name == "string") return
for (var s = 0; s < a.length; s++) {
var r = a[s]
var q = Object.keys(r)
for (var p = 0; p < q.length; p++) {
var o = q[p]
var n = r[o]
if (typeof n == "function") n.name = o
}
}
} }
return false;
}()
function inherit(a, b) { function inherit(a, b) {
a.prototype.constructor = a a.prototype.constructor = a
a.prototype["$i" + a.name] = a a.prototype["$i" + a.name] = a
@ -243,7 +225,6 @@
lazyOld: lazyOld, lazyOld: lazyOld,
updateHolder: updateHolder, updateHolder: updateHolder,
convertToFastObject: convertToFastObject, convertToFastObject: convertToFastObject,
setFunctionNamesIfNecessary: setFunctionNamesIfNecessary,
updateTypes: updateTypes, updateTypes: updateTypes,
setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag,
setOrUpdateLeafTags: setOrUpdateLeafTags setOrUpdateLeafTags: setOrUpdateLeafTags
@ -8252,7 +8233,6 @@
} }
} }
var w = [A, C, F, H, J, L, M, O, P, Q, S, T, V, W, X, Y, Z] var w = [A, C, F, H, J, L, M, O, P, Q, S, T, V, W, X, Y, Z]
hunkHelpers.setFunctionNamesIfNecessary(w)
var $ = {} var $ = {}
H.m8.prototype = {} H.m8.prototype = {}
J.af.prototype = { J.af.prototype = {

19
readme.md Normal file
View File

@ -0,0 +1,19 @@
# 某个游戏的 js 的逆向工程
## `md5.js`
- [ ] 清理所有空函数
- `function [a-zA-Z0-9]*\(\) \{ \}`
- 0/202
- [x] 清理 `setFunctionNamesIfNecessary`
- [ ] And more
## `index.dart.js`
- [ ] 清理所有空函数
- `function [a-zA-Z0-9]*\(\) \{ \}`
- 0/177
- [ ] And more