Blocking the ISP's ads appearing after a possible DNS grab and redirect via port 53?
I'm asking this question here because I already asked it on ProWebmasters and the moderators said the people on SuperUser might be able to answer it.
The question: https://webmasters.stackexchange.com/questions/93552/blocking-the-isps-ads-appearing-after-a-possible-dns-grab-and-redirect-via-port
Being a programmer, I'm quite embarrassed that I'm unable to block the ads, and would appreciate some help.
ps: I considered linking to the question instead of re-posting everything here, but if you feel it is more appropriate for me to post the contents of the question here, please let me know. I'll edit my question.
This is not some DNS spoof. The ISP is actively altering web requests and injecting their own adware. If you look carefully at your snippet, the variable which stores a GET request has as part of that request a command to pipe part of a google javascript file through it's own code.
A quick look on the web for similar complaints points to the ISP picking some random (the first listed? all?) script tag on the returned page, and rewriting it to point to their own adware script which then pipes the original script through their servers. If I had to guess, I would say they are also probably doing this for their own profit as well (google ad revenue etc, not just by feeding you ads, but possibly rewriting any google analytics calls from the originating script to make it look like their content etc etc).
You should drop them, this is shady and they lie about it. You might also want to drop a line to google. They may or may not be are messing with their analytics but what they are doing is against google policy for ad partners.
I would be curious to see what an https request looks like...