ja4x

package module
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 6 Imported by: 0

README

JA4X for Go

An implementation of the JA4X hash algorithm in Go.

Command-line usage

Compile:

go build -o ja4x cmd/ja4x/main.go

Extract JA4X for a certificate:

./ja4x example_com.pem 
ja4x: a373a9f83c6b_2bab15409345_7bf9a7bf7029

Extract JA4X for a certificate, including raw version:

./ja4x -r example_com.pem
ja4x: a373a9f83c6b_2bab15409345_7bf9a7bf7029
ja4x_r: 550406,55040a,550403_550406,550408,550407,55040a,550403_551d23,551d0e,551d11,551d0f,551d25,551d1f,551d20,2b06010505070101,551d13,2b06010401d679020402

Certificates can be supplied raw, or PEM encoded.

Usage as a library

Add to your project:

go get github.com/driftnet-io/go-ja4x

Then, assuming cert is an *x509.Certificate,

ja4xHash := ja4x.JA4X(cert)

or with the raw version,

ja4xHash, ja4xRawHash := ja4x.JA4XWithRaw(cert)

Licensing

The code in this repository is MIT licensed. However, JA4X itself is subject to additional restricitons. Please see the NOTICE file for further details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JA4X

func JA4X(cert *x509.Certificate) string

JA4X produces a JA4X hash for a parsed X509 certificate.

func JA4XWithRaw

func JA4XWithRaw(cert *x509.Certificate) (string, string)

JA4XWithRaw produces a JA4X hash for a parsed X509 certificate. It also returns the hash in a raw form.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL