Path: blob/master/lib/msf/core/auxiliary/ntp.rb
19612 views
# -*- coding: binary -*-1module Msf23###4#5# This module provides methods for working with NTP6#7###8module Auxiliary::NTP910include Exploit::Capture11include Auxiliary::Scanner1213#14# Initializes an instance of an auxiliary module that uses NTP15#1617def initialize(info = {})18super19register_options(20[21Opt::RPORT(123),22], self.class)2324register_advanced_options(25[26OptInt.new('VERSION', [true, 'Use this NTP version', 2]),27OptInt.new('IMPLEMENTATION', [true, 'Use this NTP mode 7 implementation', 3])28], self.class)29end3031# Called for each IP in the batch32def scan_host(ip)33if spoofed?34datastore['ScannerRecvWindow'] = 035scanner_spoof_send(@probe, ip, datastore['RPORT'], datastore['SRCIP'], datastore['NUM_REQUESTS'])36else37scanner_send(@probe, ip, datastore['RPORT'])38end39end40end41end424344