Skip to content

Commit 60a229c

Browse files
author
Tod Beardsley
committed
Use rhost and rport, not local host and port
1 parent 646d55b commit 60a229c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

modules/auxiliary/admin/http/nexpose_xxe_file_read.rb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def initialize(info = {})
3434
[ 'URL', 'https://community.rapid7.com/community/nexpose/blog/2013/08/16/r7-vuln-2013-07-24' ],
3535
# Fill this in with the direct advisory URL from Infigo
3636
[ 'URL', 'http://www.infigo.hr/in_focus/advisories/' ]
37-
3837
]
3938
))
4039

@@ -47,19 +46,17 @@ def initialize(info = {})
4746
end
4847

4948
def run
50-
host = datastore['RHOST']
51-
port = datastore['RPORT']
5249
user = datastore['USERNAME']
5350
pass = datastore['PASSWORD']
5451

55-
nsc = Nexpose::Connection.new(host, user, pass, port)
52+
nsc = Nexpose::Connection.new(rhost, user, pass, rport)
5653

5754
print_status("Authenticating as: " << user)
5855
begin
5956
nsc.login
6057
report_auth_info(
61-
:host => host,
62-
:port => port,
58+
:host => rhost,
59+
:port => rport,
6360
:sname => 'https',
6461
:user => user,
6562
:pass => pass,
@@ -128,7 +125,7 @@ def run
128125
return
129126
end
130127

131-
path = store_loot('nexpose.file','text/plain', host, doc.root.elements["//host"].first.to_s, "File from Nexpose server #{host}")
128+
path = store_loot('nexpose.file','text/plain', rhost, doc.root.elements["//host"].first.to_s, "File from Nexpose server #{rhost}")
132129
print_good("File saved to path: " << path)
133130
end
134131
end

0 commit comments

Comments
 (0)