diff --git a/artemis/reporting/modules/mysql_bruter/reporter.py b/artemis/reporting/modules/mysql_bruter/reporter.py index 68add4316..5c6aa44e4 100644 --- a/artemis/reporting/modules/mysql_bruter/reporter.py +++ b/artemis/reporting/modules/mysql_bruter/reporter.py @@ -27,16 +27,16 @@ def create_reports(task_result: Dict[str, Any], language: Language) -> List[Repo try: ips = list(ip_lookup(task_result["payload"]["host"])) if ips: - ip_address = ips[0] + host = ips[0] else: - ip_address = None + host = task_result["payload"]["host"] except IPResolutionException: return [] return [ Report( top_level_target=get_top_level_target(task_result), - target=f"mysql://{ip_address}:{task_result['payload']['port']}", + target=f"mysql://{host}:{task_result['payload']['port']}", report_type=MySQLBruterReporter.EXPOSED_DATABASE_WITH_EASY_PASSWORD, additional_data={"credentials": task_result["result"]["credentials"]}, timestamp=task_result["created_at"], diff --git a/artemis/reporting/modules/mysql_bruter/template_exposed_database_with_easy_password.jinja2 b/artemis/reporting/modules/mysql_bruter/template_exposed_database_with_easy_password.jinja2 index 3cf1cb1f5..b39ee7772 100644 --- a/artemis/reporting/modules/mysql_bruter/template_exposed_database_with_easy_password.jinja2 +++ b/artemis/reporting/modules/mysql_bruter/template_exposed_database_with_easy_password.jinja2 @@ -8,8 +8,7 @@ {% for credentials in report.additional_data.credentials %}