question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Domain lock not working?

See original GitHub issue

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:

javascript-obfuscator/bin/javascript-obfuscator.js 'js/game.js' --output 'js/game.js' --compact true --selfDefending true --domainLock 'domaina.com,domainb.com'

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!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
av01dcommented, Nov 4, 2017

Thanks for the quick fix, works great now!

0reactions
ionbaracommented, Jun 14, 2022

similarly to above answer, the expected behaviour would be to not allow running from the filesystem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change your domain lock setting - Google Support
Click Registration settings. Scroll down to Domain lock. Toggle Lock domain / Unlock domain to change the domain's lock setting. Restrictions for domain...
Read more >
About Locked Domain - ICANN
Domain names can be locked to protect against unauthorized changes. This status may be called "Registrar lock" or "Client Transfer Prohibited" (or a...
Read more >
Domain Security: How To Unlock A Domain
On the dashboard, select the domain you are working on. ... Toggle the Domain Lock to Green or to the Right. Domain lock...
Read more >
Why is my domain locked for 60 days?
If your domain's registrar is a third-party (such as GoDaddy or Google), some providers will lock your domain for 60 days if you...
Read more >
Canceled – Domain is locked at current registrar, or is not yet ...
Canceled – Domain is locked at current registrar, or is not yet 60 days. Registrar Lock is a security feature that prevents unauthorized...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found