awesome-javascript-anti-debugging

RestrictionalEnviroments

POC

if (location.hostname === "localhost" || location.hostname === "127.0.0.1" || location.hostname === "") {
    console.log("Don't run me here!")
}
try { 
   console.log(window); 
} catch(e){ 
   console.log("NodeJS detected!!!!"); 
}
 

About

The idea here is to prevent execution of code on local/non-browser environments (this is less about anti debugging and more about environmental restrictions)

Resources