3 ms·
I often want to do the opposite: I know that the value "HelloWorld123" ends up somewhere in a variable in the global scope. Probably in some variable, nested de
by TekMol 5y ago
I often want to do the opposite: I know that the value "HelloWorld123" ends up somewhere in a variable in the global scope. Probably in some variable, nested deep deep down in got knows what. And I want to find it. Is there a good way to go about this?
- mmazzarolo 5y agoIf you don't know the global names, I would probably do something like this: 1. Grab the name of all globals your JS code is creating (using https://mmazzarolo.com/blog/2022-02-14-find-what-javascript-variables-are-leaking-into-the-global-scope/ https://mmazzarolo.com/blog/2022-02-14-find-what-javascript-...). 2. Inspect all of them with the technique used in the article and update the inspection logic so that it checks does a deep check of the value "HelloWorld123" as well (the value can be accessed here: https://gist.github.com/mmazzarolo/2b325f3af2bc83f56d3c921ff0fdeddc#file-globals-debugger-js-L39 https://gist.github.com/mmazzarolo/2b325f3af2bc83f56d3c921ff...)