There are several posts with similar question as mine but none seem to answer my issue. I am currently working to reverse engineer a site where a JavaScript file is being loaded in under sources
. For example purposes I will refer to it as foo.js
. This script is generating a cookie that I need. I will refer to it as bar
. foo.js
is actively generating a new bar
cookie everytime I refresh the cookies tab under Application
in Chrome dev tools meaning its being generating at least every second by foo.js
.
The catch is that foo.js
is heavily obfuscated with enterprise security where I cannot do a simple CTRL + F
and look for document.cookie
. But that isn't really relevant anyways. What I'm wondering is, surley a function is being ran to generate this since it's not hardcoded so how can I see what functions are being ran?
I have tried setting breakpoints in the code but there are over 15,000 lines of code so it's a bit inefficient. I have also tried pausing script execution and looking at the Call Stack and there are functions being executed from foo.js
but it's very vague on what these functions are returning. Additionally I don't think the functions I'm seeing are the correct one's because they only show up when I visit certain pages whereas the bar
cookie is being generated constantly no matter what page I'm on.
Is there any clear way to simply see what functions are being executed in the background and what they're returning? Specifically involving cookies. I feel like this should be a simple feature but I can seem to figure it out.