当前位置:网站首页>JS content confusion, return content encryption
JS content confusion, return content encryption
2022-06-30 01:25:00 【Fan zhidu】
The target site :
a04a7c5e14846edd70e5bb4c4ba8a69aa947a5c001dac7cfeff16c1db3a152389b76b67b89c670a2baf3dffa5fb54d7ead18604d550b6ebff3e432102e08d976
Refresh , stay fidder And developer tools to search , I can't find it , Then take a look at the following : Obviously transcoded .

The solution here is , Install first ast Environmental Science ,npm init Be sure to add

You must add types here , Then add the environment

And then convert the code :
//dec_main.js
import { parse } from "@babel/parser";
import generate from "@babel/generator";
import * as types from "@babel/types";
import traverse from "@babel/traverse";
import fs from "fs";
// Read js file
const jscode = fs.readFileSync('./democode.js', "utf-8");
let ast = parse(jscode);//js turn ast
function decry_str(ast) {
// Restore numbers and characters
traverse.default(ast, {
'StringLiteral|NumericLiteral|DirectiveLiteral'(path) {// Iteration string | Iterative array matching --16 Hexadecimal text restore
delete path.node.extra; // Delete extra parts of the node - Trigger raw value processing
},
});
return ast;
}
ast = decry_str(ast)// Hexadecimal digit restoration and character restoration
let {code} = generate.default(ast,{jsescOption:{"minimal":true}})
// file save
fs.writeFile('./demoNew.js', code, (err) => {
});边栏推荐
猜你喜欢

81. 搜索旋转排序数组 II

如何统一项目中包管理器的使用?

我,33岁,字节跳动测试开发,揭开北京“测试岗”的真实收入

Text classification using huggingface
![[Thesis Writing] English thesis writing guide](/img/59/88d34814a88a2da19ed6a236825649.png)
[Thesis Writing] English thesis writing guide

Sentinel source code analysis Part 7 - sentinel adapter module - Summary

英伟达Jetson Nano的初步了解

城市规划馆在设计制作上需要注意什么

What is digital garbage? Follow the world's first AI artist to explore meta carbon Art

JS prototype and prototype chain (Lantern Festival meal)
随机推荐
“乘风破浪”的芒果超媒,能上岸吗?
Solving plane stress problem with MATLAB
cookie加密8
ctfshow 大赛原题 680-695
【图神经网络】图分类学习研究综述[3]:图分类方法评价及未来研究方向
Clean, talk, bring children, and get rid of the label of "artificial mental retardation" for the sweeper
Resizekit2.net size and resolution independent
Preliminary understanding of NVIDIA Jetson nano
The 8th "Internet +" competition - cloud native track invites you to challenge
【论文写作】英文论文写作指南
【推荐系统】基于用户的协同过滤简明原理与代码实现
How to view the size of all files in a folder?
What if you can't write your composition well? Ape counseling: parents should pay attention to these points
In depth analysis of a large number of clos on the server_ The root of wait
Wechat applet - requestsubscribemessage:fail can only be invoked by user tap gesture
浅析现代Web端im即时通讯开发技术
[three.js] Web3D first experience
Sentinel source code analysis Part 7 - sentinel adapter module - Summary
[Thesis Writing] English thesis writing guide
城市规划馆在设计制作上需要注意什么