mirror of
https://github.com/BishopFox/sliver
synced 2026-06-08 10:29:05 +00:00
1e3c736acf
Updated the way aka aliases are stored to support saving the aka aliases to disk. Aka aliases will automatically be saved to disk and loaded on client startup.
26 lines
556 B
Go
26 lines
556 B
Go
package aka
|
|
|
|
import (
|
|
"github.com/bishopfox/sliver/client/console"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func AkaDeleteCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
|
|
aliasName := args[0]
|
|
if _, exists := akaAliases[aliasName]; !exists {
|
|
con.PrintErrorf("Alias '%s' does not exist\n", aliasName)
|
|
return
|
|
}
|
|
|
|
delete(akaAliases, aliasName)
|
|
|
|
// Save updated map to disk
|
|
err := SaveAkaAliases()
|
|
if err != nil {
|
|
con.PrintErrorf("Failed to save aliases to disk: %s\n", err)
|
|
return
|
|
}
|
|
|
|
con.PrintInfof("Deleted alias '%s'\n", aliasName)
|
|
}
|