What is cookie??


the cookie is a connector that is interconnected with server and client. and also, the server identifies each client based on cookies. lets we take Facebook as an example. when we try to login to the Facebook, if we already Sign on Facebook through the current browser Facebook show your homepage otherwise Facebook shows the login page. if was anyone thinking how is facebook identify the correct user account for each client request? that functions are working to based only on cookies. 

Attributes of cookies 
  • Name: it likes a normal name. it is only useful for identifying the cookies
  • Content: its contain actual values of cookies
  • Domain: it shows the actual domain for this cookie.
  • Path: its contain the access permission of this cookie
  • Secure flags (send for) : enable encryption connection.
  • HttpOnly: prevent from javascript attacks.
  • Expire date: after this date, we can not connect the server through this cookie. 
this screenshot has sample java code for creating the cookie.

source code for sample Application

Comments

Popular posts from this blog

Install android studio on the parrot os

How to do simple brute force attack with burp suite

PoC video of How to Hack Gmail and Bitcoin Wallet using SS7 flaw