Skip to content

Commit c48f0fc

Browse files
authored
Fix nil reference with payload types in custom payloads (#501)
1 parent 3d3b727 commit c48f0fc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

framework.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ import (
7272
"time"
7373

7474
"github.com/Masterminds/semver"
75+
7576
"github.com/vulncheck-oss/go-exploit/c2"
7677
"github.com/vulncheck-oss/go-exploit/c2/channel"
7778
"github.com/vulncheck-oss/go-exploit/cli"
@@ -532,7 +533,9 @@ func addPayloadMetadata(conf *config.Config) {
532533
conf.CustomPayload = d
533534
}
534535
}
535-
output.PrintfFrameworkDebug("selecting payload type: %s", *payloadType)
536+
if payloadType != nil {
537+
output.PrintfFrameworkDebug("selecting payload type: %s", *payloadType)
538+
}
536539
}
537540

538541
// Effectively the package main function. Parses configuration, starts command and control,

0 commit comments

Comments
 (0)