mIRC Home    About    Download    Register    News    Help

Topic Options
#102444 - 08/11/04 11:57 PM gmail checker
MTec89 Offline
Hoopy frood

Registered: 25/07/03
Posts: 742
Loc: Ohio, U.S.A.
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?
_________________________
http://MTec89Net.com
irc.freenode.net #MTec89Net

Top
#102445 - 09/11/04 01:32 AM Re: gmail checker
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
Have you tried Google's notifier?

Top
#102446 - 09/11/04 12:09 PM Re: gmail checker
MTec89 Offline
Hoopy frood

Registered: 25/07/03
Posts: 742
Loc: Ohio, U.S.A.
i have 3 email accounts to check, so its no good
_________________________
http://MTec89Net.com
irc.freenode.net #MTec89Net

Top
#102447 - 09/11/04 02:14 PM Re: gmail checker
Coolkill Offline
Hoopy frood

Registered: 09/12/02
Posts: 788
Loc: Wales, United Kingdom.
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.

Top
#102448 - 11/12/05 08:42 PM Re: gmail checker
FiberOPtics Offline
Hoopy frood

Registered: 05/02/04
Posts: 2019
Loc: Leuven, Belgium
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.
_________________________
Gone.

Top