Hacking Gmail

(Grace) #1

Chapter 5 — How Gmail Works 67


Prodding Gmail to Hear It Squeak


The technique to further learn Gmail’s secrets is obvious. Use it — sending mail,


receiving mail, and so on — and watch what it does in the background. From


these clues, and the JavaScript listing you already have, you can piece together a
complete picture of the Gmail server’s interface. And it’s that interface that you


ultimately want to deal with directly.


To get a clear idea of what is going on, you need to capture everything that hap-


pens when Gmail is loaded, when it sits idle, and when you perform the common
actions with it.


Preparing to Watch the Gmail Boot Sequence


To start the process with gusto, open up Firefox again, and clear all of the caches.


Then open up a terminal window, and set Tcpflow running, and save its output to


a text file, like so:


sudo tcpflow -c ‘(port 80 or 443)’ >> login_capture.txt


This records everything that goes over HTTP or HTTPS. Then log in to Gmail


until you get to a nice, calm, idle Inbox like the placid Inbox shown in Figure 5-8.


FIGURE5-8: A nice, calm Inbox at the end of the boot sequence

Free download pdf