Skip to content

Commit ad39a5c

Browse files
committed
Auxiliary::Web::HTTP#_request: elog => print_error
[SEERM rapid7#7815] Switched form elog to print_error to make reporting bugs easier on users.
1 parent 0c0d150 commit ad39a5c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/msf/core/auxiliary/web/http.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,6 @@ def custom_404?( path, body, &callback )
252252

253253
private
254254

255-
def print_error( message )
256-
return if !@parent
257-
@parent.print_error message
258-
end
259-
260255
def call_after_run_blocks
261256
while block = @after_run_blocks.pop
262257
block.call
@@ -318,10 +313,15 @@ def _request( url, opts = {} )
318313
# This is bad but we can't anticipate the gazilion different types of network
319314
# i/o errors between Rex and Errno.
320315
rescue => e
321-
elog e.to_s
322-
e.backtrace.each { |l| elog l }
316+
print_error e.to_s
317+
e.backtrace.each { |l| print_error l }
323318
Response.empty
324319
end
325320

321+
def print_error( message )
322+
return if !@parent
323+
@parent.print_error message
324+
end
325+
326326
end
327327
end

0 commit comments

Comments
 (0)