当前位置:网站首页>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) => {
});边栏推荐
- Database application
- SFDP super form development platform v6.0.4 was officially released
- Varnish 基础概览7
- How to unify the use of package manager in a project?
- Questions about database: database attachment
- How to refuse the useless final review? Ape tutoring: it is important to find a suitable review method
- Understanding of int argc, char * * argv in C language main function
- JS prototype and prototype chain (Lantern Festival meal)
- MySql函数
- ES6 synchronous asynchronous execution and block level scope
猜你喜欢

Machinery -- nx2007 (UG) finite element analysis tutorial 1 -- simple object

Kubernetes core object overview details

The listing of Symantec electronic sprint technology innovation board: it plans to raise 623million yuan, with a total of 64 patent applications

MES管理系统功能模块之质量管理

How latex enters a matrix

【机器学习Q&A】数据抽样和模型验证方法、超参数调优以及过拟合和欠拟合问题

浅析现代Web端im即时通讯开发技术
![[Thesis Writing] English thesis writing guide](/img/59/88d34814a88a2da19ed6a236825649.png)
[Thesis Writing] English thesis writing guide

Tetris game based on STM32F103

What if you can't write your composition well? Ape counseling: parents should pay attention to these points
随机推荐
第八届“互联网+”大赛 | 云原生赛道邀你来挑战
Stimulsoft Reports报告工具,Stimulsoft创建和构建报告
2022-06-29: x = {a, B, C, D}, y = {e, F, G, H}, the length of the two small arrays X and Y is 4. If yes: a + e = B + F = C + G = D + H
[recommended] how to quickly locate a bug during testing
3-6sql injection website instance step 5: break through the background to obtain web administrator permissions
城市规划馆在设计制作上需要注意什么
Resizekit2.net size and resolution independent
Clean, talk, bring children, and get rid of the label of "artificial mental retardation" for the sweeper
Mysql 监控5
Varnish 基础概览2
存储引擎分析
cookie加密9
快手伸手“供给侧”,找到直播电商的“源头活水”?
Varnish 基础概览1
传统微服务框架如何无缝过渡到服务网格 ASM
How to build your own blog website by yourself
关于c语言main函数中int argc,char **argv的理解
VIM editor common instructions
Kubernetes 核心对象概览详解
Visual studio 2017 cannot open the include file: 'qopenglfunctions_3_3_core': no such file or directory