require 'ruby-progressbar' progressbar = ProgressBar.create puts "##############################################################" puts "##### NMAP AUTO PWN DISCOVERY SCRIPT by awer - Metasploitaiton" puts "##############################################################" puts puts puts "1. Auto Pwn" puts "2. Choose Scripts Manually" puts "3. Quit" menu = gets.chomp if menu.include? "1" puts puts puts "What is the IP Address you want to Pwn? Only add 1 IPv4 Address" ip_address = gets.chomp if ip_address.include? "-" ip_address.gsub!(/-/, ".") end end puts "Auto Pwning" script1 = `nmap -A 192.168.0.4/32 -T4 --open | egrep "(open|Device type|Network|Host|OS:|Computer name|NetBIOS computer name:|Wo\ rkgroup|System time:|challenge_response|message_signing:|smbv2-enabled)" | egrep -v "(warning)"` script2 = `nmap -sU -sS --script smb-check-vulns.nse --script-args=unsafe=1 --script-args=unsafe=1 -p U:137,T:139 192.168.0.4 | e\ grep "(Host|up|MAC|Conficker|SMBv2 DoS|MS06|MS07)" | egrep -v "Host script"` ###ProgressBar.create(:format => '%a |%b>>%i| %p%% %t', :starting_at => 10) puts script1 puts puts script2