ja3

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: OSL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllHashes = "https://ja3er.com/getAllHashesJson"
	AllUas    = "https://ja3er.com/getAllUasJson"
)

Variables

View Source
var HelloGolang = &tls.ClientHelloSpec{
	CipherSuites: []uint16{
		0xc02b, 0xc02f, 0xc02c, 0xc030, 0xcca9, 0xcca8, 0xc009, 0xc013, 0xc00a,
		0xc014, 0x9c, 0x9d, 0x2f, 0x35, 0xc012, 0xa, 0x1301, 0x1302, 0x1303,
	},
	CompressionMethods: []uint8{0x0},
	Extensions: []tls.TLSExtension{
		&tls.SNIExtension{},
		&tls.StatusRequestExtension{},
		&tls.SupportedCurvesExtension{
			Curves: []tls.CurveID{0x1d, 0x17, 0x18, 0x19},
		},
		&tls.SupportedPointsExtension{
			SupportedPoints: []uint8{0x0},
		},
		&tls.SignatureAlgorithmsExtension{
			SupportedSignatureAlgorithms: []tls.SignatureScheme{
				0x804, 0x403, 0x807, 0x805, 0x806, 0x401, 0x501, 0x601, 0x503,
				0x603, 0x201, 0x203,
			},
		},
		&tls.RenegotiationInfoExtension{Renegotiation: 1},
		&tls.ALPNExtension{
			AlpnProtocols: []string{"h2", "http/1.1"},
		},
		&tls.SCTExtension{},
		&tls.SupportedVersionsExtension{
			Versions: []uint16{0x304, 0x303, 0x302, 0x301},
		},
		&tls.KeyShareExtension{
			KeyShares: []tls.KeyShare{
				tls.KeyShare{Group: 0x1d},
			},
		},
	},
}

Default values can be deleted, but otherwise dont delete or change anything, to avoid making a mistake.

Functions

func NewTransport

func NewTransport(spec *tls.ClientHelloSpec) *http.Transport

NewTransport creates an http.Transport which mocks the given JA3 signature when HTTPS is used.

func Parse

func Parse(ja3 string) (*tls.ClientHelloSpec, error)

Parse creates a ClientHelloSpec based on a JA3 string.

Types

type JA3er

type JA3er struct {
	Users []struct {
		MD5   string
		Count int
		Agent string `json:"User-Agent"`
	}
	Hashes []struct {
		MD5 string
		JA3 string
	}
}

func NewJA3er

func NewJA3er(ua, hash io.Reader) (*JA3er, error)

func (JA3er) Agents

func (j JA3er) Agents(md5 string) []string

func (JA3er) JA3

func (j JA3er) JA3(md5 string) string

func (JA3er) SortUsers

func (j JA3er) SortUsers()

Jump to

Keyboard shortcuts

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