MapHawk is a security-oriented sourcemap reconstruction and frontend analysis tool.
It reconstructs original frontend source code from JavaScript .map files and optionally scans the recovered code for:
- Hardcoded secrets
- API keys
- Tokens
- Credentials
- Sensitive configuration values
- Source code comments and TODOs
- Reconstruct sourcemaps from URL (or a single file)
- Stores the output under
./reconstructed/ - Stores the downloaded
.mapunder./map_files/
- Stores the output under
python3 maphawk.py -f map_files_urls.txt- Make it search for patterns in the files you downloaded with the
-rand-coptions:
python3 maphawk.py -f map_files_urls.txt -r -c- Create your own regex (it is not needed to always download and reconstruct, you can just indicate the reconstruction directory):
python3 maphawk.py -o /path/to/reconstructed --pattern "password|token|secret"