Changed UsageTelemetry calls to no longer require .name when specifying usage enum

This commit is contained in:
VakarisZ 2019-08-01 14:26:01 +03:00
parent 92f66ba907
commit 7470427feb
5 changed files with 6 additions and 6 deletions

View File

@ -137,7 +137,7 @@ class SmbExploiter(HostExploiter):
except: except:
status = ScanStatus.SCANNED status = ScanStatus.SCANNED
pass pass
T1035Telem(status, UsageEnum.SMB.name).send() T1035Telem(status, UsageEnum.SMB).send()
scmr.hRDeleteService(scmr_rpc, service) scmr.hRDeleteService(scmr_rpc, service)
scmr.hRCloseServiceHandle(scmr_rpc, service) scmr.hRCloseServiceHandle(scmr_rpc, service)

View File

@ -54,7 +54,7 @@ class MimikatzCollector(object):
except Exception: except Exception:
LOG.exception("Error initializing mimikatz collector") LOG.exception("Error initializing mimikatz collector")
status = ScanStatus.SCANNED status = ScanStatus.SCANNED
T1129Telem(status, UsageEnum.MIMIKATZ.name).send() T1129Telem(status, UsageEnum.MIMIKATZ).send()
def get_logon_info(self): def get_logon_info(self):
""" """

View File

@ -6,6 +6,6 @@ class T1035Telem(UsageTelem):
""" """
T1035 telemetry. T1035 telemetry.
:param status: ScanStatus of technique :param status: ScanStatus of technique
:param usage: Enum name of UsageEnum :param usage: Enum of UsageEnum type
""" """
super(T1035Telem, self).__init__('T1035', status, usage) super(T1035Telem, self).__init__('T1035', status, usage)

View File

@ -6,6 +6,6 @@ class T1129Telem(UsageTelem):
""" """
T1129 telemetry. T1129 telemetry.
:param status: ScanStatus of technique :param status: ScanStatus of technique
:param usage: Enum name of UsageEnum :param usage: Enum of UsageEnum type
""" """
super(T1129Telem, self).__init__("T1129", status, usage) super(T1129Telem, self).__init__("T1129", status, usage)

View File

@ -7,10 +7,10 @@ class UsageTelem(AttackTelem):
""" """
:param technique: Id of technique :param technique: Id of technique
:param status: ScanStatus of technique :param status: ScanStatus of technique
:param usage: Enum name of UsageEnum :param usage: Enum of UsageEnum type
""" """
super(UsageTelem, self).__init__(technique, status) super(UsageTelem, self).__init__(technique, status)
self.usage = usage self.usage = usage.name
def get_data(self): def get_data(self):
data = super(UsageTelem, self).get_data() data = super(UsageTelem, self).get_data()