How to avoid ISP ads injection (HTTP)










0















So basically when I type a site in a browser casually (without "http://" or without "https://"), I got a script.
That script was sent by (I guess) my MiFi whenever I wanted to go to sites without http or https. So I



  • deleted all my browser histories, caches, etc from the beginning, yeah.

  • disabled all of my extensions/add-ons

and then tried by first accessing some secure sites;
http://[somesite].com and normally it should correct itself as https://www.[somesite].com or changed into my country domain (*.id) or something close. But it didn't happen. Instead I got redirected into some ads site (provided by my ISP) and in that ads site contains this script:



function go(w, u) 
xc = 1;
w.frames[0].location = u;

var flag_lte = 1;
var xu = 'http://192.168.185.20:8080/CustomerInfo/',
lxu = xu + 'Customer';
var xc = -1,
d = document,
w = window,
ip = '100.117.19.229',
vid = '348',
md = '6288801745015&md_w=1',
u = location.href,
hs = location.hostname;
gd = d.createElement("script");
gd.src = xu + "m.js";
d.documentElement.firstChild.appendChild(gd);
var s = 'http://192.168.185.20:8080/CustomerInfo/Customer?mdn=' + md + '&user-agent=Samsung&url=' + encodeURIComponent("http://www.pondokjeruk.com/2017/08/belajar-gitar-harus-pada-ahlinya.html") + '&lac=3015&ci=78234145';
if (hs.indexOf("www.") == 0) mp = 'yes';
else mp = 'no,initial-scale=1';
var mt = d.createElement('meta');
mt.id = "xwa";
mt.name = "viewport";
mt.content = "width=device-width,user-scalable=" + mp;
d.getElementsByTagName('head')[0].appendChild(mt);
var mt2 = d.createElement('meta');
mt2.charset = "utf-8";
d.getElementsByTagName('head')[0].appendChild(mt2);



So, I have



  • Enabled my UblockOrigin extension and added the source of the script in the filter

  • Disabled all javascript by default (except the white-listed sites) using uMatrix

  • Changed the reqs http header given by this tutorial (written in Bahasa).

then try without "http://" or "https://" (again) and the result was blank html. It got resolved by a refresh instead. But it still annoys me af. The devide is locked.




So I the easiest way to solved this is using VPN, yeah. But I want some of your suggestions, guys. Like some script for Tampermonkey/GreaseMonkey to solve this iframe ads.



Thanks for the time.










share|improve this question






















  • Arrgh same problem (using biggest provider in our country ID). I tried to call the API in my vps which only enter the IP address (not domain), which issued the first request output Ads injection from the provider not Json file. I try not to use http but my android apps force close.

    – Irvan Dwi Pangga
    Jan 25 at 6:50
















0















So basically when I type a site in a browser casually (without "http://" or without "https://"), I got a script.
That script was sent by (I guess) my MiFi whenever I wanted to go to sites without http or https. So I



  • deleted all my browser histories, caches, etc from the beginning, yeah.

  • disabled all of my extensions/add-ons

and then tried by first accessing some secure sites;
http://[somesite].com and normally it should correct itself as https://www.[somesite].com or changed into my country domain (*.id) or something close. But it didn't happen. Instead I got redirected into some ads site (provided by my ISP) and in that ads site contains this script:



function go(w, u) 
xc = 1;
w.frames[0].location = u;

var flag_lte = 1;
var xu = 'http://192.168.185.20:8080/CustomerInfo/',
lxu = xu + 'Customer';
var xc = -1,
d = document,
w = window,
ip = '100.117.19.229',
vid = '348',
md = '6288801745015&md_w=1',
u = location.href,
hs = location.hostname;
gd = d.createElement("script");
gd.src = xu + "m.js";
d.documentElement.firstChild.appendChild(gd);
var s = 'http://192.168.185.20:8080/CustomerInfo/Customer?mdn=' + md + '&user-agent=Samsung&url=' + encodeURIComponent("http://www.pondokjeruk.com/2017/08/belajar-gitar-harus-pada-ahlinya.html") + '&lac=3015&ci=78234145';
if (hs.indexOf("www.") == 0) mp = 'yes';
else mp = 'no,initial-scale=1';
var mt = d.createElement('meta');
mt.id = "xwa";
mt.name = "viewport";
mt.content = "width=device-width,user-scalable=" + mp;
d.getElementsByTagName('head')[0].appendChild(mt);
var mt2 = d.createElement('meta');
mt2.charset = "utf-8";
d.getElementsByTagName('head')[0].appendChild(mt2);



So, I have



  • Enabled my UblockOrigin extension and added the source of the script in the filter

  • Disabled all javascript by default (except the white-listed sites) using uMatrix

  • Changed the reqs http header given by this tutorial (written in Bahasa).

then try without "http://" or "https://" (again) and the result was blank html. It got resolved by a refresh instead. But it still annoys me af. The devide is locked.




So I the easiest way to solved this is using VPN, yeah. But I want some of your suggestions, guys. Like some script for Tampermonkey/GreaseMonkey to solve this iframe ads.



Thanks for the time.










share|improve this question






















  • Arrgh same problem (using biggest provider in our country ID). I tried to call the API in my vps which only enter the IP address (not domain), which issued the first request output Ads injection from the provider not Json file. I try not to use http but my android apps force close.

    – Irvan Dwi Pangga
    Jan 25 at 6:50














0












0








0








So basically when I type a site in a browser casually (without "http://" or without "https://"), I got a script.
That script was sent by (I guess) my MiFi whenever I wanted to go to sites without http or https. So I



  • deleted all my browser histories, caches, etc from the beginning, yeah.

  • disabled all of my extensions/add-ons

