Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to obfuscate whole Cordova/Phonegap project?

I want to know if there is a tool to obfuscate a whole Cordova/Phonegap project or not? I means whole js files which are related to each others and html ans css files. I's so hard to do it one by one.

like image 696
ehsan shirzadi Avatar asked Oct 20 '25 04:10

ehsan shirzadi


1 Answers

Project obfuscation is the only way variable/function renaming is coherent across all your files, including HTML, and your code does not break. Also, it's important that the obfuscator deals correctly with dependencies, and perform code transformation in a way that guarantees that the code is not broken.

JScrambler is IMHO the best tool for the job:

  • It supports obfuscating all files at once, in a project (any kind of project, Cordova included)
  • It has special support for Mobile/HTML5, tuning down obfuscation not to hurt performance
  • It has a bunch of API clients that you can use. I personally use the npm version, but there's a Grunt one as well.
  • It is generally better than all other obfuscators I know.

A word of care about "uglifiers". Most of them are plain minifiers and optimisers. They do a good job at that, but a very bad one at obfuscating. It's usually quite fast to reverse that code.

like image 164
Fisher Avatar answered Oct 22 '25 05:10

Fisher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!