Question

I'm trying to create an application event (java) that would raise as soon as the machine gets connected to gmail onto the login page (https://www.google.com/accounts/), so I'm trying to build a Socket that would listen to this particular httprequest. but I can only create a ServerSocket that listens to a port, to a specific ip adress (gmail login page can have so many different ips), but not to a host... anyone got an idea ? thank you !

Was it helpful?

Solution

This should help you get started:

http://gforgeek.blogspot.com/2005/04/simple-packet-sniffer-using-java.html

EDIT:

I just checked and I think you're going to have a really hard time accomplishing this because gmail runs on HTTPS so even once you get the packet sniffer running you're going to have to decrypt all SSL communications. I'm not even sure that's possible.

OTHER TIPS

Best bet is inside the browser like Google's Mail Checker extension for Chrome. Modify the extension to forward notifications to a localhost HTTP service which your Java application is hosting.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top