Skip to content

Commit

Permalink
Merge pull request AlessandroZ#20 from Snifferdog/Fixing_Comment_Format
Browse files Browse the repository at this point in the history
Fixed the comment format
  • Loading branch information
AlessandroZ committed May 26, 2015
2 parents 6b121af + 5355372 commit e91d736
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Windows/src/LaZagne/laZagne.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
import logging
from softwares.browsers.mozilla import Mozilla

# configuration
# Configuration
from config.header import Header
from config.write_output import write_header, write_footer, print_footer
from config.constant import *
from config.manageModules import get_categories, get_modules

# print the title
# Print the title
Header().first_title()

category = get_categories()
Expand Down Expand Up @@ -55,22 +55,22 @@ def verbosity():
stream.setFormatter(formatter)
root = logging.getLogger()
root.setLevel(level)
# if other logging are set
# If other logging are set
for r in root.handlers:
r.setLevel(logging.CRITICAL)
root.addHandler(stream)
del args['verbose']

def launch_module(b):
ok = False
# launch only a specific module
# Launch only a specific module
for i in args.keys():
if args[i]:
if i in b.keys():
b[i].run()
ok = True

# launch all modules
# Launch all modules
if not ok:
for i in b.keys():
b[i].run()
Expand Down Expand Up @@ -110,7 +110,7 @@ def runAllModules():
constant.mozilla_software = 'Thunderbird'
launch_module(modules[categoryName])

# prompt help if an error occurs
# Prompt help if an error occurs
class MyParser(argparse.ArgumentParser):
def error(self, message):
sys.stderr.write('error: %s\n\n' % message)
Expand All @@ -137,13 +137,13 @@ def error(self, message):
category[c]['parser'] = argparse.ArgumentParser(add_help=False,formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=constant.MAX_HELP_POSITION))
category[c]['parser']._optionals.title = category[c]['help']

# manage options
# Manage options
category[c]['subparser'] = []
for module in modules[c].keys():
m = modules[c][module]
category[c]['parser'].add_argument(m.options['command'], action=m.options['action'], dest=m.options['dest'], help=m.options['help'])

# manage all suboptions by modules
# Manage all suboptions by modules
if m.suboptions and m.name != 'thunderbird':
tmp = []
for sub in m.suboptions:
Expand All @@ -169,7 +169,7 @@ def error(self, message):
dic_tmp = {c: {'parents': parser_tab, 'help':'Run %s module' % c, 'func': runModule}}
dic = dict(dic.items() + dic_tmp.items())

#2- main commands
#2- Main commands
subparsers = parser.add_subparsers(help='Choose a main command')
for d in dic.keys():
subparsers.add_parser(d,parents=dic[d]['parents'],help=dic[d]['help']).set_defaults(func=dic[d]['func'],auditType=d)
Expand All @@ -182,7 +182,7 @@ def error(self, message):
verbosity()
arguments.func()

# print the number of passwords found
# Print the number of passwords found
if constant.output == 'txt':
write_footer()
print_footer()
Expand Down

0 comments on commit e91d736

Please sign in to comment.