and then tried by first accessing some secure sites;
http://[somesite].com and normally it should correct itself as https://www.[somesite].com or changed into my country domain (*.id) or something close. But it didn't happen. Instead I got redirected into some ads site (provided by my ISP) and in that ads site contains this script:



function go(w, u) 
xc = 1;
w.frames[0].location = u;

var flag_lte = 1;
var xu = 'http://192.168.185.20:8080/CustomerInfo/',
lxu = xu + 'Customer';
var xc = -1,
d = document,
w = window,
ip = '100.117.19.229',
vid = '348',
md = '6288801745015&md_w=1',
u = location.href,
hs = location.hostname;
gd = d.createElement("script");
gd.src = xu + "m.js";
d.documentElement.firstChild.appendChild(gd);
var s = 'http://192.168.185.20:8080/CustomerInfo/Customer?mdn=' + md + '&user-agent=Samsung&url=' + encodeURIComponent("http://www.pondokjeruk.com/2017/08/belajar-gitar-harus-pada-ahlinya.html") + '&lac=3015&ci=78234145';
if (hs.indexOf("www.") == 0) mp = 'yes';
else mp = 'no,initial-scale=1';
var mt = d.createElement('meta');
mt.id = "xwa";
mt.name = "viewport";
mt.content = "width=device-width,user-scalable=" + mp;
d.getElementsByTagName('head')[0].appendChild(mt);
var mt2 = d.createElement('meta');
mt2.charset = "utf-8";
d.getElementsByTagName('head')[0].appendChild(mt2);



So, I have



  • Enabled my UblockOrigin extension and added the source of the script in the filter

  • Disabled all javascript by default (except the white-listed sites) using uMatrix

  • Changed the reqs http header given by this tutorial (written in Bahasa).

then try without "http://" or "https://" (again) and the result was blank html. It got resolved by a refresh instead. But it still annoys me af. The devide is locked.




So I the easiest way to solved this is using VPN, yeah. But I want some of your suggestions, guys. Like some script for Tampermonkey/GreaseMonkey to solve this iframe ads.



Thanks for the time.










share|improve this question














So basically when I type a site in a browser casually (without "http://" or without "https://"), I got a script.
That script was sent by (I guess) my MiFi whenever I wanted to go to sites without http or https. So I



  • deleted all my browser histories, caches, etc from the beginning, yeah.

  • disabled all of my extensions/add-ons

and then tried by first accessing some secure sites;
http://[somesite].com and normally it should correct itself as https://www.[somesite].com or changed into my country domain (*.id) or something close. But it didn't happen. Instead I got redirected into some ads site (provided by my ISP) and in that ads site contains this script:



function go(w, u) 
xc = 1;
w.frames[0].location = u;

var flag_lte = 1;
var xu = 'http://192.168.185.20:8080/CustomerInfo/',
lxu = xu + 'Customer';
var xc = -1,
d = document,
w = window,
ip = '100.117.19.229',
vid = '348',
md = '6288801745015&md_w=1',
u = location.href,
hs = location.hostname;
gd = d.createElement("script");
gd.src = xu + "m.js";
d.documentElement.firstChild.appendChild(gd);
var s = 'http://192.168.185.20:8080/CustomerInfo/Customer?mdn=' + md + '&user-agent=Samsung&url=' + encodeURIComponent("http://www.pondokjeruk.com/2017/08/belajar-gitar-harus-pada-ahlinya.html") + '&lac=3015&ci=78234145';
if (hs.indexOf("www.") == 0) mp = 'yes';
else mp = 'no,initial-scale=1';
var mt = d.createElement('meta');
mt.id = "xwa";
mt.name = "viewport";
mt.content = "width=device-width,user-scalable=" + mp;
d.getElementsByTagName('head')[0].appendChild(mt);
var mt2 = d.createElement('meta');
mt2.charset = "utf-8";
d.getElementsByTagName('head')[0].appendChild(mt2);



So, I have



  • Enabled my UblockOrigin extension and added the source of the script in the filter

  • Disabled all javascript by default (except the white-listed sites) using uMatrix

  • Changed the reqs http header given by this tutorial (written in Bahasa).

then try without "http://" or "https://" (again) and the result was blank html. It got resolved by a refresh instead. But it still annoys me af. The devide is locked.




So I the easiest way to solved this is using VPN, yeah. But I want some of your suggestions, guys. Like some script for Tampermonkey/GreaseMonkey to solve this iframe ads.



Thanks for the time.







javascript code-injection






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '18 at 1:01









QmcLQmcL

61




61












  • Arrgh same problem (using biggest provider in our country ID). I tried to call the API in my vps which only enter the IP address (not domain), which issued the first request output Ads injection from the provider not Json file. I try not to use http but my android apps force close.

    – Irvan Dwi Pangga
    Jan 25 at 6:50


















  • Arrgh same problem (using biggest provider in our country ID). I tried to call the API in my vps which only enter the IP address (not domain), which issued the first request output Ads injection from the provider not Json file. I try not to use http but my android apps force close.

    – Irvan Dwi Pangga
    Jan 25 at 6:50

















Arrgh same problem (using biggest provider in our country ID). I tried to call the API in my vps which only enter the IP address (not domain), which issued the first request output Ads injection from the provider not Json file. I try not to use http but my android apps force close.

– Irvan Dwi Pangga
Jan 25 at 6:50






Arrgh same problem (using biggest provider in our country ID). I tried to call the API in my vps which only enter the IP address (not domain), which issued the first request output Ads injection from the provider not Json file. I try not to use http but my android apps force close.

– Irvan Dwi Pangga
Jan 25 at 6:50













0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53310999%2fhow-to-avoid-isp-ads-injection-http%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53310999%2fhow-to-avoid-isp-ads-injection-http%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Barbados

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3