Skip to content

Commit 8025eb5

Browse files
committed
Enforce check
Because we are not able to get our hands on the hardware for testing, and that this module may trigger a backtrace if the UDP server isn't Moxa, we force check to make sure that doesn't happen.
1 parent d85d1de commit 8025eb5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/auxiliary/admin/scada/moxa_credentials_recovery.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,16 @@ def check
219219
return Exploit::CheckCode::Unknown
220220
end
221221
cleanup
222+
223+
Exploit::CheckCode::Safe
222224
end
223225

224226
def run
227+
unless check == Exploit::CheckCode::Appears
228+
print_error("Aborted because the target does not seem vulnerable.")
229+
return
230+
end
231+
225232
function = datastore["FUNCTION"]
226233

227234
connect_udp

0 commit comments

Comments
 (0)