From b14384fcb54b52c5f05508effc85a94fc9e74763 Mon Sep 17 00:00:00 2001
From: "maor.rayzin" <maorrayzin@guardicore.com>
Date: Sun, 11 Nov 2018 12:16:54 +0200
Subject: [PATCH] HOTFIX: Ignored cases where a user doesn't have hostname in
 shared_passwords issue

---
 monkey/monkey_island/cc/services/pth_report.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/monkey/monkey_island/cc/services/pth_report.py b/monkey/monkey_island/cc/services/pth_report.py
index 6a0138c4f..7e4d6e1c2 100644
--- a/monkey/monkey_island/cc/services/pth_report.py
+++ b/monkey/monkey_island/cc/services/pth_report.py
@@ -119,7 +119,8 @@ class PTHReportService(object):
                 {
                     'type': 'shared_passwords_domain' if user_info['domain_name'] else 'shared_passwords',
                     'machine': user_info['hostname'] if user_info['hostname'] else user_info['domain_name'],
-                    'shared_with': [i['hostname'] + '\\' + i['username'] for i in group['cred_groups']],
+                    'shared_with': [i['hostname'] if i['hostname']
+                                    else i['domain_name'] + '\\' + i['username'] for i in group['cred_groups']],
                     'is_local': False if user_info['domain_name'] else True
                 }
             )