chore: checkpoint initial — Zektyc dataset, avant humanisation
- site vitrine + fingerprint test + zmap + z-panel - remplacement duckdns -> riricdev.tail5ea5cd.ts.net (canonical/og/alternates/docs) - suppression du token DuckDNS (plus utilisé)
This commit is contained in:
commit
8e7ec41f18
104 changed files with 19256 additions and 0 deletions
29
scripts/upnp-watch.sh
Executable file
29
scripts/upnp-watch.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
UPNP_URL="http://192.168.1.254:5678/desc/root"
|
||||
LOCAL_IP="192.168.1.50"
|
||||
LOG_TAG="upnp-watch"
|
||||
|
||||
log() {
|
||||
logger -t "$LOG_TAG" "$1"
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1"
|
||||
}
|
||||
|
||||
MAPPINGS=$(upnpc -u "$UPNP_URL" -l 2>/dev/null)
|
||||
if [ -z "$MAPPINGS" ]; then
|
||||
log "ERREUR: passerelle UPnP injoignable"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for PORT in 80 443; do
|
||||
if echo "$MAPPINGS" | grep -q "TCP.*${PORT}->${LOCAL_IP}:${PORT}"; then
|
||||
log "OK: port ${PORT}/TCP déjà ouvert"
|
||||
else
|
||||
log "port ${PORT}/TCP absent -> ouverture"
|
||||
RESULT=$(upnpc -u "$UPNP_URL" -a "$LOCAL_IP" "$PORT" "$PORT" TCP 2>&1 | tail -1)
|
||||
if echo "$RESULT" | grep -q "is redirected"; then
|
||||
log "port ${PORT}/TCP ouvert avec succès"
|
||||
else
|
||||
log "ECHEC ouverture ${PORT}/TCP: $RESULT"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
Loading…
Reference in a new issue