from pathlib import Path import re readme = Path(r"G:/crypto miner/tests/README.md") text = readme.read_text(encoding="utf-8") text = text.replace( "Go server **960** `Test*` · Go agent **670** `Test*` · Vitest **849** tests in **109** files · Playwright **26** tests in **9** spec files.", "Go server **1001** `Test*` · Go agent **680** `Test*` · Vitest **867** tests in **113** files · Playwright **32** tests in **10** spec files.", ) if "Subnet recon" not in text: text = text.replace( "| **Fleet recon** | `.\\scripts\\test-suite.ps1 -ReconOnly` | Vuln/CVE, cred graph, triple-onion gates, Path Tracer discover, recon Vitest |", "| **Fleet recon** | `.\\scripts\\test-suite.ps1 -ReconOnly` | Vuln/CVE, cred graph, triple-onion gates, Path Tracer discover, recon Vitest |\n| **Deploy Recon** | `.\\scripts\\test-suite.ps1 -Recon` | `internal/recon`, recon API + deploy-kit, Deploy Recon Vitest + `deploy-recon.spec.ts` E2E (unless `-SkipE2E`) |\n| **Subnet recon** | `.\\scripts\\test-suite.ps1 -SubnetRecon` | Agent subnet_recon packages + `fleetDiscoveries` Vitest |", ) # remove duplicate Deploy Recon if added twice text = text.replace( "| **Deploy Recon** | `.\\scripts\\test-suite.ps1 -Recon` | `internal/recon`, `/recon/scan` + deploy-kit API, `DeployReconPage` + `deployRecon` Vitest |\n", "", ) if ".\\scripts\\test-suite.ps1 -SubnetRecon" not in text: text = text.replace( ".\\scripts\\test-suite.ps1 -ReconOnly", ".\\scripts\\test-suite.ps1 -Recon\n.\\scripts\\test-suite.ps1 -SubnetRecon\n.\\scripts\\test-suite.ps1 -ReconOnly", 1, ) readme.write_text(text, encoding="utf-8") problems = Path(r"G:/crypto miner/PROBLEMS.md") pt = problems.read_text(encoding="utf-8") pt = pt.replace( "Regression tables and counts: Go server **901**, agent **657**, Vitest **849**, Playwright **26**", "Regression tables and counts: Go server **1001**, agent **680**, Vitest **867**, Playwright **32**", ) if "Deploy Recon port scan" not in pt: pt = pt.replace( "## Do not commit", "| **Deploy Recon port scan / crawl** | TCP port dial and same-origin HTTP crawl execute on the **dashboard host** (Go server), not from fleet agents. Firewall path must allow the server to reach the owned target. |\n| **Deploy Recon SSRF** | UI copies SSRF probe URLs; **no automated form submit** — operator pastes probe URL into owned target fields manually to validate server-side fetch to install.sh. |\n\n## Do not commit", ) problems.write_text(pt, encoding="utf-8") print("done")