proxy cookie

Proxy document cookie

By
zapthedingbat 0 Seen 80 times
Tags
cookie
Run this test now.

Results


This browser ran the most recent scan
Tested on
Chrome - 87 - Windows 10
[object Object]

This browser ran the most recent scan
Tested on
Chrome Mobile - 90 - Android
[object Object]

User Script (ENUM_FUNCTION)

					
function test(data){
    try{
        var propertyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(document), "cookie");
        Object.defineProperty(document, "cookie", {
          get: function(){
            return propertyDescriptor.get.apply(this, arguments);
          },
          set: function() {
            addResult('Set');
            return propertyDescriptor.set.apply(this, arguments);
          }
        });
        document.cookie = cookie_name+"=samplecookievalue";
    }
    catch(err){
        addResult(err);
    }
}
					
				

Enum Data (ENUM_FUNCTION)

					
var data = [1];