Guest User

Untitled

a guest
Jan 21st, 2017
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. puts "What ip address do you want to scan?"
  2. nmap_ip = gets.chomp
  3. nmap_scan = system('nmap #{nmap_ip} -p 22')
  4.  
  5. #Alternative, also not working
  6. #nmap_scan = %x<'nmap #{nmap_ip} -p 22'>
  7.  
  8. puts "#{nmap_scan}"
  9.  
  10.  
  11. output gives ...
  12.  
  13. nmap -p 22
  14.  
  15. So the IP Address is not being picked up from the user input.
Advertisement
Add Comment
Please, Sign In to add comment