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

g.3gl.net RPC tracking & refresh call fix #17

Open
lukemulks opened this issue Mar 14, 2017 · 5 comments
Open

g.3gl.net RPC tracking & refresh call fix #17

lukemulks opened this issue Mar 14, 2017 · 5 comments
Assignees
Labels

Comments

@lukemulks
Copy link
Collaborator

@lukemulks lukemulks commented Mar 14, 2017

Observed RPC tracking bypassing Shields on boston.com and sfgate.com (likely Google gRPC)

Strong suspicion this is google, or from a google partner. Definite references to hawklogserver domains, but searches result in either pen testing for windows or vague google references. The absence of search results is suspect given the data passed, and behavior of the requests.

I've tested the filter rule and am able to confirm successful blocking, and no noticeable issues with Google access.

Two requests take place, which then refresh. The second request passes ad, cookie and location data from the user, which appears to pass device data as well.

This is what we're blocking:

Request URL:
https://g.3gl.net/jp/100/v2/C

Response:

function RPClient(){}
(function(){RPClient.c =100; RPClient.pu = "r.3gl.net/hawklogserver/r.p"; RPClient.r =2000; document.onConfigLoaded!==undefined&&document.onConfigLoaded();})(); 

Request URL:

http://g.3gl.net/jp/147/v3/M

Response:

