def get_technique_status_and_data(): attempts = [] if mongo.db.telemetry.count_documents(T1021.scanned_query): attempts = list(mongo.db.telemetry.aggregate(T1021.query)) if attempts: status = ScanStatus.USED.value for result in attempts: result['successful_creds'] = [] for attempt in result['attempts']: result['successful_creds'].append(parse_creds(attempt)) else: status = ScanStatus.SCANNED.value else: status = ScanStatus.UNSCANNED.value return (status, attempts)
def get_technique_status_and_data(): attempts = list(mongo.db.telemetry.aggregate(T1110.query)) succeeded = False for result in attempts: result['successful_creds'] = [] for attempt in result['attempts']: succeeded = True result['successful_creds'].append(parse_creds(attempt)) if succeeded: status = ScanStatus.USED.value elif attempts: status = ScanStatus.SCANNED.value else: status = ScanStatus.UNSCANNED.value return (status, attempts)
def get_report_data(): attempts = [] if mongo.db.telemetry.count_documents(T1021.scanned_query): attempts = list(mongo.db.telemetry.aggregate(T1021.query)) if attempts: status = ScanStatus.USED.value for result in attempts: result['successful_creds'] = [] for attempt in result['attempts']: result['successful_creds'].append(parse_creds(attempt)) else: status = ScanStatus.SCANNED.value else: status = ScanStatus.UNSCANNED.value data = T1021.get_base_data_by_status(status) data.update({'services': attempts}) return data
def get_report_data(): attempts = list(mongo.db.telemetry.aggregate(T1110.query)) succeeded = False for result in attempts: result['successful_creds'] = [] for attempt in result['attempts']: succeeded = True result['successful_creds'].append(parse_creds(attempt)) if succeeded: status = ScanStatus.USED.value elif attempts: status = ScanStatus.SCANNED.value else: status = ScanStatus.UNSCANNED.value data = T1110.get_base_data_by_status(status) # Remove data with no successful brute force attempts attempts = [attempt for attempt in attempts if attempt['attempts']] data.update({'services': attempts}) return data