hello i am writing a simple password tester that uses a word list and am
running into some problems when i read the words from a text file they are
written to the screen with a backslash at the end and i cant seem to find a
way to get rid of them

here is the script:

__name__="dictionary password tester"
__author__="max baseman ([EMAIL PROTECTED])"
__version__="0.1"
__discription__="tests a password against a dictonary"
#############################################################

print
print
password=raw_input("password >")
passlist=open("/Users/max/passlist.rtf","r") # passlist is just a list of
50,000 words
guesses=0
for line in passlist:
   line=line.replace('\ ','') #heres what i was trying now
   guesses=guesses+1
   line=line.lower()
   print line
   if line==password:
       print
       print
       print"you password was",line,"and it took",guesses,"guesses"
       break





p.s i am about to look up how to type to python and not show the text for
the password bit but if anyone knows please explain
any help would be great thanks
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to