mIRC Homepage
Posted By: MTec89 gmail checker - 08/11/04 11:57 PM
how can i check my GMAIL accounts in script? (i have 3, ones just for when i know the saites will spam me, but yeah) how can i check them?
Posted By: Online Re: gmail checker - 09/11/04 01:32 AM
Have you tried Google's notifier?
Posted By: MTec89 Re: gmail checker - 09/11/04 12:09 PM
i have 3 email accounts to check, so its no good
Posted By: Coolkill Re: gmail checker - 09/11/04 02:14 PM
You can do it using sockets, gmail uses GET protocol..

Unfortuately most of it is encryped by some lame thing, undoubtably someone here can tell you using what method.. as for the basics;

This is how to request a status check, your info goes in the 'Cookie:' section unfortuately its encoded with something.

GET /gmail?ui=pb&q=label%3A%5Ei%20label%3A%5Eu&tlt=1001d9f1668 HTTP/1.1
User-Agent: Mozilla/5.0 (compatible; GNotify 1.0.23.0)
Host: gmail.google.com
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: GV=1001da7e826-420a70c4c9b056ab48fdf15bd3a5f33c; PREF=ID=1463136743429286:TM=1094855607:LM=1097187999:GM=1:S=dNqWLBnF8vchTrEA; S=gmail=CNjDxg_FDFs:gmproxy=kqiGXbP6AOs; SID=Afc3_x2cgFD8duBwfS79PPd6vBtojkXSExABqM50V6yDPD8Pka45-qRAo0l4eyc8QakRBeshpXKJtZCh1GHlTCA=

The following is the response if you have email

HTTP/1.1 200 OK
Set-Cookie: SID=AW_2OW_tdmTgkM97lZfwQsGUzuApsH3d2TsCvv36TJYQPD8Pka45-qRAo0l4eyc8QZdgm1NJTzBxG1OH7RfaL2s=;Domain=.google.com;Path=/
Cache-control: no-cache
Pragma: no-cache
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Server: GFE/1.3
Date: Tue, 09 Nov 2004 14:06:25 GMT

100

.................. ...^all...^i...^u..*
$
[email].data@data.co.uk..Name[/email] Name..........subject..%text..............................................................................................................................

0

And the following is if you don't have email

HTTP/1.1 200 OK
Set-Cookie: SID=AW_2OW_tdmTgkM97lZfwQsGUzuApsH3d2TsCvv36TJYQPD8Pka45-qRAo0l4eyc8QZdgm1NJTzBxG1OH7RfaL2s=;Domain=.google.com;Path=/
Cache-control: no-cache
Pragma: no-cache
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Server: GFE/1.3
Date: Tue, 09 Nov 2004 13:56:33 GMT

8
........

0

The above data is the info transfered between you and google using the 'Gmail checker', the encoded data represents the account, Coolkill@gmail.com with the password thisisapass.

As for the scripting code, you would simply make an alias and run it 3 times, once for each email address.. the code would be very basic, i.e.

alias gmail {
sockclose gmail
sockopen gmail directory.google.com 80
}

Will close/connect to the google directory.

On *:sockopen:gmail:{
sockwrite -n $sockname [color:red]data

; several more sockwrites' that contain the above GET protocol i mentioned.
}
[/color]
To request your inbox status.

On *:sockread:gmail:{
sockread %gm
echo 2 -s Gmail: %gm
}

To output everything (either one of the other 3 protocols above, one for got mail, the other for none.), you would need to parse it then so it looks pretty.

Hope this helps and hopefully someone will have the time to figure out the encode.

Eamonn.
Posted By: FiberOPtics Re: gmail checker - 11/12/05 08:42 PM
For anyone reading these posts when doing a search, I've made an addon Gmail Checker that allows you to check for unread emails on a gmail account, showing some information like Subject, Author and an excerpt of the email.
© mIRC Discussion Forums