Whats wrong with my code? text file cracker 08-23-2014, 05:58 AM
#1
im trying to create a text file cracker here is the code i cant see any problems so far?
Please any help much thankfull
Code:
import optparse
from threading import Thread
def cracktextfile(tFile,word):
try:
tfile.extractall(pwd=word)
print ' [+++] Found pwd: ' + word
print ' [++] Extract'
except:
pass
def main():
parser = optparse.OptionParser("usage: %prog" + "-t <textfile> -w <wordlist")
parser.add_option('-t', dest='tname', type='string', help='enter text file')
parser.add_option('-w', dest='dname', type='string', help='enter wordlist')
(options,args) = parser.parse_args()
if (options.tFile == None) | (options.dname == None):
print parser.usage
exit(0)
zname = options.tname
dname = options.dname
tFile = textfile.TextFile(tname)
passFile = open(dname)
for line in passFile.readlines():
word = line.strip('\n')
t = Thread(target=cracktextfile, args=(tFile,word))
t.strart()
if __name__ == '__main__':
main()Please any help much thankfull
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)
![[Image: 2YpkRjy.png]](http://i.imgur.com/2YpkRjy.png)