#796, do not swallow exit code
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
$: << '.'
|
||||
require File.dirname(__FILE__) + '/lib/wpscan/wpscan_helper'
|
||||
|
||||
$exit_code = 0
|
||||
|
||||
require File.dirname(__FILE__) + '/lib/wpscan/wpscan_helper'
|
||||
|
||||
def main
|
||||
# delete old logfile, check if it is a symlink first.
|
||||
File.delete(LOG_FILE) if File.exist?(LOG_FILE) and !File.symlink?(LOG_FILE)
|
||||
@@ -412,10 +413,9 @@ def main
|
||||
puts info("Requests Done: #{@total_requests_done}")
|
||||
puts info("Memory used: #{used_memory.bytes_to_human}")
|
||||
puts info("Elapsed time: #{Time.at(elapsed).utc.strftime('%H:%M:%S')}")
|
||||
exit($exit_code) # must exit!
|
||||
|
||||
rescue SystemExit, Interrupt
|
||||
|
||||
rescue Interrupt
|
||||
# do nothing on interrupt
|
||||
rescue => e
|
||||
puts
|
||||
puts critical(e.message)
|
||||
@@ -434,3 +434,4 @@ def main
|
||||
end
|
||||
|
||||
main()
|
||||
exit($exit_code)
|
||||
|
||||
Reference in New Issue
Block a user