Skip to content

Commit

Permalink
cf changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroZ committed May 20, 2015
1 parent 7af417f commit 8d728b4
Show file tree
Hide file tree
Showing 52 changed files with 357 additions and 1,327 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
LaZagne 0.5 (20/05/2015)
- For Windows / Linux
* 2 levels of verbosity added for debugs
* try / except more verbose depending on the verbosity levels
* dico file moved from browsers to config repository (used for dictionary attack)
* new Filezilla versions managed

- Only Windows
* check weak passwords (logins equal to password) for windows account when hashes (nthash) have been found
* function to write the output modified on windows module
* WConio replaced by colorama for the window color
* Skype: try a dictionary attack (500 famous password) when the hash has been retrieved

LaZagne 0.4 (12/05/2015)
- For Linux
* Kwallet module implemented (by quentin hardy)
Expand Down
12 changes: 7 additions & 5 deletions Linux/src/LaZagne.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
# !/usr/bin/python

##############################################################################
# #
Expand Down Expand Up @@ -45,17 +45,19 @@ def output():

def verbosity():
# write on the console + debug file
if args['verbose']==0: level=logging.INFO
elif args['verbose'] >= 1: level=logging.DEBUG
elif args['verbose']>=2: level=logging.WARNING
if args['verbose']==0: level=logging.CRITICAL
elif args['verbose'] == 1: level=logging.INFO
elif args['verbose']>=2: level=logging.DEBUG

FORMAT = "%(message)s"
formatter = logging.Formatter(fmt=FORMAT)
stream = logging.StreamHandler()
stream.setFormatter(formatter)
root = logging.getLogger()
root.setLevel(level)
root.handlers = []
# if other logging are set
for r in root.handlers:
r.setLevel(logging.CRITICAL)
root.addHandler(stream)
del args['verbose']

Expand Down
2 changes: 1 addition & 1 deletion Linux/src/config/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
class constant():
folder_name = 'results'
MAX_HELP_POSITION = 27
CURRENT_VERSION = 0.3
CURRENT_VERSION = 0.5
output = None
file_logger = None
verbose = False
Expand Down
49 changes: 0 additions & 49 deletions Linux/src/config/debug.py

This file was deleted.

17 changes: 6 additions & 11 deletions Linux/src/config/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,13 @@ def first_title(self):
print '|====================================================================|'
print bcolors().ENDC



# print the title if no logging level has been set
def title(self, title):
print bcolors().TITLE
print "------------------- " + title + " passwords -----------------"
print bcolors().ENDC

# info option for the logging
def title_info(self, title):
b = bcolors()
logging.info(b.TITLE + "------------------- " + title + " passwords -----------------\n" + b.ENDC)
print b.TITLE + "------------------- " + title + " passwords -----------------\n" + b.ENDC

# debug option for the logging
def title_debug(self, title):
# print the title if logging level is higher or equal to info
def title_info(self, title):
b = bcolors()
logging.debug(b.TITLE + "------------------- " + title + " passwords -----------------\n" + b.ENDC )
logging.info(b.TITLE + "------------------- " + title + " passwords -----------------\n" + b.ENDC )
49 changes: 27 additions & 22 deletions Linux/src/config/write_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ def checks_write(values, category):

def print_footer():
footer = '\n[+] %s passwords have been found.\n' % str(constant.nbPasswordFound)
if logging.getLogger().isEnabledFor(logging.DEBUG) == False:
if logging.getLogger().isEnabledFor(logging.INFO) == False:
footer += 'For more information launch it again with the -v option\n'
logging.info(footer)
print footer

# print output if passwords have been found
def print_output(software_name, pwdFound):
if pwdFound:
# if the debug logging level is not apply => print the title
if logging.getLogger().isEnabledFor(logging.DEBUG) == False:
Header().title_info(software_name)
if logging.getLogger().isEnabledFor(logging.INFO) == False:
Header().title(software_name)

toWrite = []
for pwd in pwdFound:
Expand All @@ -76,7 +76,7 @@ def print_output(software_name, pwdFound):
else:
print_debug("OK", "Password found !!!")
toWrite.append(pwd)
# Store all passwords found on a table => for dictionnary attack if masterpassword set
# Store all passwords found on a table => for dictionary attack if master password set
constant.nbPasswordFound += 1
try:
if password:
Expand All @@ -87,39 +87,44 @@ def print_output(software_name, pwdFound):
pass

for p in pwd.keys():
logging.info("%s: %s" % (p, pwd[p]))
print '%s: %s' % (p, pwd[p])
print

# write credentials into a text file
checks_write(toWrite, software_name)
else:
logging.debug("[!] No passwords found\n")
logging.info("[!] No passwords found\n")


def print_debug(error_level, message):

b = bcolors()
if error_level == 'ERROR':
logging.debug(b.FAIL + '[ERROR] ' + message + '\n' + b.ENDC)

elif error_level == 'WARNING':
logging.debug(b.WARNING + '[WARNING] ' + message + '\n' + b.ENDC)

elif error_level == 'INFO':
logging.debug('[INFO] ' + message + '\n')


# print when password is found
if error_level == 'OK':
print b.OK + message + b.ENDC

# print when password is not found
elif error_level == 'FAILED':
logging.info(b.FAIL + message + b.ENDC)
print b.FAIL + message + b.ENDC

# print messages depending of their criticism
elif error_level == 'CRITICAL':
logging.error(b.FAIL + '[CRITICAL] ' + message + '\n' + b.ENDC)

elif error_level == 'ERROR':
logging.error(b.FAIL + '[ERROR] ' + message + '\n' + b.ENDC)

elif error_level == 'WARNING':
logging.warning(b.WARNING + message + '\n' + b.ENDC)

# print when password is found
elif error_level == 'OK':
logging.info(b.OK + message + b.ENDC)

elif error_level == 'DEBUG':
logging.debug(message + '\n')

elif error_level == 'INFO':
logging.info(message + '\n')

else:
logging.debug('[%s] %s' % (error_level, message))
logging.info('[%s] %s' % (error_level, message))

# --------------------------- End of output functions ---------------------------
Loading

0 comments on commit 8d728b4

Please sign in to comment.