Path: blob/master/lib/msf/core/auxiliary/natpmp.rb
19516 views
# -*- coding: binary -*-12module Msf34###5#6# This module provides methods for working with NAT-PMP7#8###9module Auxiliary::NATPMP1011include Auxiliary::Scanner12include Rex::Proto::NATPMP1314def initialize(info = {})15super16register_options(17[18Opt::RPORT(Rex::Proto::NATPMP::DefaultPort),19Opt::CHOST,20OptInt.new('LIFETIME', [true, "Time in ms to keep this port forwarded (set to 0 to destroy a mapping)", 3600000]),21OptEnum.new('PROTOCOL', [true, "Protocol to forward", 'TCP', %w(TCP UDP)])22],23self.class24)25end2627def lifetime28@lifetime ||= datastore['LIFETIME']29end3031def protocol32@protocol ||= datastore['PROTOCOL']33end34end35end363738