var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},PostType,DataWrapper;(function(n){n[n.OnLoad=0]="OnLoad";n[n.OnBeforeUnload=1]="OnBeforeUnload";n[n.OnAbort=2]="OnAbort";n[n.Flush=3]="Flush"})(PostType||(PostType={}));DataWrapper=function(){function n(){this.hasErrors=!1;this._appErrors=null;this.hasIndicators=!1;this._indicators=null;this.hasTracepoints=!1;this._tracepoints=null}return n.prototype.addError=function(n,t){this.hasErrors||(this._appErrors={},this.hasErrors=!0);this._appErrors[n]=t},n.prototype.getErrors=function(){return this._appErrors},n.prototype.addIndicator=function(n,t){this.hasIndicators||(this._indicators={},this.hasIndicators=!0);this._indicators[n]=t},n.prototype.getIndicators=function(){return this._indicators},n.prototype.addTracepoint=function(n,t){this.hasTracepoints||(this._tracepoints={},this.hasTracepoints=!0);this._tracepoints[n]=t},n.prototype.getTracepoints=function(){return this._tracepoints},n}(),function(){var r,i,s;if(document.getElementById&&(window.attachEvent||window.addEventListener)){var t=parent.window,h=t.location,n=t.RProfiler,f=t.WindowEvent,c=h.protocol+"//";f.Unload="unload";var e={Load:f.Load,BeforeUnload:f.BeforeUnload,Unload:f.Unload,Abort:f.Abort,Error:f.Error},o="__CG",l="test",w=3,u={sampleRate:1000,postUrl:c+"r.3gl.net/hawklogserver/r.p",siteId:147,debugParameter:"GlimpseDebug",debugUrl:"g.3gl.net/jp/v3/D",waterfallParameter:"GlimpseWaterfall"};!t.__cpPostUrl||(u.postUrl=t.__cpPostUrl.trim());r=function(){function t(){}return t.addScriptTag=function(n,t){var i=t.document.createElement("script");i.type="text/javascript";i.src=c+n;t.document.body.appendChild(i)},t.getQueryStringValue=function(n){for(var u=h.search.substring(1),r=u.split("&"),t,i=0;i<r.length;i++)if(t=r[i].split("="),t[0]==n)return t[1];return""},t.stopEvents=function(){n&&n.eventManager.clear()},t.setCookie=function(n,t,i,r){var f="",u;!i||(u=new Date,u.setTime(u.getTime()+i*864e5),f="; expires="+u.toUTCString());document.cookie=n+"="+encodeURIComponent(t)+f+"; path=/; domain="+r+";"},t.getCookie=function(n){for(var t,u=document.cookie.split(";"),i=0,r=u;i<r.length;i++)if(t=r[i],n.test(t))return decodeURIComponent(t.substring(t.indexOf("=")+1,t.length));return""},t.PostQueryString="data",t}(),function(n){n[n.UserId="u"]="UserId";n[n.SessionId="s"]="SessionId";n[n.SessionTime="t"]="SessionTime";n[n.PageViewCount="c"]="PageViewCount";n[n.UrlCheckSum="k"]="UrlCheckSum";n[n.PostFlag="f"]="PostFlag";n[n.DomainIndex="i"]="DomainIndex"}(i||(i={})),function(n){n[n.GET=0]="GET";n[n.POST=1]="POST";n[n.HEAD=2]="HEAD";n[n.DELETE=3]="DELETE";n[n.OPTIONS=4]="OPTIONS";n[n.PUT=5]="PUT";n[n.TRACE=6]="TRACE";n[n.CONNECT=7]="CONNECT"}(s||(s={}));var b=function(){function n(){this.userId=-1;this.sessionId=0;this.sessionTime=0;this.pageViewCount=0;this.pageViewId=0;this.postFlag=-1;this.sendWaterfall=!1;this.domainIndex=-1;this.exitToEntry=0}return n.prototype.getText=function(){var n=i.UserId+":"+this.userId+",";return n+=i.SessionId+":"+this.sessionId+",",n+=i.SessionTime+":"+this.sessionTime+",",n+=i.PageViewCount+":"+this.pageViewCount+",",n+=i.UrlCheckSum+":"+this.urlCheckSum+",",n+(i.PostFlag+":"+this.postFlag)},n}(),k=function(){function f(){this.cookieRegex=new RegExp("^(\\s)*"+o+"=","i");this.cookieExpire=365;this.sessionExpire=18e5;this.mainObj=null}return f.prototype.updateSessionTime=function(){if(this.mainObj){var n=(new Date).getTime();n-this.mainObj.sessionTime>this.sessionExpire&&(this.mainObj.sessionId=0);this.mainObj.sessionTime=n;this.updateCookie()}},f.prototype.updateCookie=function(){var u,e,n,t,f,s;if(this.mainObj){if(u=this.mainObj.getText(),!this.domain){if(e=this.mainObj.domainIndex,n=document.domain.split("."),e==-1){for(t=n[n.length-1],f=n.length-2;f>=0;f--)if(t=n[f]+"."+t,r.setCookie(o,u,this.cookieExpire,t),r.getCookie(this.cookieRegex)){this.mainObj.domainIndex=f;this.domain=t;break}return}if(e<n.length)for(t=n[n.length-1],s=n.length-2;s>=e;s--)t=n[s]+"."+t;this.domain=t}u=u+","+i.DomainIndex+":"+this.mainObj.domainIndex;r.setCookie(o,u,this.cookieExpire,this.domain)}},f.prototype.userIdFromCookie=function(n){var r,c,u,o,t,l,f,s,h,e;for(n===void 0&&(n=this.cookieRegex),r=-1,c=document.cookie.split(";"),u=0,o=c;u<o.length;u++)if(t=o[u],n.test(t))for(t=decodeURIComponent(t.substring(t.indexOf("=")+1,t.length)),l=t.split(","),f=0,s=l;f<s.length;f++)if(h=s[f],h.indexOf(i.UserId+":")==0){if(e=h.split(":"),e.length!=2||e[1].length<=0)break;if(r=parseInt(e[1]),!isNaN(r))return r}return isNaN(r)?-1:r},f.prototype.readCookie=function(){var h=r.getCookie(this.cookieRegex),o,f,s,c,e,n,t,l;if(this.mainObj=new b,h){for(o=h.split(","),f=0,s=o;f<s.length;f++)if(c=s[f],e=c.split(":"),e.length==2){n=parseInt(e[1],10);t=e[0];typeof t=="string"&&(t=t.trim());switch(t){case i.UserId:isNaN(n)||(this.mainObj.userId=n);break;case i.SessionId:isNaN(n)||(this.mainObj.sessionId=n);break;case i.SessionTime:isNaN(n)||(this.mainObj.sessionTime=n);break;case i.PageViewCount:isNaN(n)||(this.mainObj.pageViewCount=n);break;case i.PostFlag:isNaN(n)||(this.mainObj.postFlag=n);break;case i.DomainIndex:isNaN(n)||(this.mainObj.domainIndex=n);break;case i.UrlCheckSum:this.mainObj.urlCheckSum=o[1]}}this.mainObj.postFlag==1&&(l=this.mainObj.userId%1e4,l<=u.sampleRate/1e3&&(this.mainObj.sendWaterfall=!0))}},f.prototype.setPostFlag=function(){if(this.mainObj.postFlag=0,u.sampleRate<0){this.mainObj.postFlag=-1;return}var n=this.mainObj.userId%1e4;n<=u.sampleRate&&(this.mainObj.postFlag=1,n<=u.sampleRate/1e3&&(this.mainObj.sendWaterfall=!0))},f.prototype.getReferrer=function(n){for(var i=this.getHostName(n).replace(":","-"),r=n.indexOf("?"),u=0,t=i.length;t<n.length;t++)u+=n.charCodeAt(t)%t;return i+"/"+(r<0?n.length:r)+"/"+n.length+"/"+u},f.prototype.getHostName=function(n){var i=n.indexOf("//")+2,t=n.indexOf("/",i);return i<2&&t==-1?n:(t==-1&&(t=n.length),n.substring(i,t))},f.prototype.loadCookie=function(){var u=n.data.start,i;return(this.readCookie(),this.mainObj.userId==-1&&(i=this.userIdFromCookie(),i!=l&&i>-1&&(this.mainObj.userId=i,this.setPostFlag())),(this.mainObj.userId==-1||this.mainObj.userId==l)&&(this.mainObj.userId=Math.floor(1+Math.random()*((Math.pow(2,64)-2)/2)),this.setPostFlag()),this.mainObj.sessionId==0||u-this.mainObj.sessionTime>this.sessionExpire?(this.mainObj.sessionId=Math.floor(1+Math.random()*((Math.pow(2,32)-2)/2)),this.mainObj.pageViewCount=1):(this.mainObj.pageViewCount<65535&&this.mainObj.pageViewCount++,this.getReferrer(t.document.referrer)==this.mainObj.urlCheckSum&&this.mainObj.sessionTime>0&&(this.mainObj.exitToEntry=u-this.mainObj.sessionTime)),this.mainObj.sessionTime=(new Date).getTime(),this.mainObj.pageViewId=Math.floor(1+Math.random()*((Math.pow(2,16)-2)/2)),this.mainObj.urlCheckSum=this.getReferrer(t.location.href),this.updateCookie(),r.getCookie(this.cookieRegex)=="")?!1:!0},f.prototype.shouldPost=function(){return this.mainObj.postFlag==1},f}(),a=function(){function n(n){this.char=n;this.children=[]}return n}(),d=function(){function n(){this.root=new a("");this.isReversed=!0}return n.prototype.add=function(n,t){var u,i,f,e,r;for(n===void 0&&(n=this.root),u=n.children,i=0,f=u;i<f.length;i++)if(e=f[i],e.char==t)return e;return r=new a(t),u.push(r),r.parent=n,r},n.prototype.toObject=function(){var n={},t=this.isReversed;return function i(n,r){var o=n.char=="",e,u,f;if(o)e=r;else{if(u=n.char,n.children.length==1)while(n.children.length==1)n=n.children[0],u=t?n.char+u:u+n.char;r[u]=n.data||{};e=r[u]}for(f=0;f<n.children.length;f++)i(n.children[f],e)}(this.root,n),n},n}(),v=function(){function n(){this.dns=0;this.connect=0;this.load=0;this.wait=0;this.duration=0;this.redirect=0;this.ssl=0}return Object.defineProperty(n.prototype,"url",{get:function(){return this._url},set:function(n){var i,t,u,r;n.indexOf("http://")!=-1?this.protocol=0:n.indexOf("https://")!=-1&&(this.protocol=1);i=n.split("/").slice(1,3).join("");t=i.indexOf(":");t!=-1&&(u=i.substr(t+1),r=parseInt(u),isNaN(r)||(this.port=r));n=n.substr(n.indexOf(i)+i.length);t=n.indexOf("?");t!=-1&&(n=n.substr(0,t));t=n.indexOf("#");t!=-1&&(n=n.substr(0,t));n=n.substr(0,64);this._url=n},enumerable:!0,configurable:!0}),n.prototype.translateForPost=function(){var t=Math.round,i={u:this.url,pr:this.protocol},n=function(n,t){typeof t=="number"&&(i[n]=t)};return n("pt",this.port),n("dn",t(this.dns)),n("fc",t(this.connect)),n("ld",t(this.load)),n("wt",t(this.wait)),n("rd",t(this.redirect)),n("dr",t(this.duration)),n("ssl",t(this.ssl)),i},n}(),y=function(n){function t(t){n.call(this);this.count=1;this.responseTime=0;this.sendSize=0;this.responseSize=0;this.method=s[t.method.toUpperCase()];t.complete&&t.connectionEstablished&&(this.responseTime=t.complete-t.connectionEstablished);this.sendSize=t.sendSize||0;this.responseSize=t.responseSize||0}return __extends(t,n),t.prototype.translateForPost=function(){var t=n.prototype.translateForPost.call(this);return t.n=this.count,t.md=this.method,t.rp=Math.round(this.responseTime),t.ss=this.sendSize,t.rs=this.responseSize,t},t}(v),g=function(){function n(){this.count=1;this.dns=0;this.connect=0;this.load=0;this.wait=0;this.duration=0;this.ssl=0}return n.prototype.addAjaxItem=function(n){var i,r,t;if(typeof this._ajax=="undefined"){this._ajax=[];this._ajax.push(n);return}for(i=0,r=this._ajax;i<r.length;i++)if(t=r[i],t.url==n.url){t.count++;t.dns+=n.dns;t.connect+=n.connect;t.load+=n.load;t.wait+=n.wait;t.duration+=n.duration;t.redirect+=n.redirect;t.ssl+=n.ssl;t.responseTime+=n.responseTime;t.sendSize+=n.sendSize;t.responseSize+=n.responseSize;return}this._ajax.length<10&&this._ajax.push(n)},n.prototype.translateForPost=function(){var n=Math.round;return{n:this.count,dn:n(this.dns),fc:n(this.connect),ld:n(this.load),wt:n(this.wait),dr:n(this.duration),ssl:n(this.ssl)}},n}(),nt=function(){function n(){this._resources=[]}return n.prototype.addWaterfallItem=function(n){this._resources.push(n)},n.prototype.translateForPost=function(){for(var r,t=[],n=0,i=this._resources;n<i.length;n++)r=i[n],t.push(r.translateForPost());return t},n}(),p=function(n){function t(){n.apply(this,arguments);this.maxJsErrors=10;this.charCodes={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\","&":"%26"};this.strRegex=/["&\\\x00-\x1f\x7f-\x9f]/g}return __extends(t,n),t.prototype.toString=function(n){var t=this.translateForPost(n);return typeof JSON=="undefined"?this.jsonStringify(t):JSON.stringify(t)},t.prototype.strEscape=function(n){var i=this.charCodes[n],t;return i?i:(t=n.charCodeAt(0),"\\u00"+Math.floor(t/16).toString(16)+(t%16).toString(16))},t.prototype.jsonStringify=function(n){var t=[],i,u,e,r,f;switch(typeof n){case"string":return this.strRegex.test(n)?'"'+n.replace(this.strRegex,this.strEscape)+'"':'"'+n+'"';case"number":return isFinite(n)?String(n):"null";case"boolean":case"null":return String(n);case"object":if(!n)return"null";if(n.constructor===Date,typeof n.length=="number"&&!n.propertyIsEnumerable("length")){for(i=0,u=n;i<u.length;i++)e=u[i],t.push(this.jsonStringify(e));return"["+t.join(",")+"]"}for(r in n)typeof r=="string"&&(f=this.jsonStringify(n[r]),!f||t.push(this.jsonStringify(r)+":"+f));return"{"+t.join(",")+"}"}return""},t.prototype.translateForPost=function(n){var t={},r,i,u;if(t.v=w,t.pt=this.postType,t.ui=this.userId,t.si=this.sessionId,t.di=this.siteId,t.pi=this.pageViewId,t.jsc=this.jsErrorCount||0,t.rf=this.referrer,t.pc=this.pageViewCount,t.dh=this.screenHeight,t.dw=this.screenWidth,t.rc=this.redirectCount||0,t.jsc=this.jsErrorCount||0,this.jsErrors&&this.jsErrors.length>0){for(r=[],i=0;i<Math.min(this.jsErrors.length,this.maxJsErrors);i++)r.push(this.translateErrorForPost(this.jsErrors[i]));t.jse=r}return(this.hasErrors&&(t.ae=this.getErrors()),this.hasIndicators&&(t.ind=this.getIndicators()),this.hasTracepoints&&(t.tra=this.getTracepoints()),this.isConversion&&(t.cv=this.isConversion?1:0,this.revenue&&(t.rv=this.revenue),this.revenueItems&&(t.ri=this.revenueItems)),this.pageGroup&&(t.pg=this.pageGroup),this.variation&&(t.ab=this.variation),(this.resources||this.ajaxRequests)&&(u=this.translateResources(this.resources,this.ajaxRequests,n),t.res=u),!this.isNewPageView)?(t.np=0,t):(t.np=1,t.dn=this.dns,t.fc=this.fullConnect,t.wt=this.wait,t.ld=this.load,t.de=this.domInteractive,t.dl=this.domLoaded,t.dc=this.docComplete,t.rp=this.response,t.cl=this.contentLoad,t.rd=this.redirect,t.dh=this.screenHeight,t.dw=this.screenWidth,t.rc=this.redirectCount||0,this.secureConnect&&(t.sc=this.secureConnect),this.exitToEntry&&(t.xe=this.exitToEntry),this.entryToOnLoad&&(t.el=this.entryToOnLoad),this.spdyVersion&&(t.sv=this.spdyVersion),this.prerender&&(t.pr=this.prerender),t)},t.prototype.translateErrorForPost=function(n){var t={},i,r;return t.m=n.message,t.n=n.lineNumber,t.c=n.count+1,i=n.url,r=i.indexOf("?"),r!=-1&&(i=i.substr(0,r)),t.u=i,t},t.prototype.translateResources=function(n,t,i){var k=!!n,ot=!!t,l,it,f,s,rt,ut,h,v,y,e,o,ft,et,p,w,b,ct;if(!k&&!ot)return null;i=i||!!r.getQueryStringValue(u.waterfallParameter);var st=function(n){var i,r,u;if(!k||!ot)return null;for(i=0,r=t;i<r.length;i++)if(u=r[i],u.url==n.name)return u;return null},c={},tt=[],ht,lt=(n||[]).concat(t||[]);for(l=0,it=lt;l<it.length;l++)if((f=it[l],f)&&(s=(f.name||f.url).split("/").slice(1,3).join(""),s&&s.length!=0)){rt=s.indexOf(":");rt!=-1&&(s=s.substr(0,rt));c.hasOwnProperty(s)||(c[s]=i?new nt:new g);var a=c[s],vt=typeof f.domainLookupStart=="number",at=f.constructor.name=="AjaxTiming"||typeof f.getPerformanceTimings=="function";if(at){ht=f;tt.indexOf(ht.wait)==-1&&(ut=this.getWaterfallItem(f),i?(v=a,v.addWaterfallItem(ut)):(e=a,e.count++,e.addAjaxItem(ut)));continue}h=null;i?(v=a,y=this.getWaterfallItem(f,st(f)),v.addWaterfallItem(y),y.constructor.name=="AjaxItem"&&(h=y,tt.push(h.wait))):(e=a,e.count++,k?(o=f,e.dns+=o.domainLookupEnd-o.domainLookupStart,e.connect+=o.connectEnd-o.connectStart,e.load+=o.responseEnd-o.responseStart,e.wait+=o.startTime,e.duration+=o.duration,o.secureConnectionStart&&(e.ssl+=o.connectEnd-o.secureConnectionStart),ft=st(f),ft!=null&&(h=this.getWaterfallItem(f,ft),e.addAjaxItem(h))):(h=this.getWaterfallItem(f),e.addAjaxItem(h)),h!=null&&tt.push(h.wait))}et=new d;for(p in c){for(w=undefined,b=p.length-1;b>=0;b--)ct=p[b],w=et.add(w,ct);w.data=c[p].translateForPost()}return et.toObject()},t.prototype.getWaterfallItem=function(n,t){var u=typeof n.domainLookupStart=="number",i,r;return u?(i=t?new y(t):new v,r=n,i.url=r.name,i.dns=r.domainLookupEnd-r.domainLookupStart,i.connect=r.responseEnd-r.responseStart,i.wait=r.startTime,i.duration=r.duration,i.redirect=r.redirectEnd-r.redirectStart,r.secureConnectionStart&&(i.ssl=r.connectEnd-r.secureConnectionStart)):(t=n,i=new y(t),i.url=t.url,i.dns=t.dns,i.connect=t.connect,i.wait=t.wait,i.duration=t.duration,i.redirect=t.redirect,i.ssl=t.ssl),i},t}(DataWrapper),tt=function(){function i(){var i=this,f;if(this.visitor=new k,this.postUrl=u.postUrl,this.prevPostObj=null,this.didSendInitial=!1,this.didUnloadPost=!1,this.isDebugging=!1,this.registerPageLoad=function(){if(i.isDebugging){n.debugData=i.createInitPostObject(PostType.OnLoad);r.stopEvents();r.addScriptTag(u.debugUrl,t);return}if(i.visitor.shouldPost()){if(!n.data.loadFired){setTimeout(i.registerPageLoad,100);return}i.doPostReport(PostType.OnLoad,!0)}},this.doPostBeforeUnload=function(){i.visitor.shouldPost()&&!i.didUnloadPost&&(i.didUnloadPost=!0,i.visitor.updateSessionTime(),n.data.loadFired?i.doPostReport(PostType.OnBeforeUnload,!1):i.doPostReport(PostType.OnAbort,!0))},n&&n.data&&!this.didSendInitial){if(this.didSendInitial=!0,f=this.visitor.loadCookie(),this.isDebugging=!!r.getQueryStringValue(u.debugParameter),!this.isDebugging&&!f){r.stopEvents();return}n.data.loadFired?this.registerPageLoad():n.eventManager.add(e.Load,parent.window,this.registerPageLoad);n.eventManager.add(e.BeforeUnload,t,this.doPostBeforeUnload);n.eventManager.add(e.Unload,t,this.doPostBeforeUnload)}}return i.prototype.doPostReport=function(n,t){var r,u,i;if(t){if(r=this.createInitPostObject(n),r.siteId==-1)return}else r=this.createDiffPostObject(n,this.prevPostObj);u=r.toString(this.visitor.mainObj.sendWaterfall);i=new XMLHttpRequest;window.XDomainRequest&&(i=new window.XDomainRequest,i.timeout=0,i.onload=function(){},i.onerror=function(){},i.ontimeout=function(){},i.onprogress=function(){});i.open("POST",this.postUrl,!0);i.setRequestHeader?i.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"):null;i.send(u);i=null;this.prevPostObj=r},i.prototype.createInitPostObject=function(i){var r=new p,e,o,f,s;return r.postType=i,r.isNewPageView=!0,r.siteId=u.siteId,r.referrer=encodeURI(t.location.href),e=this.visitor.mainObj,r.userId=e.userId,r.sessionId=e.sessionId,r.pageViewId=e.pageViewId,r.pageViewCount=e.pageViewCount,r.screenHeight=screen.height,r.screenWidth=screen.width,n.data.jsCount>0&&(r.jsErrorCount=n.data.jsCount,r.jsErrors=n.data.jsErrors),e.exitToEntry>0&&(r.exitToEntry=e.exitToEntry),o=n.data.loadTime-n.data.start,o>0&&(r.entryToOnLoad=o),t.performance&&(f=t.performance.timing,r.dns=f.domainLookupEnd-f.domainLookupStart,r.fullConnect=f.connectEnd-f.connectStart,r.wait=f.responseStart-f.requestStart,r.load=f.responseEnd-f.responseStart,r.domInteractive=f.domInteractive-f.navigationStart,r.domLoaded=f.domContentLoadedEventStart-f.navigationStart,r.docComplete=f.domComplete-f.navigationStart,r.response=f.responseEnd-f.navigationStart,r.contentLoad=f.loadEventStart-f.domLoading,r.redirect=f.redirectEnd-f.redirectStart,f.secureConnectionStart&&(r.secureConnect=f.connectEnd-f.secureConnectionStart),t.performance.navigation&&(r.redirectCount=t.performance.navigation.redirectCount),t.performance.getEntriesByType&&(r.resources=t.performance.getEntriesByType("resource"))),t.chrome&&t.chrome.loadTimes&&(s=t.chrome.loadTimes(),s.wasFetchedViaSpdy&&(r.spdyVersion=s.npnNegotiatedProtocol)),document.webkitVisibilityState==="prerender"&&(r.prerender=1),n.hasInsight&&(this.addInsightForPost(r),n.clearInfo()),n.data.ajax&&(r.ajaxRequests=n.data.ajax.slice()),r},i.prototype.createDiffPostObject=function(i,r){var u=new p,e,f;return u.postType=i,u.isNewPageView=!1,u.userId=r.userId,u.sessionId=r.sessionId,u.siteId=r.siteId,u.pageViewId=r.pageViewId,u.pageViewCount=r.pageViewCount,u.referrer=r.referrer,u.screenHeight=screen.height,u.screenWidth=screen.width,n.data.jsCount>0&&n.data.jsCount>r.jsErrorCount&&(u.jsErrorCount=n.data.jsCount-r.jsErrorCount,u.jsErrors=n.data.jsErrors.slice(-u.jsErrorCount)),t.performance&&(t.performance.navigation&&(f=t.performance.navigation.redirectCount,f>0&&f>r.redirectCount&&(u.redirectCount=f-r.redirectCount)),t.performance.getEntriesByType&&(e=t.performance.getEntriesByType("resource"),e.length>r.resources.length&&(u.resources=e.slice(r.resources.length)))),n.data.ajax&&n.data.ajax.length>r.ajaxRequests.length&&(f=r.ajaxRequests.length,u.ajaxRequests=n.data.ajax.slice(f)),n.hasInsight&&this.addInsightForPost(u),u},i.prototype.addInsightForPost=function(t){var f=n.info,r,s,o,e,u,h,c,i;for(r in f)switch(r){case"appError":if(i=f[r],i&&typeof i=="object")for(e in i)(o=Number(e),isNaN(o))||(u=i[e],u&&typeof u=="string"&&(s=u,s.length>32&&(s=s.substring(0,32)),t.addError(e,s)));break;case"conversion":if(i=f[r],t.isConversion=!0,i&&typeof i=="object")for(e in i)(o=Number(e),isNaN(o))||(u=i[e],u&&typeof u=="number"&&(t.revenue=o,t.revenueItems=u));break;case"indicator":h=this.buildInsight(f[r],0);h[0]&&t.addIndicator(h[1],h[2]);break;case"tracepoint":c=this.buildInsight(f[r],"");c[0]&&t.addTracepoint(c[1],c[2]);break;case"pageGroup":i=f[r];i!==undefined&&typeof i=="string"&&(t.pageGroup=i);break;case"variation":i=f[r];i!==undefined&&typeof i=="string"&&(t.variation=i)}},i.prototype.buildInsight=function(n,t){var f,i=!1,r,u;if(n&&typeof n=="object")for(r in n)r&&(u=n[r],u&&typeof u==typeof t&&(f=[r,u],i=!0));return i?[i,f[0],f[1]]:[i,"",t]},i}(),it=new tt}}();`

**This filter will block:** `||g.3gl.net^`
@lukemulks lukemulks self-assigned this Mar 14, 2017
@lukemulks
Copy link
Collaborator Author

@lukemulks lukemulks commented Mar 14, 2017

PR #18

@lukemulks
Copy link
Collaborator Author

@lukemulks lukemulks commented Mar 14, 2017

Merged

@lukemulks
Copy link
Collaborator Author

@lukemulks lukemulks commented Mar 15, 2017

Re-opening - We need to expand this to cover more domains, or apply as a global filter. Investigating. This is a bad one.

@lukemulks lukemulks reopened this Mar 15, 2017
@lukemulks
Copy link
Collaborator Author

@lukemulks lukemulks commented May 10, 2017

This is tied to IL - going to try some fixes for this in brave, and in this repo.

@ghajini
Copy link

@ghajini ghajini commented Oct 12, 2017

Does brave browser team stopped acting against IL.....no commit since 4months on this IL crap?
Iam on brave browser android....

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.