From 13dd8222ecf190309d004980507c275e649eeb3c Mon Sep 17 00:00:00 2001 From: Jon Hart Date: Fri, 28 Aug 2015 15:22:19 -0700 Subject: [PATCH] Expose lease duration as an option --- modules/auxiliary/admin/upnp/soap_addportmapping.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/auxiliary/admin/upnp/soap_addportmapping.rb b/modules/auxiliary/admin/upnp/soap_addportmapping.rb index 0e79573807..0ec0205ec6 100644 --- a/modules/auxiliary/admin/upnp/soap_addportmapping.rb +++ b/modules/auxiliary/admin/upnp/soap_addportmapping.rb @@ -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 << "" content << "" content << "#{Rex::Text.rand_text_alpha(8)}" - content << "3600" + content << "#{datastore['LEASE_DURATION']}" content << "#{datastore['INTERNAL_CLIENT']}" content << "1" content << "#{datastore['EXTERNAL_PORT']}" content << "" - content << "#{@protocol}" + content << "#{datastore['PROTOCOL']}" content << "#{datastore['INTERNAL_PORT']}" content << "" content << ""