File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments