Fixes for multiport
parent
88814bf553
commit
4d22cfa38c
|
@ -266,10 +266,10 @@ if [ "$TCPPORTS" ] || [ "$UDPPORTS" ]; then
|
||||||
TCPPORTS=($TCPPORTS)
|
TCPPORTS=($TCPPORTS)
|
||||||
PORTS_COUNT=${#TCPPORTS[@]}
|
PORTS_COUNT=${#TCPPORTS[@]}
|
||||||
PORTS_COUNT_CURR=0
|
PORTS_COUNT_CURR=0
|
||||||
while [ $PORTS_COUNT_CURR -lt $PORTS_COUNT ]; do
|
while [[ $PORTS_COUNT_CURR < $PORTS_COUNT ]]; do
|
||||||
for ((y=$PORTS_COUNT_CURR; y <=(($PORTS_COUNT_CURR+((MULTI_MAX_PORTS-1)))); y++)); do
|
for ((i=$PORTS_COUNT_CURR; i <=(($PORTS_COUNT_CURR+(($MULTI_MAX_PORTS-1)))); i++)); do
|
||||||
if [ ${TCPPORTS[$y]} ]; then
|
if [ ${TCPPORTS[$i]} ]; then
|
||||||
PORTS="${PORTS},${TCPPORTS[$y]}"
|
PORTS="${PORTS},${TCPPORTS[$i]}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo -en "${PURPLE}Multiport-TCP${DEFAULT_COLOR}/${GREEN}${PORTS#,}"
|
echo -en "${PURPLE}Multiport-TCP${DEFAULT_COLOR}/${GREEN}${PORTS#,}"
|
||||||
|
@ -569,10 +569,10 @@ if [ $IPV6 ]; then
|
||||||
IPV6TCP=($IPV6TCP)
|
IPV6TCP=($IPV6TCP)
|
||||||
PORTS_COUNT=${#IPV6TCP[@]}
|
PORTS_COUNT=${#IPV6TCP[@]}
|
||||||
PORTS_COUNT_CURR=0
|
PORTS_COUNT_CURR=0
|
||||||
while [ $PORTS_COUNT_CURR -lt $PORTS_COUNT ]; do
|
while [[ $PORTS_COUNT_CURR < $PORTS_COUNT ]]; do
|
||||||
for ((y=$PORTS_COUNT_CURR; y <=(($PORTS_COUNT_CURR+((MULTI_MAX_PORTS-1)))); y++)); do
|
for ((i=$PORTS_COUNT_CURR; i <=(($PORTS_COUNT_CURR+(($MULTI_MAX_PORTS-1)))); i++)); do
|
||||||
if [ ${IPV6TCP[$y]} ]; then
|
if [ ${IPV6TCP[$i]} ]; then
|
||||||
PORTS="$PORTS,${IPV6TCP[$y]}"
|
PORTS="${PORTS},${IPV6TCP[$i]}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo -en "${PURPLE}Multiport-TCP${DEFAULT_COLOR}/${GREEN}${PORTS#,}"
|
echo -en "${PURPLE}Multiport-TCP${DEFAULT_COLOR}/${GREEN}${PORTS#,}"
|
||||||
|
|
Loading…
Reference in New Issue