Last active
June 4, 2020 07:55
-
-
Save ikuamike/72d504f12c34f5d1ab7c531a6931ddda to your computer and use it in GitHub Desktop.
nmap.sh
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 | |
# automate quick port scan to feed thorough port scan with list of ports | |
mkdir -p nmap | |
sudo nmap -n -Pn -sS -v -p- --min-rate=1000 --open -oN nmap/$2_quick_tcp $1 | grep -v "delay" | |
ports=`grep -v nmap nmap/$2_quick_tcp | grep open | cut -d " " -f 1 | cut -d "/" -f 1 | tr '\n' ','| head -c -1` | |
nmap -n -Pn -sC -sV -p $ports -oA nmap/$2_full_tcp $1 | |
#sudo nmap -sS -p- --min-rate=1000 $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment