-1

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?

jcubic
  • 61,973
  • 54
  • 229
  • 402
  • It works for me and displays the cookies if you type 'hack me'. It seems that you don't say everything about the problem you have. Where and how do you test this? – jcubic Mar 16 '23 at 19:10
  • I have tried to run the codepen program in chrome, edge (on PC), and safari (on my phone) and none of them have worked. I think I will just leave this issue, as I am not very technically good at programming. – dissmaterial Mar 17 '23 at 17:43
  • First thing is that it has probably nothing to do with jQuery Terminal, you have a problem displaying cookies in the browser, probably because you don't set any cookies that can be read. Try removing jQuery Terminal and using an HTML page with `` and see if this works. – jcubic Mar 17 '23 at 19:25

1 Answers1

0

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