This extension is for Burp Suite, finding sourceMap when passive/active scanning.
Tested on Burp Pro v2020.9.2
inurl:js filetype:map
Analyze .js file line by line. If //# sourceMappingURL=<Uri>
exist, extracting the <Uri>
.
Supported <Uri>
:
-
Absolute URL (http://...)
-
Relative URL (xxx.js.map)
-
Data Uri (data://...)
For URL, I will GET
it first. If status code eq 200, trying to parse the response body as raw JSON.
For Data Uri, which often base64 encoded JSON data, I'll decode it as raw JSON.
For the sake of sourceMap is in the form of
{
"version": 3,
"sources": ["file1", "file2", "..."],
"sourcesContent": ["file1-content", "file2-content", "..."],
"mappings": "CAAA,SAAA, ...",
}
according to spec.html.
I display the sources
part in Burp Tab currently. Any advices are welcome!!!
$ chmod +x compile.sh
$ ./compile.sh
$ #output path: build/sourceMap.jar
-
Download release sourceMap.jar
-
Switch to Extender Tab, then "Add"
- Press "select file..." and choose sourceMap.jar
- select "Next", everything is okay