absolutely obsessed with my oneliners

This commit is contained in:
jc
2025-06-24 04:01:11 +00:00
parent 5803f9559d
commit 781817ed37
+2 -18
View File
@@ -245,14 +245,7 @@ while [ "$1" != "" ]; do
case $1 in case $1 in
-p | --port) -p | --port)
shift shift
if [[ $1 =~ ^[0-9]+$ && $1 -le 65535 ]]; then [[ $1 =~ ^[0-9]+$ && $1 -le 65535 ]] && { port=$1; } || { [[ $1 =~ ^[0-9]+(,[0-9]+)+$ ]] && { for p in ${1//,/ }; do [[ $p -gt 65535 ]] && help; done; mports=$1; }; } || { help; exit; }
port=$1
elif [[ $1 =~ ^[0-9]+(,[0-9]+)+$ ]]; then
for p in ${1//,/ }; do [[ $p -gt 65535 ]] && help; done; mports=$1
else
help
exit
fi
;; ;;
--nmap) --nmap)
RUN_NMAP=true RUN_NMAP=true
@@ -273,16 +266,7 @@ while [ "$1" != "" ]; do
HTTPX=true HTTPX=true
;; ;;
*) *)
if [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]] && { ip=$1; } || { [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+$ ]] && { cidr=$1; }; } || { [[ -f $1 ]] && { ipocalypse=($(<$1)); }; } || { help; exit; }
ip=$1
elif [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+$ ]]; then
cidr=$1
elif [[ -f $1 ]]; then
ipocalypse=($(<$1))
else
help
exit
fi
;; ;;
esac esac
shift shift