From 2ff8772b28ca5982737cc9fdfe30d826661d1cc9 Mon Sep 17 00:00:00 2001 From: mamullen13316 Date: Mon, 25 Nov 2024 14:55:14 -0500 Subject: [PATCH] fix: Snmpv3 user lookup (#4) --- pyproject.toml | 2 +- sophos_firewall_audit/rules/snmpv3.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9ef2efc..97c4a1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sophos-firewall-audit" -version = "1.0.9" +version = "1.0.10" description = "Sophos Firewall Audit" authors = ["Matt Mullen "] readme = "README.md" diff --git a/sophos_firewall_audit/rules/snmpv3.py b/sophos_firewall_audit/rules/snmpv3.py index cdc427f..e0aa929 100644 --- a/sophos_firewall_audit/rules/snmpv3.py +++ b/sophos_firewall_audit/rules/snmpv3.py @@ -30,7 +30,7 @@ def eval_snmpv3(fw_obj: SophosFirewall, for i in range(1,3): try: - result = fw_obj.get_snmpv3_user() + result = fw_obj.get_tag_with_filter(xml_tag="SNMPv3User", key="Username", value=expected["Username"]) except SophosFirewallZeroRecords: result = None break @@ -47,7 +47,7 @@ def eval_snmpv3(fw_obj: SophosFirewall, if result: actual = result["Response"]["SNMPv3User"] else: - actual = {} + actual = {"Username": "User not found"} result_dict = { "snmpv3": {