Skip to content

Commit 6db6caa

Browse files
committed
switch connect to access cert and key bytes rather than path to cert and key
1 parent 9bbd6fb commit 6db6caa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

protocol/fortinet/fgfm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ func ReadFGFMMessage(conn net.Conn) ([]byte, bool) {
6363
// Benefits to this include being able to generate pcaps of the unencrypted traffic
6464
// between go-exploit and your proxy.
6565
// See CVE-2024-47575 for additional information.
66-
func Connect(host string, port int, ssl bool, certFile string, keyFile string) (net.Conn, bool) {
66+
func Connect(host string, port int, ssl bool, cert []byte, key []byte) (net.Conn, bool) {
6767
if ssl {
68-
cert, err := tls.LoadX509KeyPair(certFile, keyFile)
68+
cert, err := tls.X509KeyPair(cert, key)
6969
if err != nil {
7070
output.PrintFrameworkError("Failed to load x509 Key Pair")
7171
output.PrintfFrameworkDebug("Failed to load x509 Key Pair with error: %s", err)

0 commit comments

Comments
 (0)