Hacking Gmail

(Grace) #1

74 Part II — Getting Inside Gmail


Listing 5-8:The Gmail Cookie Check

<html>
<head>
<title>Redirecting</title>
<meta content=”0;
url=http://gmail.google.com/gmail?_sgh=8a6d8ffbb159f1c7c9246bd
4f49e78a1” http-equiv=”refresh”></head>
<body alink=”#ff0000” text=”#000000” vlink=”#551a8b”
link=”#0000cc” bgcolor=”#ffffff”>
<script type=”text/javascript” language=”javascript”><!--
location.replace(“http://gmail.google.com/gmail?_sgh=8a6d8ffbb
159f1c7c9246bd4f49e78a1”)
//--> </script>
</body>
</html>

This HTML forces you onto the next page, in this case http://gmail.google.
com/gmail?_sgh=8a6d8ffbb159f1c7c9246bd4f49e78a1.

You have seen this sort of URL before: Look back again at Listing A-3, after the
second excised block of encrypted code. So now you know that between the form
submission and the page you get in Listing 5-8, something else happens. You can
also guess that something happens to the cookie you set on the first page — it is
being checked for something. Considering that those cookies do not contain any-
thing but the time they were set, I am guessing that this step is to ensure that the
connection is current and not the result of caching from someone’s browser. It’s to
ensure a good, fresh session with Gmail on the part of the browser application and
the user himself. Or so I would guess.

Either way, the boot sequence continues from here automatically, with everything
in standard HTTP. You will see within the trace that the boot sequence loads the
Inbox next. So that’s what the next section considers.

Loading the Inbox


As you come to the end of the boot sequence you have nothing to do but load in the
Inbox and address book. This section deals specifically with the Inbox loading. The
output from the Tcpflow program earlier in this chapter doesn’t contain enough
mail to be of use in this regard, but if you do the trace again, only this time with a
few more messages in the Inbox, you can see what is going on. Figure 5-10 shows
the new Inbox, loaded with messages.
Free download pdf