Display console link name as display name

This commit is contained in:
idk
2021-12-04 00:08:48 -05:00
parent 9703b7a8b9
commit 0a62ba9d4e

View File

@ -70,10 +70,10 @@ func (cc *ClientConfig) PrintCommand() string {
exesuffix = ".exe"
}
if cc.Command == nil || *cc.Command == "" {
return fmt.Sprintf("clientApp.0.args=%s%s%s -shellservice.name \"%s\" -shellservice.displayname \"%s\" %s\n", CIP, *cc.Command, exesuffix, *cc.ClientDisplayName, *cc.ClientName, cc.PrintCommandArgs())
return fmt.Sprintf("clientApp.0.args=%s%s%s -shellservice.name \"%s\" -shellservice.displayname \"%s\" %s\n", CIP, *cc.Command, exesuffix, *cc.ClientName, *cc.ClientDisplayName, *cc.ClientName, cc.PrintCommandArgs())
}
name := strings.Split(*cc.Command, " ")[0]
return fmt.Sprintf("clientApp.0.args=%s%s%s -shellservice.name \"%s\" -shellservice.displayname \"%s\" %s\n", CIP, name, exesuffix, exesuffix, *cc.ClientDisplayName, cc.PrintCommandArgs())
return fmt.Sprintf("clientApp.0.args=%s%s%s -shellservice.name \"%s\" -shellservice.displayname \"%s\" %s\n", CIP, name, exesuffix, *cc.ClientName, *cc.ClientDisplayName, cc.PrintCommandArgs())
}
func (cc *ClientConfig) PrintStop() string {