1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-tid-deobf-fork synced 2026-01-11 07:30:38 +01:00
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2025-01-26 14:00:16 +09:00
parent e43786b4b8
commit 02f85eda52
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
2 changed files with 44 additions and 5 deletions

View file

@ -434,12 +434,28 @@ const deobfStrings = {
}
code += generate(binding.path.node).code + "\n";
path.scope.crawl();
binding = binding.path.scope.getBinding(
binding.path.node.body.body[0].argument.callee.name
);
for (const body of binding.path.node.body.body) {
if (body.type == "ReturnStatement") {
if (body.argument.type == "CallExpression") {
binding = binding.path.scope.getBinding(body.argument.callee.name);
} else if (body.argument.type == "SequenceExpression") {
binding = undefined;
}
} else if (body.type == "VariableDeclaration") {
path.scope.crawl();
binding.scope.crawl();
binding = binding.path.scope.getBinding(
body.declarations[0].init.callee.name
);
code += generate(binding.path.node).code + "\n";
binding = undefined;
}
}
}
// ! now we should have all the code we need
path.replaceWith(t.valueToNode(vm.runInContext(code, decryptFuncCtx)));
try {
path.replaceWith(t.valueToNode(vm.runInContext(code, decryptFuncCtx)));
} catch (e) {}
},
};