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

Function TestPsResponse_ParsesLinux

internal/bridge/module_shell_test.go:206–216  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

204}
205
206func TestPsResponse_ParsesLinux(t *testing.T) {
207 output := " 1 0 root systemd /sbin/init\n"
208 spite := psResponse(output, "Linux", nil)
209 pr := spite.GetPsResponse()
210 if pr == nil {
211 t.Fatal("expected PsResponse body")
212 }
213 if len(pr.Processes) == 0 {
214 t.Error("expected at least one process")
215 }
216}
217
218func TestEnvResponse_Parses(t *testing.T) {
219 output := "PATH=/usr/bin\nHOME=/root\n"

Callers

nothing calls this directly

Calls 2

psResponseFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected