Created
September 17, 2021 14:52
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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