当前位置:网站首页>js内容混淆,返回内容加密
js内容混淆,返回内容加密
2022-06-30 01:23:00 【范之度】
目标网站:
a04a7c5e14846edd70e5bb4c4ba8a69aa947a5c001dac7cfeff16c1db3a152389b76b67b89c670a2baf3dffa5fb54d7ead18604d550b6ebff3e432102e08d976
刷新,在fidder和开发者工具去搜索,发现搜不到,然后一看如下:明显转码了。

这里的解决方法是,先安装ast环境,npm init的时候一定要加上

这里一定要加类型,然后添加环境

然后转换代码:
//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";
//读取js文件
const jscode = fs.readFileSync('./democode.js', "utf-8");
let ast = parse(jscode);//js转ast
function decry_str(ast) {
//数字与字符还原
traverse.default(ast, {
'StringLiteral|NumericLiteral|DirectiveLiteral'(path) {//迭代字符串|迭代数组匹配--16进制文本还原
delete path.node.extra; //删除节点的额外部分-触发原始值处理
},
});
return ast;
}
ast = decry_str(ast)//进制数字还原与字符还原
let {code} = generate.default(ast,{jsescOption:{"minimal":true}})
//文件保存
fs.writeFile('./demoNew.js', code, (err) => {
});边栏推荐
- Quick pow: how to quickly find power
- Machinery -- nx2007 (UG) finite element analysis tutorial 1 -- simple object
- 【Proteus仿真】8比特端口檢測8獨立按鍵
- 2022-06-29:x = { a, b, c, d }, y = { e, f, g, h }, x、y两个小数组长度都是4。 如果有: a + e = b + f = c + g = d + h
- [proteus simulation] 8-bit port detection 8 independent keys
- Stimulsoft Reports报告工具,Stimulsoft创建和构建报告
- 在线文本数字识别列表求和工具
- [Thesis Writing] English thesis writing guide
- What if you can't write your composition well? Ape counseling: parents should pay attention to these points
- Mysql 监控2
猜你喜欢

快手伸手“供给侧”,找到直播电商的“源头活水”?

Ctfshow competition original title 680-695

I, 33 years old, ByteDance test development, unveiled the real income of Beijing "test post"

MySQL installation steps (detailed)

Precautions for postoperative fundus hemorrhage / / must see every day

Kubernetes 核心对象概览详解

Text classification using huggingface

首届·技术播客月开播在即

Online sql to CSV tool

Is the numpy index the same as the image index?
随机推荐
UDP servers and clients in go
Stringredistemplate disconnects and the value disappears
Text classification using huggingface
利用tsne将不同句子关于相似度可视化出来
Sentinel source code analysis Part 6 - sentinel adapter module Chapter 4 zuul2 gateway
How to seamlessly transition from traditional microservice framework to service grid ASM
Sentinel source code analysis Part 7 - sentinel adapter module - Summary
How did the data center change from "Britney Spears" to "Mrs. bull"?
Analysis of natural frequency and buckling load of cylinder by finite element method
[deep learning compilation] operator compilation IR conversion
[MRCTF2020]Ezpop-1|php序列化
Good test / development programmers vs. average programmers
在线文本数字识别列表求和工具
十大券商有哪些?另外,手机开户安全么?
VIM editor common instructions
关于c语言main函数中int argc,char **argv的理解
Machine learning notes: time series decomposition STL
[mrctf2020]ezpop-1 | PHP serialization
Interview summary
Practical application of information security