I have JavaScript I want to limit it to run in certain domain. For example I have
javascript:(a=(b=document).createElement('script')).src='https://hello.com/js.php',b.body.appendChild(a);void(0)
I have the above code that should work only on http://helloworld.com. If some one else tries to access my JS files via https://hello.com/js.php they should not see my JavaScript inside it.
Or can you recommend me any obfuscator that cannot be deobfuscated?
If you don’t want other domains to access your JS files, you can prevent hotlinking through an
.htaccessfile:You can allow many domains to access JS files by adding more rules:
But, if you want to prevent access from Web browsers, you cannot do it.