Fins det noen bra norske ordlister som kan cracke WPA nettverk?
LOGG INN
... eller du kan registrere deg nå
4
7328
|
# -*- coding: utf-8 -*- import io, zipfile, re, os from urllib2 import urlopen, URLError, HTTPError, build_opener zip_file_url = 'http://www2.scrabbleforbundet.no/wp-content/uploads/2012/07/NSF-ordlisten.zip' zipname = "NSF-ordlisten.zip" print u'Laster ned ordlisten.' try: o = build_opener() o.addheaders = [('User-agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20120101 Firefox/33.0')] get = o.open(zip_file_url) with open(zipname, "wb") as file: file.write(get.read()) file.close() print os.path.basename(file.name) + " lastet ned." print u'Pakker ut.' z = zipfile.ZipFile(zipname, 'r') z.extract(u'NSF-ordlisten.txt', './') z.close() print u'Rydder opp i ordlisten.' inputfile = './NSF-ordlisten.txt' outputfile = './NSF-sort-uni.txt' regex = re.compile(' [a-z]*.') fixedlines = [] with io.open(inputfile, encoding='utf-8') as the_input, io.open(outputfile, 'w') as the_output: lines = [i.strip() for i in the_input] for line in lines: fixedlines.append(re.sub(regex, '', line)) fixedlines = sorted(list(set(fixedlines))) nolines = len(fixedlines) for word in sorted(fixedlines, key=len): the_output.write(u'{}\n'.format(word)) print u'Ferdig! Lagret ordliste av ' + str(nolines) + ' unike ord.' except HTTPError, e: print "HTTP Error: " + str(e.code) except URLError, e: print "URL Error: " + str(e.reason)
|