Skip to content

timmc/unsourcemap

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 3 commits ahead, 6 commits behind txase:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

UnSourceMap - Deobfuscate JavaScript code with source maps

unsourcemap will deobfuscate minified code using source maps. Source maps map compiled code back to the original code, including mangled to original function and variable names.

Usage

This is an extremely rough cut by someone who doesn't know nodejs.

I don't even know how this works yet.

usage: unsourcemap.js <path-to-js> <path-to-source-map> <output-dir>

Questions

  • Does this correctly avoid path traversal attacks? (What if the source map lists a source URL of ..?)
  • Why does the source-map consumer not need a reference to the packed code? Is it finding it automatically? (Doubtful!) I thought source maps only encoded a set of deltas and missing information, not the whole source! Are all source maps like this, or is it an optional feature? If the latter, how would I combine the packed source with the map?
  • Who wants to actually maintain this?

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%