最近工作中遇到sourcemap泄露的問題以前沒在意這個問題,現在發現這個問題可以獲取網站的前端代碼(不局限於是前端頁面能看到的那些),這些代碼可能會泄露網站的用戶名、密碼等敏感信息,這里推薦一款工具(測試了好幾款,感覺還是這款安裝比較方便)reverse-sourcemap。
reverse-sourcemap下載地址:https://github.com/davidkevork/reverse-sourcemap
安裝方法:
npm install --global reverse-sourcemap(需要安裝nodejs)
使用方法:
reverse-sourcemap -v xxx.js.map -o output
截圖:

獲取到的前端代碼:

