Created
December 25, 2015 06:34
-
-
Save HossamYousef/0b2f0bd3848c3562dc84 to your computer and use it in GitHub Desktop.
Wpa Wordlist Cleaner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# authorizing distribution | |
# modifying the script always | |
# the source and original author is acknowledged | |
Name = 'Wpa Wordlist Cleaner' | |
Author = 'Hossam Youssef' | |
Email = '[email protected]' | |
Version = '0.1' | |
# Console colors | |
W = '\033[0m' # white (normal) | |
R = '\033[31m' # red | |
G = '\033[32m' # green | |
O = '\033[33m' # orange | |
B = '\033[34m' # blue | |
P = '\033[35m' # purple | |
C = '\033[36m' # cyan | |
GR = '\033[37m' # gray | |
print '' | |
print '\033[31m+--------------------------------------------------+' | |
print "\033[31m| \033[36m _ ___ _________ \033[31m|" | |
print "\033[31m| \033[36m| | /| / / | /| / / ___/ /__ ___ ____ ___ ____ \033[31m|" | |
print "\033[31m| \033[36m| |/ |/ /| |/ |/ / /__/ / -_) _ `/ _ \/ -_) __/ \033[31m|" | |
print "\033[31m| \033[36m|__/|__/ |__/|__/\___/_/\__/\_,_/_//_/\__/_/ \033[31m|" | |
print '\033[31m| \033[36m \033[31m|' | |
print "\033[31m| \033[32m Version : "+ Version +" by: "+Author+" \033[31m|" | |
print '\033[31m+--------------------------------------------------+' | |
print '\033[0m' | |
print 'Removes a dictionary words less than 8 characters.' | |
print '' | |
print '\033[31mSupports Formats \033[34m.txt, .lst, .dic' | |
print '\033[0m' | |
## Initiation of files | |
filenameIN = str(raw_input('Dictionary entry name (with extension): ')) | |
FIn = open(filenameIN, 'r') | |
filenameOUT = str(raw_input('Output dictionary name (with extension): ')) | |
FOut = open(filenameOUT, 'w') | |
## Iteration dictionary by lines. | |
## Check if it contains the character | |
## New line and if so to what adapata | |
## Does not generate errors while writing the new file. | |
for line in FIn: | |
if line[-1] == '\n': | |
if len(line[:-1]) > 7: | |
FOut.write(line) | |
else: | |
if len(line) > 7: | |
FOut.write(line+'\n') | |
FOut.close() | |
FIn.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment