I have a server with tons of lines of Javascript and i need to check lines, which sets a new cookie.
All JS files are minified (variable names are abbreviated to one char etc.), so search it by the name of the cookie is almost impossible.
Is there any software/debugger/browser/approach/whatever which is able to track the lines of code, which sets up some cookies?
I've tried to use a Chrome built-in webkit debugger which allows me to set up an "Event Listener Breakpoints". Unfortunately it cannot listen to setting new cookie.
For Google Chrome go to View > Developer > Developer Tools or CMD + ALT + I on Mac or F12 on Windows. Now open the Application tab and check the cookies for each domain. Usually the cookies have names that resemble the name of the service they are being used by.
JavaScript can also manipulate cookies using the cookie property of the Document object. JavaScript can read, create, modify, and delete the cookies that apply to the current web page.
Cookies, tracking scripts, and pixels are different tools used to get a better understanding of the users on your website. They are used to help identify, collect, and transfer data from a given site to software catering to analytics and advertising services.
If I had to do this I would first beautify the source code to make it more readable, then find any lines which set a cookie (e.g. by searching for the regex /(document)?\.cookie\s*=\s*/
), then trace the origin of the value which is assigned.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With