: Blocking the ISP's ads appearing after a possible DNS grab and redirect via port 53? Whenever I switch on my modem and try to connect to the internet, my ISP redirects me to their website.
Whenever I switch on my modem and try to connect to the internet, my ISP redirects me to their website. I'm assuming they are grabbing DNS requests and redirecting them using port 53. A video of it and a supposed explanation of it.
This happens once which is tolerable, but it gets annoying when ads start showing up at the bottom right corner of the screen at random times, but mostly within a few seconds of me opening a page of a random website; not for every page I open though. Only sometimes. (ad showed up twice while I was typing this question!!!).
What I tried:
NoScript doesn't block it.
Since the redirection happens through 117.239.236.100, I added
that address as a filter rule in AdBlock, but it doesn't get blocked.
Wrote a GreaseMonkey script which didn't block it.
// ==UserScript==
// @name BSNLadblock
// @namespace bsnl
// @include *
// @version 1
// @grant none
// ==/UserScript==
var bulletinPrefix="__BULLETIN__";
var bulletinForm=bulletinPrefix+"bulletinForm";
var bulletinDiv=bulletinPrefix+"bdiv";
var div = document.getElementById(bulletinDiv);
setInterval(function(){
if (div) {
console.log(bulletinDiv);
console.log(div);
div.style.display = "none"; // Hides it
div.parentNode.removeChild(div); // Removes it entirely
}
}, 3000);
What the ISP is using:
The moment the ad appears, I save the page and am able to find a JavaScript file which appears with a different name each time. These are some of the contents:
var namePrefix="";
var bulletinPrefix="__BULLETIN__";
var bulletinForm=bulletinPrefix+"bulletinForm";
var bulletinDiv=bulletinPrefix+"bdiv";
var bulletinJS=false;
var bulletinIncluded=true;
another snippet
jsBulletin("GET /dyn/bg/BSNL-FTTH/index.js?policy=27&policyname=BSNL-FTTH&time=1461310911&webServer=http://117.239.236.100&url=http%3A%2F%2Fwww.googletagservices.com%2Ftag%2Fjs%2Fgpt.js HTTP/1.1");
var bdivButton = bulletinPrefix + "bdivButton";
var bdivImage = bulletinPrefix + "bdivImage";
function afterRender () {
var height = bdiv.offsetHeight;
bdiv.style.display = "none";
bdiv.offsetHeight;
bdiv.style.display = "block";
if (isMobile()) bgv_height /= 2;
document.getElementById(bdivImage).style.height = bgv_height + 'px';
if (bdiv.style.WebkitTransition) bdiv.style.WebkitTransition = 'top ' + (bgv_duration) + 's ease ' + (bgv_delay) + 's';
bdiv.style.transition = 'top ' + (bgv_duration) + 's ease ' + (bgv_delay) + 's';
bdiv.style.top = (parseInt(bdiv.style.top) - bdiv.offsetHeight + height) + 'px';
bdiv.offsetHeight;
if (bdiv.style.WebkitTransition) bdiv.style.WebkitTransition = "top 0s ease 0s";
bdiv.style.transition = "top 0s ease 0s";
}
another snippet:
buttons.push(new button(bdivButton, 'click', imageClicked));
bulletinWrite(' <DIV style="overflow:hidden; position:absolute; right:0; top:0; z-index:9999999999;">');
makeButton("Close", "Close", "", "CloseButton.png");
bulletinWrite(' </DIV>');
bulletinClose();
}
})();
I've checked the div name I'm using in the GreaseMonkey script. It matches the div of the ad. But I'm surprised it still doesn't get blocked. Do you know how to stop these ads? I could share the entire js file if you'd like to see it on something like pastebin.
Update:
Related: superuser.com/questions/902635/isp-is-inserting-ads-into-web-pages and bitsnapper.com/how-to-block-intrusive-mtnl-broadband-ad-popups-in-your-browser/
More posts by @Samaraweera270
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.