Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isn't this trivial to disable? #5

Open
shaneargo opened this issue Mar 1, 2016 · 4 comments
Open

Isn't this trivial to disable? #5

shaneargo opened this issue Mar 1, 2016 · 4 comments

Comments

@shaneargo
Copy link

I apologise in advance if I am mistaken, as I have no experience with react. Perhaps there is something I am missing. To me though, it appears as though to a browser extension wishing to manipulate your DOM, this would be trivial to disable.

Couldn't an extension simply inject some Javascript between the declaration of the obfuscation functions and the script in which they are used, simply overriding them to directly return the node unmodified?

@Cst2989
Copy link

Cst2989 commented Mar 1, 2016

It depends. For someone targeting your app it could be easier to disable. But for something like AddBlocker it will be imposible to target your DOM

@elierotenberg
Copy link
Owner

This is a legit question.
First, obfuscation can (and typically will) be done at server-side rendering time, which of course your client-side scripts can't interfere with.
Second, it would require your extension to be able to parse your entire javascript bundle, looking specifically for this decorator, rewrite it, and only then let the browser parse and execute this javascript bundle. I think the most frequent (and valid) case against ads is that ads slow the web; I hardly imagine an adblocker would spend this much CPU/memory resources on every single page.

@shaneargo
Copy link
Author

Thanks, my misunderstanding was that templates were rendered server side. This indeed does make it more difficult to work around.

In terms of what I was saying (on the client side) I wasn't suggesting parsing the javascript bundle. Again, this is probably a misunderstanding on my part.

I was basically proposing this:

<script src="react-armor.js"></script>
<script src="bad-guy.js"></script>
<script src="myapp.js"></script>

where bad-guy.js redefines your decorators to return the DOM unmodified.

I'm guessing my misunderstanding is going to be that react-armor is bundled into "myapp.js" and therefore this wont work.

@jarnix
Copy link

jarnix commented Feb 14, 2017

For ads :

iframe { display:none; } 

gg ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants