Skip to content

Commit

Permalink
Fix bug ie + thunderbird
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroZ committed May 5, 2015
1 parent 9801d4f commit 048940a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Windows/src/LaZagne/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.4
output = None
file_logger = None

Expand Down
13 changes: 8 additions & 5 deletions Windows/src/LaZagne/softwares/browsers/ie.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,14 @@ def get_history(self):
ret = lib.list()

for r in ret:
if r:
if r.startswith("http") and r not in urls:
urls.append(r)
else:
break
try:
if r:
if r.startswith("http") and r not in urls:
urls.append(r)
else:
break
except:
pass

# Unload the dll to delete it later
handle = lib._handle # obtain the DLL handle
Expand Down
55 changes: 31 additions & 24 deletions Windows/src/LaZagne/softwares/browsers/mozilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ def __init__(self, db):
global database_find
self.db = db
if os.path.isfile(db):
database_find = True

# check if the database is not empty
f = open(db, 'r')
tmp = f.read()
if tmp:
database_find = True
f.close()

def __iter__(self):
pass
def done(self):
Expand Down Expand Up @@ -117,7 +122,7 @@ def get_path(self, software_name):
if software_name == 'Firefox':
path = '%s\Mozilla\Firefox' % str(os.environ['APPDATA'])
elif software_name == 'Thunderbird':
path = '%s%s\Thunderbird' % (os.environ['APPDATA'], os.environ.get('HOMEPATH' ))
path = '%s\Thunderbird' % str(os.environ['APPDATA'])
else:
print_debug('The APPDATA environment variable is not definded.\nUse the -s option and specify the folder path of the victim\nPath: <HOMEPATH>\Application Data\Mozilla\Firefox\Profiles\<PROFILE_NAME>')
return
Expand Down Expand Up @@ -378,30 +383,32 @@ def run(self):

if self.initialize_libnss(list_libnss, profile):
masterPwd = self.is_masterpasswd_set()
if masterPwd:
print_debug('WARNING', 'A masterpassword is used !!')
masterPwdFound = self.found_masterpassword()

if not masterPwd or masterPwdFound:
# check if passwors are stored on the Json format
credentials = JsonDatabase(profile)
if not database_find:
# check if passwors are stored on the sqlite format
credentials = SqliteDatabase(profile)

if not database_find:
print_debug('INFO', 'No credentials file found (logins.json or signons.sqlite) - or empty content')
# check if passwors are stored on the Json format
credentials = JsonDatabase(profile)
if not database_find:
# check if passwors are stored on the sqlite format
credentials = SqliteDatabase(profile)

# if not database_find:
# print_debug('INFO', 'No credentials file found (logins.json or signons.sqlite) - or empty content')
if database_find:
print
if masterPwd:
print_debug('WARNING', 'A masterpassword is used !!')
masterPwdFound = self.found_masterpassword()

try:
# decrypt passwords on the db
pwdFound+=self.decrypt(software_name, credentials)
except:
pass
if not masterPwd or masterPwdFound:
try:
# decrypt passwords on the db
pwdFound+=self.decrypt(software_name, credentials)
except:
pass

# if a master password is set (but not found), we save the db to bruteforce offline
elif masterPwd and not masterPwdFound and constant.output == 'txt':
self.save_db(profile)

# if a master password is set (but not found), we save the db to bruteforce offline
elif masterPwd and not masterPwdFound and constant.output == 'txt':
self.save_db(profile)
self.libnss.NSS_Shutdown()

else:
Expand Down
Binary file modified Windows/standalone/laZagne.exe
Binary file not shown.

0 comments on commit 048940a

Please sign in to comment.