@@ -38,11 +38,11 @@ def initialize(info={})
38
38
39
39
def run_host ( ip )
40
40
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." )
42
42
return
43
43
end
44
44
45
- print_status ( "Starting login brute force..." )
45
+ print_status ( "#{ rhost } : #{ rport } - Starting login brute force..." )
46
46
each_user_pass do |user , pass |
47
47
do_login ( user , pass )
48
48
end
@@ -61,7 +61,7 @@ def is_app_sevone?
61
61
if ( res and res . code . to_i == 200 and res . headers [ 'Set-Cookie' ] . include? ( 'SEVONE' ) )
62
62
version_key = /Version: <strong>(.+)<\/ strong>/
63
63
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 } " )
65
65
return true
66
66
end
67
67
return false
@@ -71,7 +71,7 @@ def is_app_sevone?
71
71
# Brute-force the login page
72
72
#
73
73
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 } '" )
75
75
begin
76
76
res = send_request_cgi (
77
77
{
@@ -91,14 +91,14 @@ def do_login(user, pass)
91
91
key = JSON . parse ( res . body ) [ "statusString" ]
92
92
93
93
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 } " )
95
95
return :skip_pass
96
96
else
97
- print_good ( "SUCCESSFUL LOGIN. '#{ user . inspect } ' : '#{ pass . inspect } '" )
97
+ print_good ( "#{ rhost } : #{ rport } - SUCCESSFUL LOGIN. '#{ user . inspect } ' : '#{ pass . inspect } '" )
98
98
99
99
report_hash = {
100
- :host => datastore [ 'RHOST' ] ,
101
- :port => datastore [ 'RPORT' ] ,
100
+ :host => rhost ,
101
+ :port => rport ,
102
102
:sname => 'SevOne Network Performance Management System Application' ,
103
103
:user => user ,
104
104
:pass => pass ,
@@ -110,7 +110,7 @@ def do_login(user, pass)
110
110
end
111
111
112
112
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" )
114
114
return :abort
115
115
end
116
116
end
0 commit comments