On Fri, Aug 6, 2010 at 9:23 AM, Tha.Suresh <[email protected]> wrote:
> Have anybody thought for security issue as password is in plaintext format
> !!
>
> Try this.:)
>
> #gtalk1.py
> #Based on script by "Tha.Suresh" (sent to ILUGC mailing list)
> #modified by Ashish Bhatia
>
> import xmpp
> import getpass
>
> # Google Talk
> FROM_GMAIL_ID = raw_input("Enter gmail ID:")
> GMAIL_PASS = getpass.getpass("Enter Password:")
> GTALK_SERVER = "gmail.com"
>
> jid=xmpp.protocol.JID(FROM_GMAIL_ID)
> C=xmpp.Client(jid.getDomain(),debug=[])
>
> if not C.connect((GTALK_SERVER,5222)):
> raise IOError('Can not connect to server.')
> if not C.auth(jid.getNode(),GMAIL_PASS):
> raise IOError('Can not auth with server.')
>
> C.sendInitPresence(requestRoster=1)
>
> def myPresenceHandler(con, event):
> if event.getType() == 'unavailable':
> print event.getFrom().getStripped()
>
> C.RegisterHandler('presence', myPresenceHandler)
> while C.Process(1):
> pass
>
> Mr.Ashish Bhatia modified it a bit, so that, user does not have to
> keep password in the file.
> It asks for username and password on the start.
>
>
> Thanks to Mr.Ashish Bhatia
> IIT Kanpur.
> www.ashishb.net
>
>
Yes, password is not stored in file but what encryption does it use for
connecting to server.
TOALL : If you wanna paste any code, Yes, paste here -
http://gist.github.com/ World best code pasting service ..........
--
l...@iitd - http://tinyurl.com/ycueutm