Search code examples
javascriptbrowserv8

Tool for finding variables in a website's memory by value


I'm working on a userscript at the moment and would love to find any variables in a website's memory that contain a certain value, so that I can have my userscript read or modify this value.
What I'm asking for is best comparable to Cheat Engine's memory scanning.
Does something like this exist or is it too heavily abstracted away by the V8 engine?


Solution

  • V8 developer here. No such functionality exists in V8 (not even internally, and certainly not exposed to user code).

    Your best bet is probably to look for the interesting value(s) in specific locations (e.g. if a given website has some global variable referring to an object that may be holding them as properties) using regular JavaScript techniques. This obviously isn't a generic approach, and it won't be able to reach anywhere near all conceivable situations.