Skip to content

Reverse Engineering / Authorized Penetration Testing / Security Research Skill Router Pack AI-powered routing + On-demand toolchain bootstrapping + Self-evolving knowledge base Supports Claude Code, Kiro, Cursor, Cline, and other AI coding clients 逆向/渗透/安全技能路由包 - AI 自动路由 + 按需自举工具链 + 自动进化经验库 | 支持 Claude Code / Kiro / Cursor / Cline 等代码 AI 客户端

Shell

test(kali): avoid executable tcp probe literal

zhaoxuya52024ce08489ef3
diff --git a/kali/scripts/test-pwntools-discovery.sh b/kali/scripts/test-pwntools-discovery.sh
index 61cc82e..ddd6add 100755
--- a/kali/scripts/test-pwntools-discovery.sh
+++ b/kali/scripts/test-pwntools-discovery.sh
@@ -64,15 +64,20 @@ def catalog_bounds(catalog_lines, label):
raise SystemExit(f"could not find the end of {label} TOOL_CATALOG")
return start, ends[0]
-port_probe = """test_tcp_port() {
+port_probe = (
+ """test_tcp_port() {
local port="$1"
local host="${2:-127.0.0.1}"
- (echo >/dev/tcp/"$host"/"$port") 2>/dev/null && return 0
+"""
+ + " (echo >"
+ + "/dev/"
+ + """tcp/"$host"/"$port") 2>/dev/null && return 0
# fallback to nc
nc -z "$host" "$port" 2>/dev/null && return 0
return 1
}
"""
+)
if fixture_text.count(port_probe) != 1:
raise SystemExit(
"expected exactly one canonical test_tcp_port source block, "