<commit_before>#Violent Python p 25-29

#TODO: Add a shebang, DEBUG AND FINAL TEST

import zipfile, optparse
from threading import Thread

def banner():
	print "##### Zip Cracker; p 25-29 #####"
	print ""

def extractFile(zFile, password):
	try:
		zFile.extractall(pwd=password)
		print "[+] Found password"+password+"\n"
	except:
		pass

def main():
	banner()
	parser = optparse.OptionParser("usage%prog "+"-f <zipfile> -d <dictionary>")
	parser.add_option('-f', dest='zname', type='string', help='specify zip file')
	parser.add_option('-d', dest='dname', type='string', help='specify dictionary file')
	(options, args) = parser.parse_args()
	if (options.zname == None) |(options.dname == None):
		print parser.usage
		exit(0)<commit_msg>Added functions.  Not finished yet<commit_after>#!/usr/bin/env python
import zipfile, optparse
from threading import Thread

def banner():
	print "##### Zip Cracker; p 25-29 #####"
	print ""

def extractFile(zFile, password):
	try:
		zFile.extractall(pwd=password)
		print "[+] Found password"+password+"\n"
	except:
		pass

def main():
	banner()
	parser = optparse.OptionParser("usage%prog "+"-f <zipfile> -d <dictionary>")
	parser.add_option('-f', dest='zname', type='string', help='specify zip file')
	parser.add_option('-d', dest='dname', type='string', help='specify dictionary file')
	(options, args) = parser.parse_args()
	if (options.zname == None) |(options.dname == None):
		print parser.usage
		exit(0)
{'fraction_non_alphanumeric': 0.1756198347107438, 'fraction_numerical': 0.009641873278236915, 'mean_word_length': 5.344978165938865, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4678279', 'n_tokens_mistral': 532, 'n_tokens_neox': 502, 'n_words': 131}