How can I access this 'Cookies' via js code? They doesn't present in document.cookie object(it's empty)

How can I access this 'Cookies' via js code? They doesn't present in document.cookie object(it's empty)

 
    
     
    
    If a cookie is marked HTTPOnly, it will not appear in the document.cookie. The attribute HTTPOnly is meant to prevent an XSS attack from stealing your cookies. So there is no way you can access a cookie marked HTTPOnly from Javascript.
Looking at the screenshot, it seems like the first cookie qualifies for that. I am assuming that the other cookies belong to a different domain (possibly due to an Iframe on the page), so they might not appear on document.cookie unless you switch the context to that particular Iframe
References:
The HTTPOnly cookie attribute can help to mitigate this (XSS) attack by preventing access to cookie value through Javascript.
https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie
Also, you can read more about this in section "Cookie stealing and XSS" here: https://www.nczonline.net/blog/2009/05/12/cookies-and-security/
 
    
    Have you tried the easy way:
var x = document.cookie;
Or you can create the following function to acces a specific cookie
function getCookie(cname) {
        var name = cname + "=";
        var decodedCookie = decodeURIComponent(document.cookie);
        var ca = decodedCookie.split(';');
        for(var i = 0; i <ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) == ' ') {
                c = c.substring(1);
            }
            if (c.indexOf(name) == 0) {
                return c.substring(name.length, c.length);
            }
        }
        return "";
    }
Link to documentation: w3schools cookies documentation
Try via JQuery
alert( $.cookie("example") );
Or if you have a secure cookie (HTTPOnly Cookie)
Go to this thread: Reading Secure Cookies
