当前位置:网站首页>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) => {
});边栏推荐
- I learned database at station B (V): DQL exercise
- The 8th "Internet +" competition - cloud native track invites you to challenge
- 【推荐系统】基于用户的协同过滤简明原理与代码实现
- Quick pow: how to quickly find power
- 一文读懂,MES管理系统模块功能
- 【535. TinyURL 的加密与解密】
- 【PyTorch实战】生成对抗网络GAN:生成动漫人物头像
- “乘风破浪”的芒果超媒,能上岸吗?
- Clean, talk, bring children, and get rid of the label of "artificial mental retardation" for the sweeper
- 第八届“互联网+”大赛 | 云原生赛道邀你来挑战
猜你喜欢

Pytroch Learning Notes 6: NN network layer convolution layer

cookie加密8

How to view the size of all files in a folder?

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

一文读懂,MES管理系统模块功能

2020-12-03

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

Quality management of functional modules of MES management system

numpy的索引和图片的索引一样吗?

【机器学习Q&A】数据抽样和模型验证方法、超参数调优以及过拟合和欠拟合问题
随机推荐
post请求出现WebKitFormBoundaryk的解决办法
Visual studio 2017 cannot open the include file: 'qopenglfunctions_3_3_core': no such file or directory
How to view the size of all files in a folder?
Solution to webkitformboundaryk in post request
存储引擎分析
HC32M0+ GPIO
numpy的索引和图片的索引一样吗?
Understand the module function of MES management system
81. search rotation sort array II
挖财的课程靠谱吗,让开户安全吗?
What is digital garbage? Follow the world's first AI artist to explore meta carbon Art
c语言选择,循环概述
I, 33 years old, ByteDance test development, unveiled the real income of Beijing "test post"
Can mango hypermedia, which "braves the wind and waves", go ashore?
[Thesis Writing] English thesis writing guide
Reading is the cheapest noble
Taguchi experimental method
英伟达Jetson Nano的初步了解
R language linear regression model fitting diagnosis outliers analysis of domestic gas consumption and calorie examples with self-test questions
Is the course of digging money reliable and safe to open an account?