Skip to content

Commit

Permalink
Fixing mysql bruter reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
kazet committed Nov 6, 2023
1 parent 4f76554 commit 3f09c09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions artemis/reporting/modules/mysql_bruter/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
{% for credentials in report.additional_data.credentials %}
<li>
{% trans %}username{% endtrans %} {{ credentials.0 }}
{% trans %}and{% endtrans %}
{% if credentials.1 %}
{% trans %}and{% endtrans %} {% if credentials.1 %}
{% trans %}password{% endtrans %} {{ credentials.1 }}
{% else %}
{% trans %}empty password{% endtrans %}
Expand Down

0 comments on commit 3f09c09

Please sign in to comment.