by geocar · 5y ago · 0 comments
> navigator.credentials.create.toString() != "function () { [native code] }"
Are you sure? If I can replace navigator.credentials.create then surely I can replace its toString as well.
Are you sure? You can make “native code” functions with .bind(null)
(function(){ var a=function(){};a.prototype.toString=navigator.credentials.create.toString.bind(navigator.credentials.create); return new a();})().toString()toString.name
Which results "bound toString" wheres real one results "toString"