News for hackers. Stuff that matters.
Re:What is a Source Map by the_mitsuhiko on Wednesday November 15, 2017 @02:35AM (#15702081)
> However, Closure Compiler has the ability to generate more elaborate maps that do allow reverse mapping

Is that an extension to source maps that Google came up with? Because from the current specification I do not see how this can be done without hacks. The way we're doing it is inverse token search from a starting position over the minified tokens until we find our minified function name followed by the keyword 'function'.

And that approach is slow and not entirely correct.

Re:What is a Source Map by cromwellian on Wednesday November 15, 2017 @05:19AM (#15702753)
SourceMaps as specified are an interop format for devtools on the client side.

On the server side, you can store a lot more information since it doesn't need to be transmitted to the client. Closure Compiler stores maps for all variables, all properties, all functions, all renamed strings, all idGenerators, etc. You can store these if you want.

Google's servers store these maps and when user feedback or exceptions are logged, they are used to deobfuscate them. SourceMaps + functionMaps + propertyMaps + the others I mentioned as used to deobfuscate.

This doesn't solve the problem of deobfuscating locals or heap objects. That needs an extension.

Re:What is a Source Map by the_mitsuhiko on Wednesday November 15, 2017 @06:00AM (#15702909)
Sure. But what you describe is not possible with the documented sourcemap format. You can’t even map function names at the moment. It’s purely a token and token location mapping format.