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
<br><br>here is the script: <br><br>__name__="dictionary password tester"<br>__author__="max baseman (<a href="mailto:dos.fool@gmail.com">dos.fool@gmail.com</a>)"<br>__version__="0.1"<br>__discription__="tests a password against a dictonary"
<br>#############################################################<br><br>print<br>print<br>password=raw_input("password >")<br>passlist=open("/Users/max/passlist.rtf","r") # passlist is just a list of 50,000 words
<br>guesses=0<br>for line in passlist:<br> line=line.replace('\ ','') #heres what i was trying now<br> guesses=guesses+1<br> line=line.lower()<br> print line<br> if line==password:<br> print
<br> print<br> print"you password was",line,"and it took",guesses,"guesses"<br> break<br><br><br> <br><br><br>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
<br>any help would be great thanks<br><br>