added a --pointers flag, pure bliss
This commit is contained in:
+8
-2
@@ -13,6 +13,7 @@ options:
|
||||
--open only print hosts with atleast one open port
|
||||
--hosts only print live hosts in the subnet
|
||||
--force scan open ports even if ping is disabled
|
||||
--pointers only scan key ports
|
||||
SYNTAX
|
||||
exit
|
||||
}
|
||||
@@ -38,7 +39,7 @@ ir(){
|
||||
|
||||
pt(){
|
||||
file=$1
|
||||
[[ ! -f $file ]] && { [[ $port ]] && { [[ ! $PRINT_OPEN == true ]] && cg_color bby "Port $port is closed :(" || { UP='\033[1A'; printf "$UP"; }; } || { [[ ! $PRINT_OPEN == true ]] && cg_color bby "No ports discovered" || { for i in {1..4}; do UP='\033[1A'; printf "$UP"; done; }; }; return; }
|
||||
[[ ! -f $file ]] && { [[ $port ]] && { [[ ! $PRINT_OPEN == true ]] && cg_color bby "Port $port is closed :(" || { UP='\033[1A'; printf "$UP"; }; } || { [[ ! $PRINT_OPEN == true ]] && cg_color bby "No ports discovered" || { [[ $mports ]] && { UP='\033[1A'; printf "$UP"; return; }; for i in {1..4}; do UP='\033[1A'; printf "$UP"; done; }; }; return; }
|
||||
[[ $RUN_NMAP == true ]] && return
|
||||
ports=($(sort -n $file))
|
||||
prot=$2
|
||||
@@ -201,6 +202,7 @@ RUN_NMAP=false
|
||||
HOST_SCAN=false
|
||||
PRINT_OPEN=false
|
||||
FORCE=false
|
||||
POINTERS=false
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
-p | --port)
|
||||
@@ -226,6 +228,9 @@ while [ "$1" != "" ]; do
|
||||
--force)
|
||||
FORCE=true
|
||||
;;
|
||||
--pointers)
|
||||
POINTERS=true
|
||||
;;
|
||||
*)
|
||||
if [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
ip=$1
|
||||
@@ -257,6 +262,7 @@ if [[ $ip ]]; then
|
||||
fi
|
||||
elif [[ $cidr ]]; then
|
||||
cidr_to_ips $cidr
|
||||
[[ $POINTERS == true ]] && { a=${!keyports[@]}; mports=${a// /,}; }
|
||||
for ip in ${ips[@]}; do
|
||||
echo "--> Scanning $ip"
|
||||
if [[ $port ]]; then
|
||||
@@ -269,4 +275,4 @@ elif [[ $cidr ]]; then
|
||||
[[ ($RUN_NMAP == true) && -f /tmp/tcp_ports ]] && echo
|
||||
cl
|
||||
done
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user