dissmaterial
dissmaterial

Reputation: 1

JQuery Terminal how to display document.cookie

I was hoping to display the cookie data of the user in the terminal, however I have not been able to find any implementations apart from within: https://codepen.io/TheRealAlan/pen/qNOZPo where:

  hack: (who) =>
    if who == "me"
      $terminal.echo(document.cookie)
    else
      $terminal.echo("unknown user")

nevertheless when testing the demo this command does not seem to work. Has anyone been able to get the cookies displayed?

Upvotes: -1

Views: 31

Answers (1)

Xavier DEJONGHE
Xavier DEJONGHE

Reputation: 81

are you check if the cookies have the httpOnly flag on the site domain? If it's the case, you cannot access to the cookies from js.
You've more information on this security flag: https://owasp.org/www-community/HttpOnly

Upvotes: 0

Related Questions