yuvadm / free-haaretz

A nefarious browser extension that easily bypasses the haaretz{.co.il,.com} paywall
158 stars 19 forks source link

javascript googlebot verification #5

Closed da2r-20 closed 9 years ago

da2r-20 commented 9 years ago

now they added some javascript code that checks if you are really a googlebot or not. this redirects you back to a payment wall.

I've managed to bypass this by disabling javascript for the site, not the ideal solution.

yuvadm commented 9 years ago

@doronAtuar thanks for noticing this! Are you on the latest version? I believe the existing code already handles blocking of this script, but if you notice a bug I'd be happy to merge a fix.

da2r-20 commented 9 years ago

Happy to help, Seems like i'm on version 0.3, i used the download link on the README page.

yuvadm commented 9 years ago

interesting, can you tell where the problem is? Because I only see references to /htz/js/bots.js in their source code, and that path should be blocked (as you can see in the code). Ideas?

da2r-20 commented 9 years ago

seems like they changed it from "http://www.haaretz.co.il/htz/js/bots.js" to "http://hrz.haaretz.co.il/bots.js" so now your if condition is false and this script is not being filtered out.

From my point of view this was there way of handling your filtering of bots.js I added an array of addresses in-case they decide to change it again, and changed the condition to check if the URL is in that array.

yuvadm commented 9 years ago

@doronAtuar cool, in that case i'll merge your pull request. Do you have an example of where the new URL appears? I can't find it on any page (other than being redirected from the old one)

yuvadm commented 9 years ago

Merged #7 which fixes this issue