Skip to content

Instantly share code, notes, and snippets.

@YSSVirus
Created September 17, 2021 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YSSVirus/5c5d788be35b5511e45aaa1be5c7e799 to your computer and use it in GitHub Desktop.
Save YSSVirus/5c5d788be35b5511e45aaa1be5c7e799 to your computer and use it in GitHub Desktop.
This is a simple nmap scan to do a vuln scan along with grabbing any extra info such as version os scan and more then saves it how ever you wish in the directory your in.
#!/bin/bash
echo "This script is also runable with arguments
sudo Nmap <host> <ports> <name_of_file_to_save_to>"
echo ""
echo ""
echo ""
if [ $# -eq 0 ]
then
echo "What host are you scanning?"
read Host
echo ""
echo "What ports would you like to scan?
Example:22,25,50-100,45000-46000,50001"
read Ports
echo ""
echo "What should the out put be saved as"
echo "Example:Home_Scan"
echo "Exaple:Test_Scan"
echo "The script saves the output as 3 different formats"
read Name
echo ""
nmap -sS -p $Ports -sV --version-all -sC --script=vuln,default -O --min-rate 2000 -oA $Name $Host
else
nmap -sS -p $2 -sV --version-all -sC --script=vuln,default -O --min-rate 2000 -oA $3 $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment