require "io/console" requrie "open3" class MahCLI def menu menustr = "" menustr << "blaa blaa" menustr << "blaaah" menustr end def get_action STDIN.getch end def shell cmd, *args Open3.popen3(cmd, *args) do |in,out,err,wait| wait.join out.read end end def get_ip shell "ifconcig" end def nmap ## blaablaa end def run loop do puts menu case get_action when "1" then get_ip when "2" then blaablaa end end end end begin if __FILE__ == $0 MahCLI.new.run end end ß