MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / netstatCommand

Function netstatCommand

internal/bridge/module_shell_adapters.go:59–64  ·  view source on GitHub ↗

--------------------------------------------------------------------------- Structured response modules ---------------------------------------------------------------------------

(osName string, req *implantpb.Request)

Source from the content-addressed store, hash-verified

57// ---------------------------------------------------------------------------
58
59func netstatCommand(osName string, req *implantpb.Request) string {
60 if isWindows(osName) {
61 return "netstat -ano"
62 }
63 return "ss -tulnp 2>/dev/null || netstat -tulnp 2>/dev/null"
64}
65
66func netstatResponse(output, osName string, req *implantpb.Request) *implantpb.Spite {
67 resp := parseNetstatOutput(output, osName)

Callers 2

Calls 1

isWindowsFunction · 0.85

Tested by 2