Solved

Completely Cookie  :)

Posted on 2006-11-17
3
316 Views
Last Modified: 2006-11-18
I've been informed that:
cookies are like such:

VisitNumber  <-- cookie name
5                 <-- cooke value
localhost/     <-- domain/path that can access the cookie
1024            <-- cookie type
1522925568 <-- expire date/time
29894292     <-- expire date/time
1043531296 <-- modified date/time
29820999     <-- modified date/time
*  <-- end

cookie type:  im not really sure where these come from or what they mean other than if they were client created(javascript) vs server created(asp).  it also indicates whether the connection is secure by adding a value of one to the number.
client created:  1088, 1104, 1600
server created: 1024, 1536, 3584
a secure server created example would be 1024 + 1 = 1025

the expire and modified date and times are based on nano seconds.  the second field has a max number of 2^32 or 4,294,967,296 (i had to look that up).  the first field counts how many times the second field has maxed out.  so above, the expire second field has hit the max value 1,522,925,568 times.  
to start on the date we take that number and multiply by the max value:
1,522,925,568 * 4,294,967,296 = 6,540,915,508,802,224,128
then we add whats in the second field:
6,540,915,508,802,224,128 + 29,894,292 = 6,540,915,508,832,118,420
now you have the number of nanoseconds from january 1, 1601 12:00:00am (utc)



how can I get these values?
0
Comment
Question by:kevp75
3 Comments
 
LVL 9

Accepted Solution

by:
deathtospam earned 450 total points
ID: 17965764
Here's some basic info on Cookies in ASP:

* MSDN - Setting Cookies in ASP using Response.Cookies: http://tinyurl.com/y64j46
* MSDN - Retrieving Cookies in ASP using Request.Cookies: http://tinyurl.com/y5tjrn
* General Tutorial - http://www.earthskater.net/devzone/asp/aspcookies.asp


I'm fairly certain that your ability to access cookies -- via ASP/VBScript, anyway -- is extremely limited, probably for security reasons.  All you can really do once a cookie is set, is display the names and values stored inside the cookie.  I don't believe you can access all of those properties you described above.


-= DeathToSpam =-
0
 
LVL 22

Assisted Solution

by:WMIF
WMIF earned 50 total points
ID: 17967121
i thought that you might have been able to get to the expire date, but according to that msdn article, nope.  oh well, at least you know what the cookie files mean now. :)
0
 
LVL 25

Author Comment

by:kevp75
ID: 17968053
thank you both.   I do understand how to set/retrieve cookies....my question was how to get the other stuff....but I see from those articles that those other keys are write-only....
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now