From f60c12b391f563a775733e9987a1cc5ac45d1430 Mon Sep 17 00:00:00 2001 From: "maor.rayzin" Date: Mon, 29 Oct 2018 15:01:23 +0200 Subject: [PATCH] Added hostname to all issues generated --- monkey/monkey_island/cc/services/pth_report.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/services/pth_report.py b/monkey/monkey_island/cc/services/pth_report.py index 90ee4956d..9a862f212 100644 --- a/monkey/monkey_island/cc/services/pth_report.py +++ b/monkey/monkey_island/cc/services/pth_report.py @@ -29,10 +29,10 @@ class PTHReportService(object): return mongo.db.groupsandusers.aggregate(pipeline) @staticmethod - def __get_admin_on_machines_format(admin_on_machines): + def __get_admin_on_machines_format(admin_on_machines, domain_name): machines = mongo.db.monkey.find({'_id': {'$in': admin_on_machines}}, {'hostname': 1}) - return [i['hostname'] for i in list(machines)] + return [domain_name + '\\' + i['hostname'] for i in list(machines)] @staticmethod def __strong_users_on_crit_query(): @@ -104,7 +104,7 @@ class PTHReportService(object): { 'name': admin['name'], 'domain_name': admin['domain_name'], - 'admin_on_machines': PTHReportService.__get_admin_on_machines_format(admin['admin_on_machines']) + 'admin_on_machines': PTHReportService.__get_admin_on_machines_format(admin['admin_on_machines'], admin['domain_name']) } for admin in admins ] @@ -116,7 +116,7 @@ class PTHReportService(object): 'is_local': False, 'type': 'shared_admins_domain', 'machine': admin['domain_name'], - 'username': admin['name'], + 'username': admin['domain_name'] + '\\' + admin['name'], 'shared_machines': admin['admin_on_machines'], } for admin in admins_info]