← Back to context

Comment by Matheus28

6 days ago

You can just use Proxy to get around toString shenanigans and prevent any detection whatsoever.

Someone mentioned this as well in another comment. Turns out most of this could’ve been done as an extension after all :-)

edit: actually, wouldn’t you still need to override the global you’d like to instrument? At that point, the toString of the modified function would leak your hook.

see: https://gist.github.com/voidstar0/179990efe918d1028b72f292cf...

Regardless, I do have some interesting ideas that should hopefully make my pain of compiling Chromium for 3 hours worth it though :p

Cheat Engine for site scripts? Who knows. Mostly just using this as an opportunity to learn some browser internals so id say it still paid off :)

  • Your example proxies the console object, the intended way in this case is to make a proxy from the log function itself and use the apply hook

    toString will be called on the Proxy and not your hook so it won't reveal anything