Translation


by Transposh

Archive for the ‘Web Security’ Category

How to catch invisible friends on GTalk

Saturday, December 18th, 2010

I always wondered that there must be a way to catch friends off guard when they are invisible. Luckily I came across Python’s XMPP library which helped me. On ubuntu Linux you can install this module using apt.

1
$ sudo aptitude install python-xmpp python-dnspython

The complete script is as below . Open gedit or Vim and copy pate the below code. Save it as “track_invisible_users.py” Don’t forget to replace the username and password fields

?View Code PYTHON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import xmpp
 
#constants
USER_ID = "youruserid@gmail.com"
PASSWORD = "yourpassowrd"
SERVER = "gmail.com"
 
jid=xmpp.protocol.JID(USER_ID)
C=xmpp.Client(jid.getDomain(),debug=[])
 
if not C.connect((SERVER,5222)):
    raise IOError('Can not connect to server.')
if not C.auth(jid.getNode(),PASSWORD):
    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

After this run

python track_invisible_users.py 

From CAPTCHA to PICTCHA

Wednesday, October 14th, 2009
Captcha

Sample Captcha

Pictcha is an experiment designed to improve security over typical text-based CAPTCHAs and enhance image search.

CAPTCHA is an acronym for completely automated public turing test to tell computers and people apart. It ensures that an online transaction is being performed by a human rather than a computer.CAPTCHAs have been successfully used to distinguish people from computers by challenging users to decipher distorted text, a task that is relative easy for people but quite difficult for computers.
However, with the improvement of machine-learning algorithms, CAPTCHAs must be regularly updated to thwart would-be spammers.

Sample Recaptcha

Thus came the concept of ReCaptcha.About 200 million CAPTCHAs are solved by humans around the world every day. In each case, roughly ten seconds of human time are being spent. Individually, that’s not a lot of time, but in aggregate these little puzzles consume more than 150,000 hours of work each day. What if we could make positive use of this human effort? reCAPTCHA does exactly that by channeling the effort spent solving CAPTCHAs online into “reading” books.

In the Pictcha experiment, users are shown a randomly selected Web image and challenge them to provide two descriptive labels.Passing the test requires that at least one of the user-provided labels matches a known tag for the image. The collection of known tags is generated by previous users who have tagged the same image.Pictcha is currently in experiment stage.

Try a Pictcha demo here