1. 利用SourceMap还原前端js代码

1.1. F12 --> 调试器

会发现多一个webpack选项,因为存在.js.map文件,能够还原

1.2. 利用 reverse-sourcemap

  • 安装 reverse-sourcemap
npm install --global reverse-sourcemap
  • 还原代码
reverse-sourcemap -v app.63304d959258070ef3be.js.map -o output

image-20200929223206583

1.3. 利用 restore-source-tree(失败了)

https://github.com/alexkuz/restore-source-tree

  • 安装 restore-source-tree
git clone https://github.com/laysent/restore-source-tree.git 
cd restore-source-tree
npm i -g restore-source-tree

image-20200928214529136

  • 还原代码
restore-source-tree chunk-vendors.6b92c4bd.js.map

会自动保存到 output 下,不知道是不是有bug

1.4. 利用shuji(失败了)

https://github.com/paazmaya/shuji

npm install --global shuji
Copyright © d4m1ts 2022 all right reserved,powered by Gitbook该文章修订时间: 2021-10-09 15:03:08

results matching ""

    No results matching ""