Exit on exceptions
This commit is contained in:
17
wpscan.rb
17
wpscan.rb
@@ -452,21 +452,28 @@ def main
|
|||||||
puts info("Memory used: #{used_memory.bytes_to_human}") unless windows?
|
puts info("Memory used: #{used_memory.bytes_to_human}") unless windows?
|
||||||
puts info("Elapsed time: #{Time.at(elapsed).utc.strftime('%H:%M:%S')}")
|
puts info("Elapsed time: #{Time.at(elapsed).utc.strftime('%H:%M:%S')}")
|
||||||
|
|
||||||
|
# do nothing on interrupt
|
||||||
rescue Interrupt
|
rescue Interrupt
|
||||||
# do nothing on interrupt
|
exit(1)
|
||||||
# Error on Updating
|
# Error on Updating
|
||||||
rescue ChecksumError => e
|
rescue ChecksumError => e
|
||||||
puts critical(e.message)
|
puts critical(e.message)
|
||||||
puts critical('Downloaded File Content:')
|
|
||||||
puts e.file[0..500]
|
if e.file
|
||||||
puts '.........'
|
puts critical('Downloaded File Content:')
|
||||||
puts
|
puts e.file[0..500]
|
||||||
|
puts '.........'
|
||||||
|
puts
|
||||||
|
end
|
||||||
|
|
||||||
if e.cloudflare_info
|
if e.cloudflare_info
|
||||||
puts critical('Cloudflare Info:')
|
puts critical('Cloudflare Info:')
|
||||||
puts e.cloudflare_info
|
puts e.cloudflare_info
|
||||||
puts
|
puts
|
||||||
end
|
end
|
||||||
|
|
||||||
puts critical('Please submit this info as an Github issue')
|
puts critical('Please submit this info as an Github issue')
|
||||||
|
exit(1)
|
||||||
rescue => e
|
rescue => e
|
||||||
puts
|
puts
|
||||||
puts critical(e.message)
|
puts critical(e.message)
|
||||||
|
|||||||
Reference in New Issue
Block a user