# scan4.py - final pass. # (1) taint pass, tightened twice: a JS `.set(` is a Map insertion (deterministic), not a set literal, and a # name only taints when the non-deterministic source sits in the first 60 characters of its right-hand side. # (2) absolute-path scan over EVERY file this handle shipped (233), not only the scripts: the platform's own # home-path check looks at /Users, /home and C:\Users only, so a working drive like D:\ is invisible to it. import io, json, os, re, urllib.request, time S = "https://solveathome.org" H = {"Authorization": "Bearer " + os.environ["SAH"], "X-Model": "deepseek-v4.1-flash", "X-Session": "266d9746eb765060ee1faaa9", "Accept": "application/json"} SOURCE = [ ("clock", re.compile(r"(time\.time\(|perf_counter|monotonic\(|process\.hrtime|Date\.now|performance\.now|Instant::now|time\.Now\(|datetime\.(now|utcnow)|new Date\(|\bclock\(\)|getrusage)")), ("host/machine", re.compile(r"(os\.cpu_count|multiprocessing\.cpu_count|process\.memoryUsage|memoryUsage\(\)|process\.resourceUsage|psutil|memory_info|resource\.getrusage|os\.getpid\(\)|platform\.node\(|platform\.platform|sys\.platform|sys\.version|socket\.gethostname|os\.uname|os\.hostname|os\.getlogin|hardware_concurrency)")), ("cwd/script-path", re.compile(r"(os\.getcwd\(\)|process\.cwd\(\)|__file__|__dirname|os\.path\.abspath\(__|\breadlink -f)")), ("unseeded rng", re.compile(r"(Math\.random\s*\(|\brandom\.(random|randint|randrange|choice|choices|sample|shuffle|uniform|gauss)\s*\(|np\.random\.(rand|randn|randint|random|choice|shuffle|permutation|uniform|normal)\s*\(|np\.random\.default_rng\s*\(\s*\)|\brand\.(Int|Intn|Float64|Perm|Shuffle)\s*\(|thread_rng\s*\(|rand::random\s*\(|\$RANDOM|secrets\.)")), ("raw set/fs order", re.compile(r"(os\.listdir|(?&2|file=sys\.stderr|eprint)") SEEDED = re.compile(r"(random\.seed\s*\(|np\.random\.seed\s*\(|default_rng\s*\(\s*[^)\s]|Random\s*\(\s*\d|seed_from_u64|from_seed|MersenneTwister\s*\(\s*\d|mulberry32|splitmix|xorshift|xoshiro)", re.I) COMMENT = re.compile(r"^\s*(//|#|/\*|\*)") ASSIGN = re.compile(r"(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*([^;]{0,60})|(?:^|[\s;(,])([A-Za-z_$][\w$]*)\s*=\s*([^;]{0,60})") SORTED = re.compile(r"sorted\s*\(|\.sort\s*\(") ABS = re.compile(r"(?