MCPcopy Create free account
hub / github.com/evilsocket/shellz / doFilterSelection

Function doFilterSelection

cmd/shellz/utils.go:12–28  ·  view source on GitHub ↗
(expr string)

Source from the content-addressed store, hash-verified

10)
11
12func doFilterSelection(expr string) models.Shells {
13 // first match by group, full match
14 for group, shells := range Groups {
15 if expr == group {
16 return shells
17 }
18 }
19
20 // then by shell name, full or prefix
21 found := models.Shells{}
22 for _, sh := range Shells {
23 if sh.Name == expr || strings.HasPrefix(sh.Name, expr) {
24 found[sh.Name] = sh
25 }
26 }
27 return found
28}
29
30func doEnabledSelection(m models.Shells, includeDisabled bool) models.Shells {
31 sel := models.Shells{}

Callers 1

doShellSelectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected