|
@@ -4,46 +4,46 @@ add_params="-Pn"
|
|
|
|
|
|
function initial {
|
|
function initial {
|
|
|
|
|
|
- if [ -f nmap/initial.nmap ]; then
|
|
+ if [ -f "nmap/initial_$1.nmap" ]; then
|
|
echo "[-] initial scan files are already present on system"
|
|
echo "[-] initial scan files are already present on system"
|
|
exit 1
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
|
|
echo "[*] Initial scan for $1"
|
|
echo "[*] Initial scan for $1"
|
|
- nmap -T4 -oA nmap/initial "$1" "$add_params" 2> /dev/null
|
|
+ nmap -T4 -oA "nmap/initial_$1" "$1" "$add_params" 2> /dev/null
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
function allports {
|
|
function allports {
|
|
|
|
|
|
- if [ -f nmap/all-ports.nmap ]; then
|
|
+ if [ -f "nmap/all-ports_$1.nmap" ]; then
|
|
echo "[-] initial scan files are already present on system"
|
|
echo "[-] initial scan files are already present on system"
|
|
exit 1
|
|
exit 1
|
|
fi
|
|
fi
|
|
echo "[*] Full scan for $1"
|
|
echo "[*] Full scan for $1"
|
|
- nmap -T4 -p- -sV -sC -oA nmap/all-ports "$1" "$add_params" 2> /dev/null
|
|
+ nmap -T4 -p- -sV -sC -oA "nmap/all-ports_$1" "$1" "$add_params" 2> /dev/null
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
function udp {
|
|
function udp {
|
|
|
|
|
|
- if [ -f nmap/udp.nmap ]; then
|
|
+ if [ -f "nmap/udp_$1.nmap" ]; then
|
|
echo "[-] initial scan files are already present on system"
|
|
echo "[-] initial scan files are already present on system"
|
|
exit 1
|
|
exit 1
|
|
fi
|
|
fi
|
|
echo "[*] UDP scan for $1 (root is needed for that scan-mode)"
|
|
echo "[*] UDP scan for $1 (root is needed for that scan-mode)"
|
|
- sudo nmap -T4 --top-ports 1000 -sU -oA nmap/udp "$1" "$add_params" 2> /dev/null
|
|
+ sudo nmap -T4 --top-ports 1000 -sU -oA "nmap/udp_$1" "$1" "$add_params" 2> /dev/null
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
function udpfull {
|
|
function udpfull {
|
|
|
|
|
|
- if [ -f nmap/udp-full.nmap ]; then
|
|
+ if [ -f "nmap/udp-full_$1.nmap" ]; then
|
|
echo "[-] initial scan files are already present on system"
|
|
echo "[-] initial scan files are already present on system"
|
|
exit 1
|
|
exit 1
|
|
fi
|
|
fi
|
|
echo "[*] Full UDP scan for $1 (root is needed for that scan-mode)"
|
|
echo "[*] Full UDP scan for $1 (root is needed for that scan-mode)"
|
|
- sudo nmap -T4 -sV -sU -oA nmap/udp "$1" "$add_params" 2> /dev/null
|
|
+ sudo nmap -T4 -sV -sU -oA "nmap/udp_$1" "$1" "$add_params" 2> /dev/null
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|