Add Windows OS detection

This commit is contained in:
ethicalhack3r
2016-01-03 20:15:11 +01:00
parent 9df8cc9243
commit 3be5e1fcf5
2 changed files with 13 additions and 4 deletions

View File

@@ -152,7 +152,7 @@ def main
# Output runtime data
start_time = Time.now
start_memory = get_memory_usage
start_memory = get_memory_usage unless windows?
puts info("URL: #{wp_target.url}")
puts info("Started: #{start_time.asctime}")
puts
@@ -440,12 +440,12 @@ def main
stop_time = Time.now
elapsed = stop_time - start_time
used_memory = get_memory_usage - start_memory
used_memory = get_memory_usage - start_memory unless windows?
puts
puts info("Finished: #{stop_time.asctime}")
puts info("Requests Done: #{@total_requests_done}")
puts info("Memory used: #{used_memory.bytes_to_human}")
puts info("Memory used: #{used_memory.bytes_to_human}") unless windows?
puts info("Elapsed time: #{Time.at(elapsed).utc.strftime('%H:%M:%S')}")
rescue Interrupt