# Pastebin vbV5WlDg #Clear the screen system('clear') #system('echo $SHELL') #system("nmap 127.0.0.1") def menu puts "#[-] Welcome to the Main Menu #" puts "" puts "Please select from the Menu Items Below" puts "[1] - Display Current IP Address's" puts "[2] - Run Nmap Scan" puts "[3] - Display the open services (Run Option 2 First" end def ip ip = system('ifconfig') puts "IP Address = #{ip}" end def nmap puts "What ip address do you want to scan?" nmap_ip = gets.chomp nmap_scan = system("nmap #{nmap_ip} -p 22") #Alternative Command #nmap_scan = %x<'nmap #{nmap_ip} -p 22'> puts "#{nmap_scan}" nmap_services = system("#{nmap_scan} | egrep 'open'") end def display puts "display stuff" end menu while answer = gets.chomp case answer when /1/ ip when /2/ nmap when /3/ display end menu end