Skip to content

Commit 8ad38f1

Browse files
authored
Appease the linter when checking werkzeug_debug_rce.rb
1 parent 97c5afe commit 8ad38f1

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

modules/exploits/multi/http/werkzeug_debug_rce.rb

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,19 +178,15 @@ def config_valid?
178178
end
179179
# Check for valid MAC address
180180
unless MAC_PATTERN =~ datastore['MACADDRESS']
181-
fail_with(
182-
Failure::BadConfig, "#{datastore['MACADDRESS']} is not a valid MAC address"
183-
)
181+
fail_with(Failure::BadConfig, "#{datastore['MACADDRESS']} is not a valid MAC address")
184182
end
185183
end
186184

187185
# Check that requestbody is not specified if method doesn't support it
188186
return unless datastore['REQUESTBODY'] && !METHODS_WITH_BODY.include?(datastore['METHOD'])
189187

190-
fail_with(
191-
Failure::BadConfig,
192-
"REQUESTBODY set but METHOD ('#{datastore['METHOD']}') does not support a request body"
193-
)
188+
fail_with(Failure::BadConfig,
189+
"REQUESTBODY set but METHOD ('#{datastore['METHOD']}') does not support a request body")
194190
end
195191

196192
# Retrieve secret and frame
@@ -230,8 +226,8 @@ def cookies(secret)
230226
)
231227
finish = Process.clock_gettime(Process::CLOCK_MONOTONIC)
232228
unless res
233-
print_error "Unable to connect to http#{'s' if datastore['SSL']}://#{datastore['RHOST']}:#{datastore['RPORT']}"
234-
fail_with(Failure::TimeoutExpired)
229+
fail_with(Failure::TimeoutExpired,
230+
"Unable to connect to http#{'s' if datastore['SSL']}://#{datastore['RHOST']}:#{datastore['RPORT']}")
235231
end
236232
if res.get_json_document['exhausted']
237233
fail_with(Failure::NoAccess,

0 commit comments

Comments
 (0)