Skip to content

Commit

Permalink
Fix for issue #576
Browse files Browse the repository at this point in the history
  • Loading branch information
moloch-- committed Jan 24, 2022
1 parent ce1d2a2 commit d0f51d7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/command/sessions/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func SelectSession(onlyAlive bool, con *console.SliverConsoleClient) (*clientpb.
for _, session := range sessions.Sessions {
keys = append(keys, session.ID)
}
sort.Strings(keys) // Fucking Go can't sort int32's, so we convert to/from int's
sort.Strings(keys)

outputBuf := bytes.NewBufferString("")
table := tabwriter.NewWriter(outputBuf, 0, 2, 2, ' ', 0)
Expand Down
2 changes: 1 addition & 1 deletion client/command/sessions/sessions.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func SessionsCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
con.PrintErrorf("%s\n", err)
}
con.Println()
con.PrintInfof("Killed %s (%d)\n", session.Name, session.ID)
con.PrintInfof("Killed %s (%s)\n", session.Name, session.ID)
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion client/command/use/use.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func SessionOrBeaconByID(id string, con *console.SliverConsoleClient) (*clientpb
}
if err == nil {
for _, session := range sessions.Sessions {
if session.ID == id {
if strings.HasPrefix(session.ID, id) {
return session, nil, nil
}
}
Expand Down

0 comments on commit d0f51d7

Please sign in to comment.