You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
module CommandRunner
|
|
def self.run_ltnp : String
|
|
io = IO::Memory.new
|
|
Process.run("netstat -ltnp", shell: true, output: io)
|
|
io.to_s
|
|
end
|
|
|
|
def self.run_kill(pid : String) : String
|
|
io = IO::Memory.new
|
|
Process.run("kill #{pid}", shell: true, output: io)
|
|
io.to_s
|
|
end
|
|
end
|