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

Function cmdObservedTools

cmd/inject-cli/main.go:600–618  ·  view source on GitHub ↗

----- observed tools & rules commands -----

(c *apiClient)

Source from the content-addressed store, hash-verified

598// ----- observed tools & rules commands -----
599
600func cmdObservedTools(c *apiClient) {
601 tools, err := c.getObservedTools()
602 if err != nil {
603 fmt.Printf(" error: %v\n", err)
604 return
605 }
606 if len(tools) == 0 {
607 fmt.Println(" No tools observed yet. Wait for an agent to send requests through the proxy.")
608 return
609 }
610
611 fmt.Println()
612 fmt.Printf(" %-4s %-25s %-18s %s\n", "#", "Name", "Format", "Schema Keys")
613 printSep(70)
614 for i, t := range tools {
615 fmt.Printf(" %-4d %-25s %-18s %s\n", i+1, t.Name, t.Format, schemaKeys(t.Schema))
616 }
617 fmt.Println()
618}
619
620func cmdRules(c *apiClient) {
621 rules, err := c.getRules()

Callers 1

mainFunction · 0.85

Calls 3

printSepFunction · 0.85
schemaKeysFunction · 0.85
getObservedToolsMethod · 0.80

Tested by

no test coverage detected