Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/tls/ja4.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ func ja4c_r(tls *types.TLSDetails) string {
extensions := strings.Split(strings.Split(tls.JA3, ",")[2], "-")
sigAlgs := strings.Split(strings.Split(tls.PeetPrint, "|")[3], "-")

// Convert extensions to hex, filter GREASE and padding, and sort
// Convert extensions to hex, filter GREASE, and sort
parsedExt := []string{}
for _, ext := range extensions {
num, _ := strconv.Atoi(ext)
hexStr := fmt.Sprintf("%04x", num)
// Skip if it's a GREASE value or padding extension
if types.IsGrease("0x"+strings.ToUpper(hexStr)) || hexStr == "0010" || hexStr == "0000" || hexStr == "0015" {
// Skip if it's a GREASE value
if types.IsGrease("0x"+strings.ToUpper(hexStr)) || hexStr == "0010" || hexStr == "0000" {
continue
}
parsedExt = append(parsedExt, hexStr)
Expand Down