Skip to content

Commit 0043516

Browse files
committed
SNMP: Fix check in should_attempt_exploit
1 parent bbde54c commit 0043516

File tree

1 file changed

+2
-2
lines changed
  • monkey/agent_plugins/exploiters/snmp/src

1 file changed

+2
-2
lines changed

monkey/agent_plugins/exploiters/snmp/src/plugin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828

2929

3030
def should_attempt_exploit(host: TargetHost, snmp_client: SNMPClient) -> Tuple[bool, str]:
31-
if not all_udp_ports_are_closed(host, SNMP_PORTS):
31+
if all_udp_ports_are_closed(host, SNMP_PORTS):
3232
return False, "Host has no open SNMP ports"
3333
try:
34-
snmp_client.get_system_name(host)
34+
snmp_client.get_system_name(host.ip, "public")
3535
except Exception:
3636
return False, "Host does not have SNMP enabled"
3737
return True, ""

0 commit comments

Comments
 (0)