mirror of
https://github.com/thegeneralist01/twitter-tid-deobf-fork
synced 2026-01-09 23:00:26 +01:00
parent
b498b6e6e4
commit
f0ed3a9f2c
1 changed files with 5 additions and 26 deletions
31
deobf.js
31
deobf.js
|
|
@ -434,28 +434,12 @@ const deobfStrings = {
|
||||||
}
|
}
|
||||||
code += generate(binding.path.node).code + "\n";
|
code += generate(binding.path.node).code + "\n";
|
||||||
path.scope.crawl();
|
path.scope.crawl();
|
||||||
for (const body of binding.path.node.body.body) {
|
binding = binding.path.scope.getBinding(
|
||||||
if (body.type == "ReturnStatement") {
|
binding.path.node.body.body[0].argument.callee.name
|
||||||
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
|
// ! now we should have all the code we need
|
||||||
try {
|
path.replaceWith(t.valueToNode(vm.runInContext(code, decryptFuncCtx)));
|
||||||
path.replaceWith(t.valueToNode(vm.runInContext(code, decryptFuncCtx)));
|
|
||||||
} catch (e) {}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -556,9 +540,6 @@ const objDeobfMemberExpr = {
|
||||||
key = node.property.value;
|
key = node.property.value;
|
||||||
}
|
}
|
||||||
let value = map[key];
|
let value = map[key];
|
||||||
if (value === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (value.type == "StringLiteral") {
|
if (value.type == "StringLiteral") {
|
||||||
path.replaceWith(value);
|
path.replaceWith(value);
|
||||||
return;
|
return;
|
||||||
|
|
@ -596,9 +577,6 @@ const objDeobfMemberExpr = {
|
||||||
key = node.callee.property.value;
|
key = node.callee.property.value;
|
||||||
}
|
}
|
||||||
let value = map[key];
|
let value = map[key];
|
||||||
if (value === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// ! replace functions
|
// ! replace functions
|
||||||
let retNode = value.body.body[0].argument;
|
let retNode = value.body.body[0].argument;
|
||||||
// ! call expression
|
// ! call expression
|
||||||
|
|
@ -641,6 +619,7 @@ const objDeobfMemberExpr = {
|
||||||
function evalValue(left, right, op) {
|
function evalValue(left, right, op) {
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case "===":
|
case "===":
|
||||||
|
return left == right;
|
||||||
case "!==":
|
case "!==":
|
||||||
return left != right;
|
return left != right;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue