mirror of
https://github.com/thegeneralist01/twitter-tid-deobf-fork
synced 2026-01-11 15:40:28 +01:00
fix
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
e43786b4b8
commit
02f85eda52
2 changed files with 44 additions and 5 deletions
25
.github/workflows/daily.yaml
vendored
25
.github/workflows/daily.yaml
vendored
|
|
@ -12,7 +12,7 @@ permissions:
|
|||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
run-commands:
|
||||
run-commands1:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
|
@ -31,6 +31,29 @@ jobs:
|
|||
JSON_URL: "https://raw.githubusercontent.com/fa0311/TwitterInternalAPIDocument/refs/heads/develop/docs/json/ScriptLoadJson.json"
|
||||
run: curl -s $JSON_URL | jq -r '.["ondemand.s"]' | xargs curl -s -o source/a.js
|
||||
|
||||
- name: Commit
|
||||
continue-on-error: true
|
||||
run: |
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "GitHub Action"
|
||||
git add .
|
||||
git commit -m "Update"
|
||||
git push origin main
|
||||
|
||||
run-commands2:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run deobfuscation scripts
|
||||
run: npm run run2
|
||||
|
||||
|
|
|
|||
24
deobf.js
24
deobf.js
|
|
@ -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) {}
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue