Find cookie expiration date

Discussion in 'Programming' started by ntesla123, Apr 15, 2011.

  1. #1
    Is it possible to find the expiration date of the cookies in a cookie file like this one?

    www.*****.com FALSE / FALSE 1305467108 USERlogin username+password
    www.*****.com FALSE / FALSE 1305467108 setup username
    www.*****.com FALSE / FALSE 1305467108 cookie
    www.*****.com/sentry FALSE / FALSE 1305467108 cookie

    Or isn't it possible to find the expiration from the content of the cookie files?
     
    ntesla123, Apr 15, 2011 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It depends which browser you are using. Chrome and Safari (both mac) make it very clear in the cookie list (chrome uses SQLite and Safari XML) as to when they're expiring such as:

    <dict>
    		<key>Created</key>
    		<real>324627373.22268897</real>
    		<key>Domain</key>
    		<string>.domain.com</string>
    		<key>Expires</key>
    		<date>2013-04-15T06:16:13Z</date>
    		<key>Name</key>
    		<string>__utma</string>
    		<key>Path</key>
    		<string>/</string>
    		<key>Value</key>
    		<string>87832776.1048535516.1302934561.1302934561.1302934561.1</string>
    	</dict>
    Code (markup):
     
    AstarothSolutions, Apr 15, 2011 IP
  3. EitanXOR

    EitanXOR Greenhorn

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    In your example, the long number in each line is a UNIX timestamp. You can convert it to a human-readable date using php's date() function or some online converter (Google 'online unix timestamp converter', you'll find a couple of websites that does that)
     
    EitanXOR, Apr 16, 2011 IP
  4. ustun

    ustun Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #4
    It depends which browser you are using +1
    E.g.; Firefox + Web developer addon
     
    ustun, Apr 22, 2011 IP