So over the past few weeks I've been playing around with gmail and python... and libgmail.
I've decided that more people should be introduced to this and the functionality of it, so I've created a small program to allow people to play around with it... It should run on any version of python, however, I've written it with Python 2.4 in mind and of course you'll require libgmail from the above link.
My script, checkgmail.py, provides the following functionality:
---Cut from help---
Usage: ./checkgmail.py
Options:
-a All messages
-r Only read messages
-u Only unread messages
-h Display this help message
Parameters:
-L
Only messages from a specific address
-R Read the messages (display message content)
-S Return the subject lines
-C Display a message count
-Q Run the specified query (search)
-N Number of messages to return (default: ALL)
-U GMail username
-P GMail Password (default: prompt)
---End Help---The idea is that you can pass 1 option and multiple parameters. By default it should, and I say should because I haven't extensively tested this software, prompt for a username and a password, log in and parse all unread mail in your inbox... however it won't display any information.Some examples you could use:To check and see if your mom has sent you any mail and to check the subjects you could use this command:
checkgmail.py -u -F mom@hotmail.com -S
To read the last message your girlfriend sent you, you could run something like this
checkgmail.py -u -F gf@hotmail.com -R -N 1
One important thing to remember is that whenever you parse unread messages, even if you don't display them... libgmail is still marking them read... don't let this confuse you when you revisit gmail through your browser.
It may lose a little without an explanation behind it, so if I get a chance, I'll post a "conversation" of sorts explaining everything. You have to remember that this was a review of the original Metasploitation repsentation done by H.D. Moore at CanSecWest... which I was, unfortunately, unable to attend. So most of the kudos for this goes to him... I simply added some basic explanations, the videos and some details on some of the web fuzzers... You can get H.D.'s original presentation here.
Anyways... you can get the presentation here.
I spoke at a TASK meeting on Wed. and I'll be posting the slides and videos I used here in the near future. In the mean time I just wanted to mention TASK to everyone in the Toronto, Ontario, Canada area...
http://www.task.to has plenty of information as well as forums that are filled with some interesting things..
This was not only the first time I spoke, but also the first time I had attended. The people that I met were really great... There was pizza available during the presentations (which lasted about 3 hours) and then a good number of people headed out to the bar together for a few drinks...
I'm looking forward to attending next months meeting, and I'll definately get those slides up for everyone as quickly as possible.