Compare commits

...
1 Commits
Author SHA1 Message Date
rkervella 77148d0d31 Generate name when none has been assigned 2022-11-09 15:58:00 -08:00
+8
View File
@@ -27,6 +27,7 @@ import (
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
"github.com/bishopfox/sliver/protobuf/sliverpb"
"github.com/bishopfox/sliver/server/codenames"
"github.com/bishopfox/sliver/server/core"
"github.com/bishopfox/sliver/server/cryptography"
"github.com/bishopfox/sliver/server/generate"
@@ -77,6 +78,13 @@ func (rpc *Server) Backdoor(ctx context.Context, req *sliverpb.BackdoorReq) (*sl
return nil, fmt.Errorf("please select a profile targeting a shellcode format")
}
if p.Config.Name == "" {
p.Config.Name, err = codenames.GetCodename()
if err != nil {
return nil, err
}
}
name, config := generate.ImplantConfigFromProtobuf(p.Config)
otpSecret, _ := cryptography.TOTPServerSecret()
err = generate.GenerateConfig(name, config, true)