Update system.rb

Fix get_listening_ports bug
This commit is contained in:
Carter Brainerd
2018-04-17 13:35:25 -04:00
committed by GitHub
parent 85b09a162a
commit 7bfaae0919
+1 -1
View File
@@ -112,7 +112,7 @@ module System
begin
full = cmd_exec('netstat -tulpn').to_s
raise "You must be root to get listening ports" if full.include? '(No info could be read'
full = full[2..-1]
full = full.split("\n")[2..-1]
full.delete!(':') # Only happens when getting services
if portsonly