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