cursor rewrite + network checks

This commit is contained in:
carlospolop
2025-05-24 08:29:47 +02:00
parent 604580adbd
commit 1e7a90d29f
73 changed files with 4059 additions and 1018 deletions

View File

@@ -8,11 +8,30 @@
# Functions Used:
# Global Variables:
# Initial Functions:
# Generated Global Variables:
# Generated Global Variables: $pid, $pids
# Fat linpeas: 0
# Small linpeas: 1
check_tcp_443(){
(timeout -s KILL 20 /bin/bash -c '(echo >/dev/tcp/1.1.1.1/443 && echo "Port 443 is accessible" || echo "Port 443 is not accessible") 2>/dev/null | grep "accessible"') 2>/dev/null || echo "Port 443 is not accessible"
}
if ! [ -f "/bin/bash" ]; then
echo " /bin/bash not found"
return
fi
/bin/bash -c '
for ip in 1.1.1.1 8.8.8.8; do
(echo >/dev/tcp/$ip/443 && echo "Port 443 is accessible" && exit 0) &
pids+=($!)
done
for pid in ${pids[@]}; do
wait $pid && exit 0
done
echo "Port 80 is not accessible"
' 2>/dev/null | grep "accessible" || echo "Port 80 is not accessible"
}