Skip to content

Instantly share code, notes, and snippets.

@StoneSwine
Last active May 16, 2021 22:29
Show Gist options
  • Save StoneSwine/e7a007528c36107ffee5d844830febe1 to your computer and use it in GitHub Desktop.
Save StoneSwine/e7a007528c36107ffee5d844830febe1 to your computer and use it in GitHub Desktop.
#!/bin/bash -ex
ip=$1
outdir="out"
tmp=`pwd`/tmp
mkdir -p $outdir
nmap -p- --min-rate 10000 -oG $tmp $ip &>/dev/null
nmap -p `egrep -v "^#|Status: Up" $tmp | cut -d' ' -f4- | tr , "\n" | awk -F / '{print $1}' | tr "\n" ,| tr -d " " | sed 's/.$//'` -sCV -oA $outdir/$ip $ip &>/dev/null
rm $tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment