You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all: great tool, thanks for releasing it!
I'd like to use the domain-locking feature, but can't (yet) get it to work.
I have a single (rather large) JS file, and I obfuscate it like so:
Now, when I run the resulting JS file on domainc.com, it just works. I would expect the obfuscated JS file to generate an error or halt execution some other way.
Am I missing something? Do I need to enable another cli-option to make domain locking work?
FYI: running on node v8.9.0
I just made another boiled down test. My test.js file contains 1 line of code: alert(123);
Now I run: /usr/local/scripts/node_modules/javascript-obfuscator/bin/javascript-obfuscator.js test.js --domainLock 'google.com'
The resulting test-obfuscated.js file contains this: alert(0x7b);
There is no extra code to check whether the code runs on a valid domain.
If I paste this example code (alert(123);) on https://javascriptobfuscator.herokuapp.com/ and enter the 'google.com' domain to lock to (uncheck all other options), the resulting code is much longer, as I'd expect it to be.
Either the cli-script doesn't handle lock domains well, or I need to call the cli-script with more arguments. Hope someone can tell me. Thanks!
Looks like commander issue, but i can easy fix it on my side. commander incorrectly parsed options with description like --reservedNames \'<list>\' (comma separated).
The domain lock works fine when visiting my webpage online, but it doesn't work when I download webpage to computer. So, how do I prevent the javascript from functioning on local machine?
Hello,
I have the same issue with the online version of 4.0.0. The domain lock works when I run my script in jsbins, but I can copy the page source and run it from an html file. Can this be fixed?
Activity
sanex3339 commentedon Nov 3, 2017
What version of
javascript-obfuscatoryou using?av01d commentedon Nov 3, 2017
0.12.0
sanex3339 commentedon Nov 3, 2017
Looks like
commanderissue, but i can easy fix it on my side.commanderincorrectly parsed options with description like--reservedNames \'<list>\' (comma separated).If i will change it to
<list>- everything is OK.sanex3339 commentedon Nov 3, 2017
tj/commander.js#710
sanex3339 commentedon Nov 3, 2017
Hi again! Check new
[email protected]with fix.av01d commentedon Nov 4, 2017
Thanks for the quick fix, works great now!
peeter2 commentedon Dec 5, 2018
Hello,
The domain lock works fine when visiting my webpage online, but it doesn't work when I download webpage to computer. So, how do I prevent the javascript from functioning on local machine?
ionbara commentedon Jun 14, 2022
similarly to above answer, the expected behaviour would be to not allow running from the filesystem
jendretz commentedon Apr 12, 2023
Hello,
I have the same issue with the online version of 4.0.0. The domain lock works when I run my script in jsbins, but I can copy the page source and run it from an html file. Can this be fixed?