Skip to content

Commit

Permalink
Use implant filename instead of name
Browse files Browse the repository at this point in the history
  • Loading branch information
rkervella committed Mar 29, 2023
1 parent 88f5d55 commit feacb9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/command/generate/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func GetSliverBinary(profile *clientpb.ImplantProfile, con *console.SliverConsol
return data, err
}

implantName := buildImplantName(profile.GetConfig().GetName())
implantName := buildImplantName(profile.GetConfig().GetFileName())
_, ok := builds.GetConfigs()[implantName]
if implantName == "" || !ok {
// no built implant found for profile, generate a new one
Expand All @@ -35,7 +35,7 @@ func GetSliverBinary(profile *clientpb.ImplantProfile, con *console.SliverConsol
return data, err
}
data = generated.GetFile().GetData()
profile.Config.Name = buildImplantName(generated.GetFile().GetName())
profile.Config.FileName = generated.File.Name
_, err = con.Rpc.SaveImplantProfile(context.Background(), profile)
if err != nil {
con.PrintErrorf("Error updating implant profile\n")
Expand All @@ -45,7 +45,7 @@ func GetSliverBinary(profile *clientpb.ImplantProfile, con *console.SliverConsol
// Found a build, reuse that one
con.PrintInfof("Sliver name for profile: %s\n", implantName)
regenerate, err := con.Rpc.Regenerate(context.Background(), &clientpb.RegenerateReq{
ImplantName: profile.GetConfig().GetName(),
ImplantName: implantName,
})

if err != nil {
Expand Down

0 comments on commit feacb9e

Please sign in to comment.