Skip to content

Commit f47af1e

Browse files
authored
Merge pull request #1958 from Hunter-0x07/fix-c2generator-closure
Fix: correct closure capture in C2Generator to prevent loop variable bug
2 parents 65eb725 + d330258 commit f47af1e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

implant/sliver/transports/transports.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ func C2Generator(abort <-chan struct{}, temporaryC2 ...string) <-chan *url.URL {
4545
// Any temporary C2 servers that are defined will override what is configured in the implant
4646
if len(temporaryC2) > 0 {
4747
for _, c2 := range temporaryC2 {
48+
c2 := c2
4849
c2Servers = append(c2Servers, func() string {
4950
return c2
5051
})

0 commit comments

Comments
 (0)