We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e987c2 commit 08f23efCopy full SHA for 08f23ef
protocols/tcp/tcp.go
@@ -3,6 +3,7 @@ package tcp
3
import (
4
"context"
5
"crypto/rand"
6
+ "crypto/sha256"
7
"encoding/hex"
8
"fmt"
9
"log/slog"
@@ -37,9 +38,10 @@ func (s *tcpServer) sendRandom(conn net.Conn) error {
37
38
if _, err := rand.Read(randomBytes); err != nil {
39
return err
40
}
41
+ sum := sha256.Sum256(randomBytes)
42
s.events = append(s.events, parsedTCP{
43
Direction: "write",
- PayloadHash: hex.EncodeToString(randomBytes),
44
+ PayloadHash: hex.EncodeToString(sum[:]),
45
Payload: randomBytes,
46
})
47
if _, err := conn.Write(randomBytes); err != nil {
0 commit comments