#!/bin/bash # resend_curl.sh TOKEN_ENV — the spent bind link's „Új linket kérek" press, endpoint-level (the form POST). Prints the # answer page's visible text only; the token never reaches a command line or the output. set -euo pipefail T=$(mktemp -d); chmod 700 "$T"; trap 'rm -rf "$T"' EXIT printf 'url = "https://hub.felhom.eu/bind/%s/resend"\n' "${!1}" > "$T/cfg" curl -s -K "$T/cfg" -X POST -o "$T/p" -w "POST %{http_code}\n" python3 - "$T/p" <<'PY' import re,sys,html t=open(sys.argv[1],encoding="utf-8").read(); t=re.sub(r"<(script|style)[^>]*>.*?","",t,flags=re.S) print("answer:", re.sub(r"\s+"," ",html.unescape(re.sub(r"<[^>]+>"," ",t))).strip()[:500]) PY