From c9318831d6dd73f5d3e008a9e767bd539fd420e8 Mon Sep 17 00:00:00 2001 From: AlessandroZ Date: Tue, 28 Feb 2017 10:44:58 +0100 Subject: [PATCH] fixing issue #109 --- .../lazagne/softwares/windows/system_hash.py | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Windows/lazagne/softwares/windows/system_hash.py b/Windows/lazagne/softwares/windows/system_hash.py index 3daf3bb5..f3748772 100755 --- a/Windows/lazagne/softwares/windows/system_hash.py +++ b/Windows/lazagne/softwares/windows/system_hash.py @@ -588,22 +588,26 @@ def run(self, software_name = None): if line and line != '\n': _pwd_hint = False - _login, _hash = line.split(':', 1) - _rid, _hash = _hash.split(':', 1) + try: + _login, _hash = line.split(':', 1) + _rid, _hash = _hash.split(':', 1) - values = {'Login': _login, 'Hash': _hash, 'Rid': _rid} - - for hint in password_hint: - if _login == hint['Login']: - _pwd_hint = hint['pwdHint'] + values = {'Login': _login, 'Hash': _hash, 'Rid': _rid} + + for hint in password_hint: + if _login == hint['Login']: + _pwd_hint = hint['pwdHint'] - if _pwd_hint: - values['Hint'] = _pwd_hint + if _pwd_hint: + values['Hint'] = _pwd_hint - password = self.dictionaryAttack_Hash(_hash.split(':')[1]) - if password: - values['Password'] = password + password = self.dictionaryAttack_Hash(_hash.split(':')[1]) + if password: + values['Password'] = password - pwdFound.append(values) + pwdFound.append(values) + + except Exception, e: + print_debug('ERROR', 'Error parsing hash: %s' % str(e)) return pwdFound \ No newline at end of file