Created
June 12, 2022 15:46
-
-
Save njmulsqb/1e78fceee4598734401e79aa7781a7d3 to your computer and use it in GitHub Desktop.
This is the wrapper I made around SourceMapper tool to fetch sourcemaps on large scale. Blog post: https://njmulsqb.github.io/2022/05/31/Hunting-Sourcemaps-On-Steroids.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import subprocess | |
import os | |
parentDir = 'sourceMapsToJS' | |
sourceMapURL = sys.argv[1] | |
dirName = sourceMapURL.strip( | |
'https://').strip('http://').strip('www.').replace('/', '-').replace('.', '-') | |
if not os.path.exists(parentDir): | |
os.mkdir(parentDir) | |
os.chdir(parentDir) | |
subprocess.call(['sourcemapper', '-url', sourceMapURL, '-output', dirName]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment