From 28395c89f5f79e1611d84d21745e35a53a08c782 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 6 May 2023 03:10:12 +0200 Subject: [PATCH] yop --- 12345.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/12345.sh b/12345.sh index d9cd1ebd..92dd8337 100755 --- a/12345.sh +++ b/12345.sh @@ -65,11 +65,11 @@ while true; do # EACH VISITOR RECEIVE COMMAND RESPONSE ON ## RANDOM PORT = RESPONSE SOCKET & IPNS SESSION TOKEN - if [[ ${isLAN} && ( $(which yunohost) || -s ~/.zen/♥Box ) ]]; then - PORT=$((PORT+1)) && [ ${PORT} -ge 45782 ] && PORT=45780 ## yunohost|♥Box : OPEN FIREWALL 1234 12345 45780 45781 - else - [ ${PORT} -le 12345 ] && PORT=$((PORT+${RANDOM:0:2})) || PORT=$((PORT-${RANDOM:0:2})) - fi ## RANDOM PORT SWAPPINESS AVOIDING COLLISION + [ ${PORT} -le 12345 ] && PORT=$((PORT+${RANDOM:0:2})) || PORT=$((PORT-${RANDOM:0:2})) + ## RANDOM PORT SWAPPINESS AVOIDING COLLISION + + # ZIP + [[ ${zIP} ]] && PORT=$((PORT+1)) && [ ${PORT} -ge 45782 ] && PORT=45780 ## yunohost : OPEN FIREWALL 1234 12345 45780 45781 ## CHECK PORT IS FREE & KILL OLD ONE pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p ${PORT}" | grep -v -E 'color=auto|grep' | awk '{gsub(/^ +| +$/,"")} {print $0}' | tail -n 1 | cut -d " " -f 1)