3 ms·
Removing eval wouldn't help— you could always just write a tiny interpreter to do the same thing. This is a problem in any Turing complete programming language
by jpochtar 8y ago
Removing eval wouldn't help— you could always just write a tiny interpreter to do the same thing. This is a problem in any Turing complete programming language (with Reflection), although JS makes it easier.
- Jupe 8y agoTrue, it wouldn't solve the problem entirely, but I'd guess a 'tiny' interpreter would stand out more than a one liner like this one, possibly making detection easier.
- RussianCow 8y agoOn the contrary, `eval` is used so little in real code that it's easy to detect. A tiny, obfuscated VM would be much more difficult.
- mygo 8y ago‘eval’ is not trivial to detect when it’s window[rot13("riny")]("console.log('lol')"); or one of the many other ways to obfuscate eval