Skip to content

Commit 9e5281d

Browse files
committed
Mixin Msf::Auxiliary::Scanner, switch to run_host to fix DNS lookup issues
1 parent c7c0528 commit 9e5281d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

modules/auxiliary/fuzzers/ntp/ntp_protocol_fuzzer.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class Metasploit3 < Msf::Auxiliary
1111

1212
include Msf::Auxiliary::Fuzzer
13-
#include Msf::Auxiliary::Scanner
13+
include Msf::Auxiliary::Scanner
1414
include Msf::Exploit::Remote::Udp
1515

1616
NTP_VERSIONS = (0..7).to_a
@@ -161,7 +161,7 @@ def sleep_time
161161
datastore['SLEEP'] / 1000.0
162162
end
163163

164-
def run
164+
def run_host(ip)
165165
# parse and sanity check versions
166166
@versions = datastore['VERSIONS'].split(/[^\d]/).select { |v| !v.empty? }.map { |v| v.to_i }
167167
unsupported_versions = @versions - NTP_VERSIONS
@@ -172,12 +172,12 @@ def run
172172
fail "Unsupported NTP modes: #{unsupported_modes}" unless unsupported_modes.empty?
173173

174174
connect_udp
175-
fuzz_version_mode(host)
176-
fuzz_version_mode(host, true)
177-
fuzz_short(host)
178-
fuzz_random(host)
179-
fuzz_control(host) if @modes.include?(6)
180-
fuzz_private(host) if @modes.include?(7)
175+
fuzz_version_mode(ip)
176+
fuzz_version_mode(ip, true)
177+
fuzz_short(ip)
178+
fuzz_random(ip)
179+
fuzz_control(ip) if @modes.include?(6)
180+
fuzz_private(ip) if @modes.include?(7)
181181
disconnect_udp
182182
end
183183

0 commit comments

Comments
 (0)