executeTokenStoreList lists all tokens in the token store
(ctx context.Context, client *csclient.Client, beaconID string)
| 230 | |
| 231 | // executeTokenStoreList lists all tokens in the token store |
| 232 | func (e *Executor) executeTokenStoreList(ctx context.Context, client *csclient.Client, beaconID string) (string, error) { |
| 233 | resp, err := client.TokenStoreList(ctx, beaconID) |
| 234 | if err != nil { |
| 235 | return "", err |
| 236 | } |
| 237 | |
| 238 | // Format the token list as a string for output |
| 239 | output := fmt.Sprintf("Token Store (%d tokens):\n", len(resp.Tokens)) |
| 240 | for _, token := range resp.Tokens { |
| 241 | output += fmt.Sprintf(" ID: %d, PID: %d, User: %s, Time: %s\n", |
| 242 | token.ID, token.PID, token.User, token.Timestamp) |
| 243 | } |
| 244 | |
| 245 | return output, nil |
| 246 | } |
| 247 | |
| 248 | // executeHashdump dumps password hashes |
| 249 | func (e *Executor) executeHashdump(ctx context.Context, client *csclient.Client, beaconID string) (string, error) { |