Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing mysql bruter reporter #624

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion docker-compose.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ services:
- ./test/data/directory_index/:/usr/share/nginx/html/

test-wordpress-easy-password:
image: wordpress:6.1.1-apache
image: wordpress:6.3.2-apache
environment:
WORDPRESS_DB_HOST: test-wordpress-easy-password-mysql
WORDPRESS_DB_USER: root
Expand Down
Loading
Loading