[Tutor] bruteforce match word in text file
David
david at abbottdavid.com
Wed Jan 21 23:29:19 CET 2009
I have to ask for a pointer, not sure what I am doing wrong.
thanks
-david
#!/usr/bin/python
password = 'loser'
wordlist = '/home/david/Challenge-You/wordlist.txt'
try:
words = open(wordlist, 'r').readlines()
except IOError, e:
print "Sorry no words"
for word in words:
word = word.replace("\n","")
if password in word:
print word
else:
print 'You are a loser'
--
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
pgp.mit.edu
More information about the Tutor
mailing list