nyx/tests/dynamic_fixtures/data_exfil/python/benign.py
2026-06-05 10:16:30 -05:00

15 lines
415 B
Python

# Phase 11 (Track J.9) — Python DATA_EXFIL benign control fixture.
#
# Sends to a loopback receiver, so the captured host is on-allowlist
# and the predicate stays clear.
import urllib.request
ALLOWLIST = {"127.0.0.1", "localhost"}
def run(host):
if host not in ALLOWLIST:
return
secret = "alice-creds"
url = f"http://{host}/exfil?token={secret}"
urllib.request.urlopen(url, timeout=1)