by ceri » Sat Dec 12, 2015 9:21 pm
barbaz wrote:???
Thanks for testing but that result makes zero sense to me - I literally just copy-pasted some NoScript internal code into the surrogate and stuck a console.log() in there... I'm surprised that A) it works, and B) there are no log entries from the inserted console.log call.
Are you sure that the surrogate is running? If you have any doubt, stick something like this at the very beginning of the surrogate
and see if you get an alert notification dialog.
I stuck the alert here and it worked:
Code: Select all
let dbp=function(s){alert("AAAAAAAAAAAAAAAAAA!!!!");let handler={get:function(t,n)n in t?t[n]:function(){console.log(n);return t.__noSuchMethod__(n,Array.prototype.slice.call(arguments))}};return new Proxy(s||{},handler)};(function(){var _0=dbp(function()_0),_u=function(){};_0.__noSuchMethod__=_0;('ga'in window)||(ga=_u);with(window)urchinTracker=_u,_gaq=dbp({__noSuchMethod__:_0,push:function(f){if(typeof f=='function')f();else if(f&&f.shift&&f[0]in this)this[f.shift()].apply(this,f)},_set:function(a,b){if(typeof b=='function')b()},_link:function(h){if(h)location.href=h},_linkByPost:function(f){if(f&&f.submit)f.submit();return true},_getLinkerUrl:function(u){return u},_trackEvent:_0}),_gat=dbp({__noSuchMethod__:function(){return _gaq}})})()
When I move it next to console.log(), I get no alert
Code: Select all
let dbp=function(s){let handler={get:function(t,n)n in t?t[n]:function(){alert("AAAAAAAAAAAAAAAAAA!!!!");console.log(n);return t.__noSuchMethod__(n,Array.prototype.slice.call(arguments))}};return new Proxy(s||{},handler)};(function(){var _0=dbp(function()_0),_u=function(){};_0.__noSuchMethod__=_0;('ga'in window)||(ga=_u);with(window)urchinTracker=_u,_gaq=dbp({__noSuchMethod__:_0,push:function(f){if(typeof f=='function')f();else if(f&&f.shift&&f[0]in this)this[f.shift()].apply(this,f)},_set:function(a,b){if(typeof b=='function')b()},_link:function(h){if(h)location.href=h},_linkByPost:function(f){if(f&&f.submit)f.submit();return true},_getLinkerUrl:function(u){return u},_trackEvent:_0}),_gat=dbp({__noSuchMethod__:function(){return _gaq}})})()
[quote="barbaz"]???
Thanks for testing but that result makes zero sense to me - I literally just copy-pasted some NoScript internal code into the surrogate and stuck a console.log() in there... I'm surprised that A) it works, and B) there are no log entries from the inserted console.log call.
Are you sure that the surrogate is running? If you have any doubt, stick something like this at the very beginning of the surrogate
[code]alert("AAAAAAAAAAAAAAAAAA!!!!");[/code]
and see if you get an alert notification dialog.[/quote]
I stuck the alert here and it worked:
[code]let dbp=function(s){alert("AAAAAAAAAAAAAAAAAA!!!!");let handler={get:function(t,n)n in t?t[n]:function(){console.log(n);return t.__noSuchMethod__(n,Array.prototype.slice.call(arguments))}};return new Proxy(s||{},handler)};(function(){var _0=dbp(function()_0),_u=function(){};_0.__noSuchMethod__=_0;('ga'in window)||(ga=_u);with(window)urchinTracker=_u,_gaq=dbp({__noSuchMethod__:_0,push:function(f){if(typeof f=='function')f();else if(f&&f.shift&&f[0]in this)this[f.shift()].apply(this,f)},_set:function(a,b){if(typeof b=='function')b()},_link:function(h){if(h)location.href=h},_linkByPost:function(f){if(f&&f.submit)f.submit();return true},_getLinkerUrl:function(u){return u},_trackEvent:_0}),_gat=dbp({__noSuchMethod__:function(){return _gaq}})})()[/code]
When I move it next to console.log(), I get no alert
[code]let dbp=function(s){let handler={get:function(t,n)n in t?t[n]:function(){alert("AAAAAAAAAAAAAAAAAA!!!!");console.log(n);return t.__noSuchMethod__(n,Array.prototype.slice.call(arguments))}};return new Proxy(s||{},handler)};(function(){var _0=dbp(function()_0),_u=function(){};_0.__noSuchMethod__=_0;('ga'in window)||(ga=_u);with(window)urchinTracker=_u,_gaq=dbp({__noSuchMethod__:_0,push:function(f){if(typeof f=='function')f();else if(f&&f.shift&&f[0]in this)this[f.shift()].apply(this,f)},_set:function(a,b){if(typeof b=='function')b()},_link:function(h){if(h)location.href=h},_linkByPost:function(f){if(f&&f.submit)f.submit();return true},_getLinkerUrl:function(u){return u},_trackEvent:_0}),_gat=dbp({__noSuchMethod__:function(){return _gaq}})})()[/code]