开发者

Java Socket know when request to gmail

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开发者_JAVA技巧 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 !


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