Skip to content

Commit e436d31

Browse files
author
Tod Beardsley
committed
Use SSL by defailt
1 parent 60a229c commit e436d31

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/auxiliary/admin/http/nexpose_xxe_file_read.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@ def initialize(info = {})
4242
OptString.new('USERNAME', [true, "The Nexpose user", "user"]),
4343
OptString.new('PASSWORD', [true, "The Nexpose password", "pass"]),
4444
OptString.new('FILEPATH', [true, "The filepath to read on the server", "/etc/shadow"]),
45+
OptBool.new('SSL', [true, 'Use SSL', true])
4546
], self.class)
4647
end
4748

4849
def run
4950
user = datastore['USERNAME']
5051
pass = datastore['PASSWORD']
52+
prot = datastore['SSL'] ? 'https' : 'http'
5153

5254
nsc = Nexpose::Connection.new(rhost, user, pass, rport)
5355

@@ -57,7 +59,7 @@ def run
5759
report_auth_info(
5860
:host => rhost,
5961
:port => rport,
60-
:sname => 'https',
62+
:sname => prot,
6163
:user => user,
6264
:pass => pass,
6365
:proof => '',

0 commit comments

Comments
 (0)