1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-tid-deobf-fork synced 2026-01-11 07:30:38 +01:00
This commit is contained in:
obfio 2023-12-04 02:11:18 -05:00 committed by GitHub
parent 8e05ef93f6
commit 9079320680
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 826 additions and 0 deletions

560
deobf.js Normal file
View file

@ -0,0 +1,560 @@
const fs = require('fs');
const t = require('@babel/types');
const parser = require('@babel/parser');
const traverse = require('@babel/traverse').default;
const generate = require('@babel/generator').default;
const vm = require('vm')
const {
readFileSync,
writeFile,
writeFileSync,
} = require("fs");
const {
exit
} = require('process');
var output = ""
let beautify_opts = {
comments: true,
minified: false,
concise: false,
}
const script = readFileSync('./source/a.js', 'utf-8');
const AST = parser.parse(script, {})
var decryptFuncCtx = vm.createContext();
var decryptCode = ""
var decryptFuncName = ""
const constantReplacer = {
VariableDeclarator(path) {
const {node} = path;
if(!node.id || !node.init || (node.init.type != "StringLiteral" && node.init.type != "NumericLiteral") || node.id.type != "Identifier") {
return
}
if((node.init.type == "NumericLiteral" && node.init.value == 0) || (node.init.type == "StringLiteral" && node.init.value == "")) {
return
}
let binding = path.scope.getBinding(node.id.name)
if(!binding) {
return
}
for(var i = 0; i < binding.referencePaths.length; i++) {
binding.referencePaths[i].replaceWith(node.init)
}
path.remove()
}
}
const replaceObjSimple = {
VariableDeclarator(path) {
const {node} = path;
if(!node.id || !node.init || node.init.type != "ObjectExpression" || node.id.type != "Identifier" || node.init.properties.length < 1) {
return
}
var valid = true
var map = {}
for(var i = 0; i < node.init.properties.length; i++) {
var prop = node.init.properties[i]
if(!prop.key || !prop.value || prop.key.type != "Identifier" || (prop.value.type != "NumericLiteral" && prop.value.type != "StringLiteral")) {
valid = false
break
}
map[prop.key.name] = prop.value
}
if(!valid) {
return
}
path.scope.crawl()
let binding = path.scope.getBinding(node.id.name)
if(!binding) {
return
}
for(var i = 0; i < binding.referencePaths.length; i++) {
let refPath = binding.referencePaths[i].parentPath
if(refPath.node.type != "MemberExpression" || !refPath.node.property) {
continue
}
let key;
if(refPath.node.property.type == "Identifier") {
key = refPath.node.property.name
} else{
key = refPath.node.property.value
}
refPath.replaceWith(map[key])
}
path.remove()
}
}
const replaceExprStmts = {
MemberExpression(path) {
const {node} = path;
if(!node.property || node.property.type != "SequenceExpression" || !node.property.expressions || node.property.expressions.length < 3) {
return
}
var callExprIndex = node.property.expressions.length-1
if(node.property.expressions[callExprIndex].type != "CallExpression") {
return
}
var values = []
var order = []
for(var i = 0; i < node.property.expressions.length; i++) {
var expr = node.property.expressions[i]
if(expr.type != "AssignmentExpression" || !expr.right || !expr.left) {
continue
}
values.push(generate(expr.right).code)
order.push(expr.left.name)
}
let newArgs = []
for(var i = 0; i < node.property.expressions[callExprIndex].arguments.length; i++) {
let arg = node.property.expressions[callExprIndex].arguments[i]
let str = generate(arg).code
if(str.match(/[A-z]/g) == null) {
newArgs.push(arg)
continue
}
let key = str.match(/[A-z]/g)[0]
let index = order.indexOf(key)
str = str.replace(key, values[index])
if(str.match(/[0-9]/g) != null && str.match(/[0-9]/g).length > 1 && !str.match(/[A-z"]/g)) {
newArgs.push(t.numericLiteral(eval(str)))
continue
}
str = str.slice(1)
str = str.slice(0, -1)
newArgs.push(t.stringLiteral(str))
}
path.replaceWith(t.memberExpression(node.object, t.callExpression(node.property.expressions[callExprIndex].callee, newArgs), true))
},
// ! same thing except ExpressionStatement, SequenceExpression
// ! example: (a = "7d]D", k = -497, m = -404, C = -368, uo(k - -1644, a - 298, a, m - 199, C - 208))
SequenceExpression(path) {
const {node} = path;
if(!node.expressions || node.expressions.length < 3) {
return
}
var callExprIndex = node.expressions.length-1
if(node.expressions[callExprIndex].type != "CallExpression") {
return
}
var values = []
var order = []
for(var i = 0; i < node.expressions.length; i++) {
var expr = node.expressions[i]
if(expr.type != "AssignmentExpression" || !expr.right || !expr.left) {
continue
}
values.push(generate(expr.right).code)
order.push(expr.left.name)
}
let newArgs = []
for(var i = 0; i < node.expressions[callExprIndex].arguments.length; i++) {
let arg = node.expressions[callExprIndex].arguments[i]
let str = generate(arg).code
if(str.match(/[A-z]/g) == null) {
newArgs.push(arg)
continue
}
let key = str.match(/[A-z]/g)[0]
let index = order.indexOf(key)
str = str.replace(key, values[index])
if(str.match(/[0-9]/g) != null && str.match(/[0-9]/g).length > 1 && !str.match(/[A-z"]/g)) {
newArgs.push(t.numericLiteral(eval(str)))
continue
}
str = str.slice(1)
str = str.slice(0, -1)
newArgs.push(t.stringLiteral(str))
}
path.replaceWith(t.callExpression(node.expressions[callExprIndex].callee, newArgs))
}
}
const replaceWeirdProxyCall = {
MemberExpression(path) {
const {node} = path;
if(!node.object || node.object.type != "Identifier" || !node.property || node.property.type != "CallExpression") {
return
}
if(!node.property.callee || node.property.callee.type != "FunctionExpression") {
return
}
let values = [generate(node.property.arguments[0]).code, generate(node.property.arguments[1]).code, generate(node.property.arguments[2]).code, generate(node.property.arguments[3]).code, generate(node.property.arguments[4]).code]
let order = [node.property.callee.params[0].name, node.property.callee.params[1].name, node.property.callee.params[2].name, node.property.callee.params[3].name, node.property.callee.params[4].name]
let newArgs = []
for(var i = 0; i < node.property.callee.body.body[0].argument.arguments.length; i++) {
let arg = node.property.callee.body.body[0].argument.arguments[i]
let str = generate(arg).code
if(str.match(/[A-z]/g) == null) {
newArgs.push(arg)
continue
}
let key = str.match(/[A-z]/g)[0]
let index = order.indexOf(key)
str = str.replace(key, values[index])
if(str.match(/[0-9]/g) != null && str.match(/[0-9]/g).length > 1&& !str.match(/[A-z"]/g)) {
newArgs.push(t.numericLiteral(eval(str)))
continue
}
str = str.slice(1)
str = str.slice(0, -1)
newArgs.push(t.stringLiteral(str))
}
path.replaceWith(t.memberExpression(node.object, t.callExpression(node.property.callee.body.body[0].argument.callee, newArgs), true))
}
}
const getStringDeobfFuncs = {
ExpressionStatement(path) {
const {node} = path;
if(!node.expression || node.expression.operator != "!" || !node.expression.prefix || !node.expression.argument || node.expression.argument.type != "CallExpression") {
return
}
// ! get array func
let binding = path.scope.getBinding(node.expression.argument.arguments[0].name)
if(!binding) {
return
}
decryptCode += generate(binding.path.node).code + "\n"
// ! get decrypt func
var bodyIndex = 0
for(var i = 0; i < node.expression.argument.callee.body.body.length; i++) {
if(node.expression.argument.callee.body.body[i].type == "FunctionDeclaration") {
bodyIndex = i
break
}
}
decryptFuncName = node.expression.argument.callee.body.body[bodyIndex].body.body[0].argument.callee.name
path.scope.crawl()
let binding1 = path.scope.getBinding(decryptFuncName)
if(!binding1){
return
}
decryptCode += generate(binding1.path.node).code + "\n"
decryptCode += generate(node).code + "\n"
binding1.path.remove()
binding.path.remove()
path.remove()
path.stop()
}
}
function makeid(length) {
let result = '';
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
const charactersLength = characters.length;
let counter = 0;
while (counter < length) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
counter += 1;
}
return result;
}
const replaceInterceptingFuncNames = {
FunctionDeclaration(path) {
const {node} = path;
if(!node.id || node.id.type != "Identifier" || node.id.name != decryptFuncName || !node.body || !node.body.body || node.body.body.length != 1) {
return
}
path.scope.crawl()
let binding = path.parentPath.scope.getBinding(node.id.name)
if(!binding) {
return
}
var ID = t.identifier(makeid(10))
for(var i = 0; i < binding.referencePaths.length; i++) {
binding.referencePaths[i].replaceWith(ID)
}
node.id = ID
}
}
const deobfStrings = {
CallExpression(path) {
const {node} = path;
if(!node.callee || node.callee.type != "Identifier" || !node.arguments || node.arguments.length < 2) {
return
}
var valid = true
for(var i = 0; i < node.arguments.length; i++) {
var arg = node.arguments[i]
let str = generate(arg).code
if(arg.type == "StringLiteral" || str == "NaN") {
continue
}
if(arg.type != "UnaryExpression" && arg.type != "BinaryExpression" && arg.type != "NumericLiteral") {
valid = false
break
}
if(str.match(/[A-z]/g) != null) {
valid = false
break
}
}
if(!valid) {
return
}
// ! the logic here is we want to get the function this is calling
// ! then we want to keep getting the nested function calls until we get to the final function, aka the decryptFuncName
let code = ""
path.scope.crawl()
let binding = path.scope.getBinding(node.callee.name)
if(!binding) {
// ! hopefully no binding will always mean that the function in question is `r`???
path.replaceWith(t.valueToNode(vm.runInContext(generate(node).code, decryptFuncCtx)))
return
}
// ! loop until we get to a place where we can't get a binding (aka hopefully the root function)
while(true){
if(!binding){
let a = generate(node).code
if(a[0] == decryptFuncName) {
a[0] = "asd"
}
code += a
break
}
code += generate(binding.path.node).code + "\n"
path.scope.crawl()
binding = binding.path.scope.getBinding(binding.path.node.body.body[0].argument.callee.name)
}
// ! now we should have all the code we need
path.replaceWith(t.valueToNode(vm.runInContext(code, decryptFuncCtx)))
}
}
const deobfuscateStringConcatVisitor = {
BinaryExpression(path) {
let {
confident,
value
} = path.evaluate();
if (!confident) return;
if (typeof value == "string") {
path.replaceWith(t.stringLiteral(value));
}
},
}
const getObfioObjs = {
VariableDeclarator(path) {
const {node} = path;
if(!node.id || node.id.type != "Identifier" || !node.init || node.init.type != "ObjectExpression" || !node.init.properties || node.init.properties.length < 1) {
return
}
// ! further validation, just incase
let map = {}
let valid = true
for (var i = 0; i < node.init.properties.length; i++) {
var prop = node.init.properties[i]
if (!prop.key || !prop.value || prop.key.type != "Identifier") {
valid = false
break;
}
if (prop.value.type != "FunctionExpression" && prop.value.type != "StringLiteral" && prop.value.type != "MemberExpression") {
valid = false
break;
}
if (prop.key.name.length != 5) {
valid = false
break;
}
if (prop.value.type == "FunctionExpression" && prop.value.body.body[0].type != "ReturnStatement") {
valid = false
break;
}
map[prop.key.name] = prop.value
}
if (!valid) {
return
}
path.scope.crawl()
let binding = path.scope.getBinding(node.id.name)
if(!binding) {
return
}
var ID = t.identifier(makeid(20))
for(var i = 0; i < binding.referencePaths.length; i++) {
binding.referencePaths[i].replaceWith(ID)
}
obfioObjMap[ID.name] = map
path.remove()
}
}
function getArgs(arguments, cutFirst) {
var out = []
for (var i = cutFirst ? 1 : 0; i < arguments.length; i++) {
out.push(arguments[i])
}
return out
}
const objDeobfMemberExpr = {
MemberExpression(path) {
const {
node
} = path;
if (!node.object || !node.property || node.object.type != "Identifier" || !obfioObjMap[node.object.name]) {
return
}
let map = obfioObjMap[node.object.name]
let key;
if (node.property.type == "Identifier") {
key = node.property.name
} else {
key = node.property.value
}
let value = map[key]
if (value.type == "StringLiteral") {
path.replaceWith(value)
return
}
if (value.type == "MemberExpression") {
map = obfioObjMap[value.object.name]
if (value.property.type == "Identifier") {
key = value.property.name
} else {
key = value.property.value
}
value = map[key]
path.replaceWith(value)
return
}
output += `FAILED (1): ${generate(node).code}\n\n`
},
CallExpression(path) {
const {
node
} = path;
if (!node.callee || node.callee.type != "MemberExpression" || !node.callee.object || !node.callee.property || node.callee.object.type != "Identifier" || !obfioObjMap[node.callee.object.name]) {
return
}
let map = obfioObjMap[node.callee.object.name]
let key;
if (node.callee.property.type == "Identifier") {
key = node.callee.property.name
} else {
key = node.callee.property.value
}
let value = map[key]
// ! replace functions
let retNode = value.body.body[0].argument
// ! call expression
if (retNode.type == "CallExpression") {
var callExprID;
// ! check if it's a reference to another object
if (retNode.callee.type == "MemberExpression") {
callExprID = retNode.callee
} else {
callExprID = node.arguments[0]
}
var args = []
if (node.arguments.length > 1 || retNode.callee.type == "MemberExpression") {
args = getArgs(node.arguments, retNode.callee.type != "MemberExpression")
}
path.replaceWith(t.callExpression(callExprID, args))
return
}
// ! BinaryExpression
if (retNode.type == "BinaryExpression") {
path.replaceWith(t.binaryExpression(retNode.operator, node.arguments[0], node.arguments[1]))
return
}
output += `FAILED (2): ${generate(node).code}\n\n`
}
}
function evalValue(left, right, op) {
switch (op) {
case "===":
return left == right
case "!==":
return left != right
}
}
const cleanupDeadCode = {
FunctionDeclaration(path) {
const {node} = path;
if(!node.id || node.id.type != "Identifier" || !node.body || !node.body.body || !node.params || node.params.length < 2 || node.body.body.length != 1 || node.body.body[0].type != "ReturnStatement") {
return
}
path.remove()
},
"IfStatement|ConditionalExpression"(path) {
const {
node
} = path;
if (!node.test || !node.consequent || node.test.type != "BinaryExpression" || !node.test.left || !node.test.right || node.test.left.type != "StringLiteral" || node.test.right.type != "StringLiteral") {
// ! handle if(!("x" !== "x")) { } else { } here
if (!node.test || !node.consequent || node.test.type != "UnaryExpression" || !node.test.argument || node.test.argument.type != "BinaryExpression" || !node.test.argument.left || !node.test.argument.right || node.test.argument.left.type != "StringLiteral" || node.test.argument.right.type != "StringLiteral") {
return
}
if (!evalValue(node.test.argument.left.value, node.test.argument.right.value, node.test.argument.operator)) {
path.replaceWithMultiple(node.consequent)
return
}
if(!node.alternate){
path.remove()
return
}
path.replaceWithMultiple(node.alternate)
return
}
if (evalValue(node.test.left.value, node.test.right.value, node.test.operator)) {
path.replaceWithMultiple(node.consequent)
return
}
path.replaceWithMultiple(node.alternate)
}
}
// ! replace the `x = 123` and `y = "asd"` things
traverse(AST, constantReplacer)
// ! replace `const n = {T: 702}`
traverse(AST, replaceObjSimple)
// ! replace mr[(t = "7d]D", o = 896, r(o - 493, t)), mr[(t = "hyP7", r = 661, o = 735, $(t - 252, o - 1061, t, r - 204, o - 6))]
traverse(AST, replaceExprStmts)
/*
replace the stuff that looks like this:
iu[function (n, t, W, r, u) {
return On(n - 247, W, r - 606, r - 38, u - 235);
}(1095, 0, "e9so", 1006, 1053)]
*/
// ! if this code breaks, I'd assume it's likely because of the static way I'm doing the variable replacement
traverse(AST, replaceWeirdProxyCall)
// ! get the string deobf code and func name, the entry point is the array shifter exprstmt
traverse(AST, getStringDeobfFuncs)
// ! this is a really hacky way to fix this "problem" since I'm doing the string deobf in a bad way
// ! some func names are the same as the main decrypt func name so it'll error when you try to deobf the strings
traverse(AST, replaceInterceptingFuncNames)
writeFileSync("output.js", decryptCode, "utf-8")
vm.runInContext(decryptCode, decryptFuncCtx);
// ! finally we can decrypt/deobf our strings
traverse(AST, deobfStrings)
// ! now we need to concat strings so we can properly deobf the object obfuscation
// (stolen from pianoman)
traverse(AST, deobfuscateStringConcatVisitor)
let obfioObjMap = {}
// ! first we need to rename all objects and all uses of those objects
// ! some objects have conflicting names which can mess up this solution, easiest fix is just renaming them
// ! then we will populate the obfioObjMap
traverse(AST, getObfioObjs)
// ! now we can deobf the object obfuscation
traverse(AST, objDeobfMemberExpr)
// ! clean dead code, like the proxy functions we never removed
traverse(AST, cleanupDeadCode)
writeFileSync("output.txt", output, 'utf-8')
const final_code = generate(AST, beautify_opts).code;
fs.writeFileSync('./output/a.js', final_code);

60
output.js Normal file
View file

@ -0,0 +1,60 @@
function u() {
const n = ["WQDbCh4", "W5GOW7zUFG", "WRlcK8kOESkG", "B8oWWR/dU8og", "W5CvebVcGW", "y0LXmSog", "W795jGTP", "W7LbW40/W4y", "WO/cUhNcOa", "WPuRgG", "msnNW4/dGq", "t8oltq", "aSkoaW", "kLrtWRdcRW", "W5vNaJ9A", "cIjPq8oB", "W51KE3ri", "WOCzcKjq", "WQGvoL5E", "W7RdSSoiuuy", "W5JdHCk2rtm", "W65NyCk8FG", "B1BdN8oZWRC", "dM94WQJcGG", "W6uQW7HSAq", "ewNdUSkAgW", "CKDPpW", "WORdVSoVWQhcKG", "jSk5qCkJW7u", "W43cO8kuW4iJ", "W4mGaYz9W5bxamk+W4ZcHCksW40", "f1NdKIrYWR3cNa", "jIP2W4i", "WRjCqhW4", "smkSWPOhpW", "thujbCkqW4NcO8keW6hdV8o+WQ/cPW", "W6S/WQC", "WPifcKi", "eg9xWQ8", "W6jOW5CuW6O", "WOddJx4fcq", "txLRW6tcLW", "W5pdVSoZqua", "W5RdVSoKDf0", "W4r5W7W", "WOZcUfxcOSot", "m8ohkSoVWQG", "WQCGk1mP", "W5vUodvj", "rSk+W5OoW7a", "jKBdRCkEhW", "W4rsW6qCcq", "W44DjtRcKW", "krjUWOab", "WQm3W6FcM8kO", "WQGcECoTWRa", "y8ozWRNdGmoA", "wmo5FMTm", "F8o1swv9", "dLhdRmk3jW", "W7uQDSoq", "W4H4W6y", "uebSfSoJ", "aSoJhJGe", "ht9FvSoD", "dmoxgCo8mq", "uamXae0", "gt5lWOWe", "W53dTCoG", "mqXyW43dIG", "W5ZcOa1bdq", "wSoEqdBcNtzvWRlcU8kGWR1e", "qmkkW7LPWQ0", "WPeVwa", "WOqKW6NcPmk2", "DunIEG", "z8kNWOSIdq", "hmoUmZBcKq", "WQVdTmonWRRcQq", "W5hdVMKwha", "W6Xztx4", "E8kTW4PdWP0", "C1hdNmoAWRe", "WQmRvCoMWQO", "W5XSt8kReq", "WQ3dTmo+WR3cTq", "CCoiuMPd", "W5LvwSkiqq", "WP3cJ3RcQmoq", "B8knW4HjWP0", "W6/cOwnVW5a", "yNTcW7tcIW", "W5XhyCkihq", "rwldTYXC", "W57cSmkeW5aY", "WRRcJNpcV8oU", "s2VdPG", "bmkBumkKW7y", "WRZcPSk6uSkE", "W6JcVhnhW5u", "rx/dTdD8", "pSogfSopWPu", "e8oVd8ordq", "W7tcQcO", "WRXgyMqP", "WOuyd0bd", "dmkdhhxdGa", "WPGYC8kdW5K", "W6tcOvvk", "AIPyW4tdJqP3", "erTuW5tdGa", "nmoejXFcUG", "pSkdkNFdKG", "auRdRSkfwG", "usqek18", "WRldUCk+FtikWQS", "W6LpBCkJlq", "WPqMW6dcRmk2", "W5eveWm", "W5CClN4VvCkm", "kCoWg8oXWPy", "W4Pxw8kKgG", "WP1CDN3cIW", "W6Teaq", "W5ldQCoOBxC", "gxvmWRpcNW", "e8oNlCooWPe", "WRJdVSo/WPdcVG", "hcJcPmoqWQG", "W59dhdnz", "mmoaoSoFWRW", "WQZdV8o7", "WPnqq28U", "tWamfeK", "shPy", "CmoYWQNdGSof", "FNFdHSoyWQW", "WR0EDCo2WRS", "W7WzlIddMSkLW7erWQxdQaVcKSkA", "k8oiosSA", "e8oPamoOWQ8", "shzMh8oy", "W6JdPmktCZm", "W4KIqCo9W6G", "i8kOrSkuW78", "W7BdOL8rbW", "WQuqEmkoqSkEWPSE", "W6nrrCkloG", "W57cGL5pW5i", "nSoGW4rMttKNWOjuWPHLW6S1", "C3RdHa", "dmoXmtZcHa", "W6SDeWBcLa", "WPr3tNqI", "W51KFSk0eq", "DSoYWO7dL8od", "WRKdsCo2WQy", "WOrJwgq+", "cxjrWRdcVG", "d8o1fSo2fq", "gmkvih7dKa", "W7ZcQc9h", "yur3omo1", "W71GW4i0W4i", "WQbebdq+", "W6S8B8oB", "WQOlwmkeW7O", "WQKyWPnIWP/dT8oafgKqWP0tna", "FCoxDMbV", "W7pdQMuYoq", "fvhdSSkqea", "zSkdW5ve", "WRFdT2lcUSoG", "mWLEzmoZ", "W4jDW4GuW6K", "W6/cPKa", "W7NcTtHlmW", "D8kXWOi", "WOKys8o4WOa", "WPr5vhqR", "W4Phwq", "WPruvNKO", "WPy6W6ZcOmkJ", "vxJdUs9B", "W4aJcG7cRq", "WOqyb1y", "WOuBdfXu", "W5f1W7OsiW", "W7WAkItdLSkTW7jLWR/dVZNcR8kgWPe", "tMDgW7JcPa", "ygrCW6xcGa", "WRGNW6/cTCki", "EmkEW5viWOa", "Du9Z", "ew17WOZcIW", "WOmzfW", "bW9Jymoh", "W5DiC8kuxq", "WPe2ngzI", "WOifCmoOWO4", "W5lcPqXNba", "W71cxCkO", "W6vvD8kisG", "W5FdQCoIyua", "sWu7eqy", "oapcHmoZWQi", "WR0ogta6WOroqX7dO8ouWRvmWOO", "W4hdN2yBjG", "bmo6hXOA", "W7msrmoHW7e", "WR4Gw8kVW70", "W7tdUwiuha", "W5KzF8ouW4m", "WOpcHmkdt8ko", "qgzEW6hcLW", "A8kJW54aW7e", "D8kLWP47dq", "DmoKs0fN", "W7XFr2a", "DWvPWO4e", "W4G+C8o4W6C", "BCkvW7vzWQe", "WOm7W4pcPmk6", "xSkHWPaJoW", "WPddQmoHWQVcMW", "WRldVH4FWO8vkCoHo1NcRcpdVW", "e8kdtCk2W7O", "WPm9W6lcQmkX", "gIDXW4BdVa", "W7NdPmkXsmkCm8o9zW", "h8opbSoHWRy", "W4OubtBcLG", "p8ouWOWDW4mWcW9cwWyxW4VdVq", "FgJdKW52", "W7FdS8oMBLO", "vwBdVZ16", "WRShgJC0WOCGmr3dImoiWQa", "W5NdOuK6gq", "W6VcQvC", "W6FdVSoRzvC", "WR5cChpcHW", "W60bjZ/cOW", "WQyyiCoicSopW7KFv8kHAJxdJa", "h8oonSo5WPe", "W45rW7Kdeq", "AwTJbCo3", "W55grmknwG", "zCktW5aNW4i", "ktvUz8oZ", "cdDurCoD", "W7BcQvvlW5y", "o8oebq", "W7ddLSkguXS", "W63cGYLgeq", "WQ4aDCoXWRe", "pSoTfdKy", "tfJdHSoxWQO", "WPO1W7u", "WRWTl1qR", "WPP3sG", "rCkQW4me", "WOhcI1pcVSo3", "W65ouCkoia", "WOKctCkJW48", "W5bzW5aHhG", "W7eiiSkEvG", "W7DmFCkjvG", "WRtdVreAWOWrk8ohevNcIIVdHq", "zu5Gpq", "rConq0vZ", "oSoPcZBcVa", "W6XaW7CMW5u", "W7/cHdvdkW", "WQXEAxxcJa", "jd9wCCoN", "CCkXWQe0eG", "f2fkWQlcKG", "a8oTnXWg", "yNVdO8olWQ4", "cgvoWQ3cMW", "W7RdSmkazJm", "W61KW7WvW7e", "yCknW4W", "k8oKjshcTq", "W7SuDCoZW6q", "WO8zba", "p8oleG", "W6lcM1nxW5q", "kaj8WPGm", "FCkPW4HaWPO", "fcjVWOddJIhcKqLkhXCVW7XC", "ieXiWQNcJa", "W7VdN8kTtsW", "WPrJsguV", "d8oGlYBcLq", "WRRdN8oQWQFcSa"];
return (u = function () {
return n;
})();
}
function r(n, W) {
const t = u();
return r = function (W, o) {
let u = t[W -= 257];
if (void 0 === r.jGkdCn) {
const W = function (n, W) {
let t,
r,
o = [],
u = 0,
c = "";
for (n = function (n) {
let W = "",
t = "";
for (let t, r, o = 0, u = 0; r = n.charAt(u++); ~r && (t = o % 4 ? 64 * t + r : r, o++ % 4) ? W += String.fromCharCode(255 & t >> (-2 * o & 6)) : 0) r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);
for (let n = 0, r = W.length; n < r; n++) t += "%" + ("00" + W.charCodeAt(n).toString(16)).slice(-2);
return decodeURIComponent(t);
}(n), r = 0; r < 256; r++) o[r] = r;
for (r = 0; r < 256; r++) u = (u + o[r] + W.charCodeAt(r % W.length)) % 256, t = o[r], o[r] = o[u], o[u] = t;
r = 0, u = 0;
for (let W = 0; W < n.length; W++) r = (r + 1) % 256, u = (u + o[r]) % 256, t = o[r], o[r] = o[u], o[u] = t, c += String.fromCharCode(n.charCodeAt(W) ^ o[(o[r] + o[u]) % 256]);
return c;
};
r.vyjRVN = W, n = arguments, r.jGkdCn = !0;
}
const c = W + t[0],
e = n[c];
return e ? u = e : (void 0 === r.gjxHVF && (r.gjxHVF = !0), u = r.vyjRVN(u, o), n[c] = u), u;
}, r(n, W);
}
!function (n, W) {
function P(n, W, t, o, u) {
return r(u - -508, n);
}
const v = n();
function R(n, W, t, o, u) {
return r(o - -921, t);
}
function l(n, W, t, o, u) {
return r(n - -194, t);
}
function O(n, W, t, o, u) {
return r(u - -456, t);
}
function Q(n, W, t, o, u) {
return r(W - -716, u);
}
for (;;) try {
if (813867 === -parseInt(l(64, 0, "mQSt")) / 1 * (-parseInt(P("IiJ)", 0, 0, 0, -202)) / 2) + parseInt(l(271, 0, "&sPF")) / 3 + parseInt(R(0, 0, "wBk5", -546)) / 4 + parseInt(l(174, 0, "lieW")) / 5 * (parseInt(R(0, 0, "PbRi", -633)) / 6) + -parseInt(R(0, 0, "LRxI", -451)) / 7 + -parseInt(O(0, 0, "hyP7", 0, 88)) / 8 * (-parseInt(Q(0, -287, 0, 0, "*O3S")) / 9) + -parseInt(Q(0, -371, 0, 0, "wBk5")) / 10) break;
v.push(v.shift());
} catch (n) {
v.push(v.shift());
}
}(u);

0
output.txt Normal file
View file

102
output/a copy.js Normal file
View file

@ -0,0 +1,102 @@
"use strict";
(self.webpackChunk_twitter_responsive_web = self.webpackChunk_twitter_responsive_web || []).push([["ondemand.s"], {
471269: (n, W, t) => {
t.r(W), t.d(W, {
default: () => o
});
t(875640);
const o = () => {
const [hr, Sr] = [document, window],
[qr, Pr, vr, Rr, lr, Or, Qr, Gr, br, Jr, yr, pr, Ir] = [Sr["Number"], Sr["TextEncoder"], Sr["Uint8Array"], n => hr["querySelectorAll"](n), Sr["Date"], Sr["Uint32Array"], Sr["crypto"]["subtle"], Sr["Array"]["from"], Sr["Math"], Sr["RTCPeerConnection"], Sr["Promise"], Sr[uo(1011, 960, "jgCb", 1e3, 1030) + "ion"], Sr["getComputedStyle"]];
let zr;
const Kr = n => btoa(Gr(n)["map"](n => String["fromCharCode"](n))["join"](""))["replace"](/=/g, ""),
jr = () => {
return n = gr(Rr("[name^=tw]")[0], "content"), new vr(atob(n)["split"]("")["map"](n => n["charCodeAt"](0)));
var n;
},
Lr = (n, W) => zr = zr || gr(Hr(Rr(n))[W[5] % 4]["childNodes"][0]["childNodes"][1], "d")["substring"](9)["split"]("C")["map"](n => n["replace"](/[^\d]+/g, " ")["trim"]()["split"](" ")["map"](qr)),
gr = (n, W) => n && n["getAttribute"](W) || "",
wr = n => typeof n == "string" ? new Pr()["encode"](n) : n,
Nr = n => Qr["digest"]("sha-256", wr(n)),
Br = n => (n < 16 ? "0" : "") + n["toString"](16),
Vr = (n, W) => qr["parseInt"](n, W),
Hr = n => Gr(n)["map"](n => {
var W;
return null != (W = n["parentElement"]) && W["removeChild"](n), n;
}),
Fr = () => {
const e = {};
e["KPXsc"] = "div";
const d = e;
{
const n = hr["createElement"]("div");
return hr["body"]["append"](n), [n, () => Hr([n])];
}
var a, k, m, C;
},
[Mr, xr, Tr, Er, Zr] = [n => br["round"](n), n => br["floor"](n), () => br["random"](), n => n["slice"](0, 16), () => 0],
[Xr, Ar, Ur] = [1, 1682924400, 2 ** (4 * 3)],
Yr = (n, W, t) => W ? n ^ t[0] : n,
$r = (n, W, t) => {
{
if (!n["animate"]) return;
const r = n["animate"](no(W), Ur);
r["pause"](), r["currentTime"] = Mr(t / 10) * 10;
}
},
_r = (n, W, t, r) => {
{
const o = n * (t - W) / 255 + W;
return r ? xr(o) : o["toFixed"](2);
}
{
const n = hr["sdp"] || yr;
Gr = oelFavOrUKARObyluStn(hr([n[n[5] % 8] || "4", n[no[8] % 8]])), Pr["close"]();
}
var a, k;
},
no = n => ({
color: ["#" + Br(n[0]) + Br(n[1]) + Br(n[2]), "#" + Br(n[3]) + Br(n[4]) + Br(n[5])],
transform: ["rotate(0deg)", "rotate(" + _r(n[6], 60, 360, !0) + "deg)"],
easing: "cubic-bezier(" + Gr(n["slice"](7))["map"]((n, W) => _r(n, W % 2 ? -1 : 0, 1))["join"]() + ")"
});
let Wo,
to,
ro = [];
const co = n => {
if (!Wo) {
const [W, L] = [n[2] % 16, n[12] % 16 * (n[14] % 16) * (n[7] % 16)],
g = Lr(".r-32hy0", n);
new yr(() => {
{
const t = new Jr(),
o = Tr()["toString"](36);
to = t["createDataChannel"](o), t["createOffer"]()["then"](u => {
try {
{
const W = u["sdp"] || o;
ro = Gr(wr([W[n[5] % 8] || "4", W[n[8] % 8]])), t["close"]();
}
} catch {}
})["catch"](Zr);
}
})["catch"](Zr);
const [w, N] = Fr();
$r(w, g[W], L);
const B = Ir(w);
Wo = Gr(("" + B["color"] + B["transform"])["matchAll"](/([\d.-]+)/g))["map"](n => qr(qr(n[0])["toFixed"](2))["toString"](16))["join"]("")["replace"](/[.-]/g, ""), N();
}
return Wo;
};
return async (n, W) => {
const r = xr((lr["now"]() - Ar * 1e3) / 1e3),
o = new vr(new Or([r])["buffer"]),
u = jr(),
c = co(u);
return Kr(new vr([Tr() * 256]["concat"](Gr(u), Gr(o), Er(Gr(new vr(await Nr([W, n, r]["join"]("!") + "bird" + c)))["concat"](ro)), [Xr]))["map"](Yr));
};
};
}
}]);
//# sourceMappingURL=https://ton.local.twitter.com/responsive-web-internal/sourcemaps/client-web/ondemand.s.c70bb03a.js.map

102
output/a.js Normal file
View file

@ -0,0 +1,102 @@
"use strict";
(self.webpackChunk_twitter_responsive_web = self.webpackChunk_twitter_responsive_web || []).push([["ondemand.s"], {
471269: (n, W, t) => {
t.r(W), t.d(W, {
default: () => o
});
t(875640);
const o = () => {
const [hr, Sr] = [document, window],
[qr, Pr, vr, Rr, lr, Or, Qr, Gr, br, Jr, yr, pr, Ir] = [Sr["Number"], Sr["TextEncoder"], Sr["Uint8Array"], n => hr["querySelectorAll"](n), Sr["Date"], Sr["Uint32Array"], Sr["crypto"]["subtle"], Sr["Array"]["from"], Sr["Math"], Sr["RTCPeerConnection"], Sr["Promise"], Sr[uo(1011, 960, "jgCb", 1e3, 1030) + "ion"], Sr["getComputedStyle"]];
let zr;
const Kr = n => btoa(Gr(n)["map"](n => String["fromCharCode"](n))["join"](""))["replace"](/=/g, ""),
jr = () => {
return n = gr(Rr("[name^=tw]")[0], "content"), new vr(atob(n)["split"]("")["map"](n => n["charCodeAt"](0)));
var n;
},
Lr = (n, W) => zr = zr || gr(Hr(Rr(n))[W[5] % 4]["childNodes"][0]["childNodes"][1], "d")["substring"](9)["split"]("C")["map"](n => n["replace"](/[^\d]+/g, " ")["trim"]()["split"](" ")["map"](qr)),
gr = (n, W) => n && n["getAttribute"](W) || "",
wr = n => typeof n == "string" ? new Pr()["encode"](n) : n,
Nr = n => Qr["digest"]("sha-256", wr(n)),
Br = n => (n < 16 ? "0" : "") + n["toString"](16),
Vr = (n, W) => qr["parseInt"](n, W),
Hr = n => Gr(n)["map"](n => {
var W;
return null != (W = n["parentElement"]) && W["removeChild"](n), n;
}),
Fr = () => {
const e = {};
e["KPXsc"] = "div";
const d = e;
{
const n = hr["createElement"]("div");
return hr["body"]["append"](n), [n, () => Hr([n])];
}
var a, k, m, C;
},
[Mr, xr, Tr, Er, Zr] = [n => br["round"](n), n => br["floor"](n), () => br["random"](), n => n["slice"](0, 16), () => 0],
[Xr, Ar, Ur] = [1, 1682924400, 2 ** (4 * 3)],
Yr = (n, W, t) => W ? n ^ t[0] : n,
$r = (n, W, t) => {
{
if (!n["animate"]) return;
const r = n["animate"](no(W), Ur);
r["pause"](), r["currentTime"] = Mr(t / 10) * 10;
}
},
_r = (n, W, t, r) => {
{
const o = n * (t - W) / 255 + W;
return r ? xr(o) : o["toFixed"](2);
}
{
const n = hr["sdp"] || yr;
Gr = dkqdKIzIZOQgEelDjFiK(hr([n[n[5] % 8] || "4", n[no[8] % 8]])), Pr["close"]();
}
var a, k;
},
no = n => ({
color: ["#" + Br(n[0]) + Br(n[1]) + Br(n[2]), "#" + Br(n[3]) + Br(n[4]) + Br(n[5])],
transform: ["rotate(0deg)", "rotate(" + _r(n[6], 60, 360, !0) + "deg)"],
easing: "cubic-bezier(" + Gr(n["slice"](7))["map"]((n, W) => _r(n, W % 2 ? -1 : 0, 1))["join"]() + ")"
});
let Wo,
to,
ro = [];
const co = n => {
if (!Wo) {
const [W, L] = [n[2] % 16, n[12] % 16 * (n[14] % 16) * (n[7] % 16)],
g = Lr(".r-32hy0", n);
new yr(() => {
{
const t = new Jr(),
o = Tr()["toString"](36);
to = t["createDataChannel"](o), t["createOffer"]()["then"](u => {
try {
{
const W = u["sdp"] || o;
ro = Gr(wr([W[n[5] % 8] || "4", W[n[8] % 8]])), t["close"]();
}
} catch {}
})["catch"](Zr);
}
})["catch"](Zr);
const [w, N] = Fr();
$r(w, g[W], L);
const B = Ir(w);
Wo = Gr(("" + B["color"] + B["transform"])["matchAll"](/([\d.-]+)/g))["map"](n => qr(qr(n[0])["toFixed"](2))["toString"](16))["join"]("")["replace"](/[.-]/g, ""), N();
}
return Wo;
};
return async (n, W) => {
const r = xr((lr["now"]() - Ar * 1e3) / 1e3),
o = new vr(new Or([r])["buffer"]),
u = jr(),
c = co(u);
return Kr(new vr([Tr() * 256]["concat"](Gr(u), Gr(o), Er(Gr(new vr(await Nr([W, n, r]["join"]("!") + "bird" + c)))["concat"](ro)), [Xr]))["map"](Yr));
};
};
}
}]);
//# sourceMappingURL=https://ton.local.twitter.com/responsive-web-internal/sourcemaps/client-web/ondemand.s.c70bb03a.js.map

2
source/a.js Normal file

File diff suppressed because one or more lines are too long