| | #!/bin/sh | | | # macOS + Python 3. Finds .gov domain strings in bundled Claude Code binaries. | | | # Reads local files only; does not run Claude or make network requests. | | | python3 - <<'PY' | | | from pathlib import Path | | | import re |
| | root = Path.home() / "Library/Application Support/Claude/claude-code" |
| | files = sorted(root.glob("*/*/claude.app/Contents/MacOS/claude")) |
| | if not files: | | | print("Bundled Claude Code binary not found at this path.") | | | for f in files: |
| | hosts = sorted(set(re.findall( |
| | rb"(?:[a-z0-9-]+\.)+(?:ic\.gov\|sgov\.gov)", f.read_bytes() |
| | ))) |
| | print(f"\n{f}") |
| | print("\n".join(h.decode() for h in hosts) or "No matching strings.") |
| | PY |