The cookie hunt: Persistent cookies (cookies whose lifetime extends beyond one session) are stored in short files on the browser user’s computer.
a). Close your browser and restart it to begin a new session.
Run the cookie suite. Enter an unusual name (e.g., “xyxyxyx” in one or both of the form fields. When run, this should create a cookie containing a value that is the quirky string that you entered.
Look for a file that contain your quirky string. Do you find it? If so, does it look like a file that contains the cookie?
(b). In Cookie.c, add an expires attribute to the set-cookie header line, such as:
Mon, 09-Dec-2002 13:46:00 GMT
Run the suite. Look for a file that contain your quirky string. Do you find it? If so, does it look like a file that contains the cookie?
Summarize the experiment and your observations.
The modification to Cookie.c is as follows:
```
/* A Set-cookie header line is generated for each name-value
pair. Each line creates a cookie with default attributes.
*/
for (x=0; x<=m; x++)
{
printf("Set-cookie: %s=%s; expires=Mon,04-Mar-2002 13:46:00 GMT%c\n",
entries[x].name, entries[x].val,'\0');
}
```
Cookie.html is then browsed and the string xxxyyyzzzwww was entered into the name field. This results in a name= xxxyyyzzzwww cookie to be generated by Cookie.cgi, with the expires attribute set to a time in the future. When the browser receives the cookie, it generates a file on the browser’s system, which looks as follows:
xxxyyyzzzwww
www.csc.calpoly.edu/~mliu/cookie/
0
1320868864
29532041
695162768
29474842
*
age
www.csc.calpoly.edu/~mliu/cookie/
0
1320868864
29532041
696162768
29474842
*
id
www.csc.calpoly.edu/~mliu/cookie/
0
1320868864
29532041
696662768
29474842
*
On a Win2000 System where this experiment was held, using file search for the string xxxyyyzzzwww, the file was found in this directory:
C:\Documents and Settings\administrator.HOME.000\Cookies
You might also like to view...
List two advantages and two disadvantages of VPNs.
What will be an ideal response?
What is the name of the new UGUI Transform system Unity uses in version 4.6?
What will be an ideal response?
_____ planning is the process of identifying long-term organizational goals, strategies, and resources.
A. Prospect B. Pilot C. Strategic D. Vertical
To retrieve e-mail headers in Microsoft Outlook, what option should be clicked after the e-mail has been selected?
a. File, Options b. Source Details c. File, Properties d. Message Source