-2

I don't find any info about that,so asking here. Is somebody ever used some tool to protect javascript files? And totaly encrypt them? Because I found this tool that seems like can totaly encrypt JS? What do you think? http://webtools.securitygeeks.net/p/blog-page_26.html?

Tom White
  • 37
  • 2
  • 10
  • 1
    See this post: http://stackoverflow.com/questions/1020368/how-to-hide-or-encrypt-javascript-code – F__M May 27 '13 at 17:02
  • No, just run the JS in a separate file, view source, and bam! It's unencrypted! – tckmn May 27 '13 at 17:03
  • Yes, that code will encrypt your source code. Then whoever downloads it just has to decrypt it, which is basically trivial. – Pointy May 27 '13 at 17:03
  • What is that for? I have tested and the encryption double sized my code. Are you thinking in store confidential data on it? – DontVoteMeDown May 27 '13 at 17:04
  • If this is for validation reasons, all validation should run through the server-side anyways, security through obscurity isn't the right answer. – tymeJV May 27 '13 at 17:06

2 Answers2

2

That tool is useless. It declares a global variable called teksasli which contains your original script in a plain string. just look at the value of that variable in any console to see the original source.

There is no point in trying to encrypt Javascript, because the user/browser needs to decrypt it in order to run it.

Paul
  • 139,544
  • 27
  • 275
  • 264
0

If you want to obfuscate the source code, You could try GWT http://mojo.codehaus.org/gwt-maven-plugin/ (The Google Web Toolkit ).

vs06
  • 212
  • 2
  • 4
  • 18