(osName string, req *implantpb.Request)
| 87 | } |
| 88 | |
| 89 | func lsCommand(osName string, req *implantpb.Request) string { |
| 90 | path := firstArg(req) |
| 91 | if path == "" { |
| 92 | path = "." |
| 93 | } |
| 94 | if isWindows(osName) { |
| 95 | return fmt.Sprintf(`dir /a "%s"`, path) |
| 96 | } |
| 97 | return fmt.Sprintf(`ls -la "%s"`, path) |
| 98 | } |
| 99 | |
| 100 | func lsResponse(output, osName string, req *implantpb.Request) *implantpb.Spite { |
| 101 | path := firstArg(req) |