JavaScript Deobfuscator Reloaded

2026-09-19

5vxW4kG.jpgA couple of weeks in the past I released JavaScript Deobfuscator 2.Zero - finally something that works with current Firefox versions once more. Why did it take me a year to repair this compatibility issue? Well, it really wasn’t that easy. After considering all of the potentialities I decided that rewriting it from scratch was the one chance, and that was exhausting to accomplish in my spare time. Before I continue with the technical details, enable me to introduce JavaScript Deobfuscator in its new reincarnation: agreement letter sample it now provides a panel to Firefox Developer Tools. Instead of messing with filters your view is restricted to the current tab robotically. Both compiled and executed scripts go into the identical record, with some textual content indicating whether or not we’ve seen the script being compiled or executed or each. Starting with Firefox 39 even code operating in Web Workers will likely be displayed. And JavaScript Deobfuscator will beautify the code instead of relying on the JavaScript engine to take action.


file0001937132386.jpgThe downside is that only Firefox is supported now - different applications simply don’t have Developer Tools to integrate with. Also, debugging add-ons or the browser itself isn’t potential-- Developer Tools run in a separate process for that, no add-ons put in there. Finally, the search functionality is totally rudimentary proper now, that’s something I hope to improve ultimately. Now to the technical particulars. The reason for this overhaul is the new debugging interface which changed the one JavaScript Deobfuscator was utilizing. The previous debugging interface was conceptually totally different, it was designed as a single hook to gather all knowledge. The new one alternatively collects knowledge about individual compartments and it’s up to you to figure out which ones you need. After a number of unsuccessful makes an attempt to proceed gathering all data in JavaScript Deobfuscator I realized that it made a lot more sense to take a look at particular person tabs.


Using the new debugging API turned out to be tough to say the least. Did I hyperlink to MDN above? Sorry about that, I ought to have linked to the SpiderMonkey supply code. It’s very just like the MDN documentation however the later is outdated. And even in case you look at the SpiderMonkey source, much of the documentation is merely wishful considering, itemizing options that were by no means implemented. A brand new UI idea had to be developed as well, and the only good possibility for per-tab debugging would be integrating into the Firefox Developer Tools. That’s where the enjoyable actually started. Then I looked at what TargetType is and the way existing tools work with it - this was the purpose where I realized that there are so many implementation details involved that an extension can't presumably do it. So I gave up. After i came back a number of months later things improved, slightly. Somebody wrote an Add-on SDK module to create new Developer Tools panels.


While I didn’t use that module immediately, it showed nicely which components of the API are contractual and which ones are merely implementation particulars. It also confirmed that issues aren’t too dangerous if you limit your self to a single goal type - a local tab. Handling distant connections to browser and add-ons is more complicated, but as I mentioned above extensions can not do this anyway. Now that article stops at the point the place you "merely" want to make use of the remote debugging protocol to communicate with the constructed-in debugging actor. Well, perhaps it is admittedly simple but I couldn’t work out how to do that - and whether that protocol is one thing I can rely on. See, the built-in tools will certainly be adjusted when the debugging actor or/and the protocol change. My extension however shall be broken, and I’ll want to invest time into figuring out what changed and how my code must be adjusted whereas staying appropriate with older Firefox versions.


So JavaScript Deobfuscator uses the debugging interface straight, with out counting on the debugging actor of the Developer Tools. And it beautifies JavaScript code utilizing its personal copy of a library slightly than relying on code used by Developer Tools - JavaScript beautification in Developer Tools is at present an implementation element that extensions cannot rely on. JavaScript Deobfuscator additionally duplicates the types of the 2 Developer Tools themes to verify it appears to be like much like the present panels - just utilizing the styles from Developer Tools would have probably prompted a catastrophe after just a few Firefox releases. Not that the built-in types are really defined in a generic means, there is absolutely numerous inconsistencies there and each panel is styled somewhat in another way. These are solely some examples, there's more code duplication. Developer Tools aren’t at the moment built to allow extensions to reuse their code. Still, I’m fairly pleased with the end result, and i hope that the biggest chunk (JavaScript beautification) will go away eventually. From the usability viewpoint the new version is a huge leap forward, getting there could have been simpler nonetheless.

댓글목록

등록된 댓글이 없습니다.