[webkit-help] How to set getter on document.location?
vilgeforce at gmail.com
Thu Jul 9 03:23:32 PDT 2015
I'm working on controlled environment for analysing malicious JS code. I
use PhantomJS (based on Webkit) to execute it.
Now I'm trying to intercept get acces to window.location to return fake
location to analysed script, but I can't do it. My test JS code:
get: function ()
When I try to execute it I got "Attempting to change access mechanism for
an unconfigurable property.". I patched Location.idl: added "Deletable" to
"attribute DOMString href", rebuilt the project and test it again. This
won't work too. I tried to patch DOMWindow.idl (Deletable on attribute
location) and other files and now I gave up with it.
Could you please help me with this task? How can I make attributes
"hookable" in Webkit?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-help