Skip to content

Commit 8fd4ee8

Browse files
committed
Allow singular NTP version and mode 7 implementation testing
1 parent 8e626c1 commit 8fd4ee8

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

lib/msf/core/auxiliary/ntp.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def initialize(info = {})
2525

2626
register_advanced_options(
2727
[
28-
OptString.new('VERSIONS', [true, 'Try these NTP versions', '2,3']),
29-
OptString.new('IMPLEMENTATIONS', [true, 'Try these NTP mode 7 implementations', '3,2'])
28+
OptInt.new('VERSION', [true, 'Use this NTP version', 2]),
29+
OptInt.new('IMPLEMENTATION', [true, 'Use this NTP mode 7 implementation', 3])
3030
], self.class)
3131
end
3232
end

modules/auxiliary/scanner/ntp/ntp_peer_list_dos.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def scan_host(ip)
3838
# Called before the scan block
3939
def scanner_prescan(batch)
4040
@results = {}
41-
@probe = Rex::Proto::NTP.ntp_private(2, 3, 0)
41+
@probe = Rex::Proto::NTP.ntp_private(datastore['VERSION'], datastore['IMPLEMENTATION'], 0)
4242
end
4343

4444
# Called for each response packet

modules/auxiliary/scanner/ntp/ntp_peer_list_sum_dos.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def scanner_process(data, shost, sport)
4444
# Called before the scan block
4545
def scanner_prescan(batch)
4646
@results = {}
47-
@probe = Rex::Proto::NTP.ntp_private(2, 3, 1)
47+
@probe = Rex::Proto::NTP.ntp_private(datastore['VERSION'], datastore['IMPLEMENTATION'], 1)
4848
end
4949

5050
# Called after the scan block

modules/auxiliary/scanner/ntp/ntp_req_nonce_dos.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def scanner_process(data, shost, sport)
4646
def scanner_prescan(batch)
4747
@results = {}
4848
@probe = Rex::Proto::NTP::NTPControl.new
49-
@probe.version = 2
49+
@probe.version = datastore['VERSION']
5050
@probe.operation = 12
5151
end
5252

modules/auxiliary/scanner/ntp/ntp_reslist_dos.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def scanner_process(data, shost, sport)
4646
# Called before the scan block
4747
def scanner_prescan(batch)
4848
@results = {}
49-
@probe = Rex::Proto::NTP.ntp_private(2, 3, 16)
49+
@probe = Rex::Proto::NTP.ntp_private(datastore['VERSION'], datastore['IMPLEMENTATION'], 16)
5050
end
5151

5252
# Called after the scan block

modules/auxiliary/scanner/ntp/ntp_unsettrap_dos.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def scanner_process(data, shost, sport)
4545
def scanner_prescan(batch)
4646
@results = {}
4747
@probe = Rex::Proto::NTP::NTPControl.new
48-
@probe.version = 2
48+
@probe.version = datastore['VERSION']
4949
@probe.operation = 31
5050
end
5151

0 commit comments

Comments
 (0)