mtslx

package module
v0.0.0-...-0b8a52a Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

mtslx

Micro TLS scanner – a Go library and command-line tool for extracting JA3/JA3S TLS fingerprints from PCAP files or live network captures.

Built on top of:

Library

Import the package and use the exported functions:

import "github.com/Vytek/mtslx"

// Read a PCAP file and print JA3 records as JSON (including JA3S).
mtslx.ReadFileJSON("capture.pcap", os.Stdout, true)

// Read a PCAP file and print JA3 records as CSV.
mtslx.ReadFileCSV("capture.pcap", os.Stdout, ",", true)

// Print only JA3S (server) fingerprints from a PCAP file.
mtslx.ReadFileJa3s("capture.pcap", os.Stdout)

// Live capture from a network interface.
mtslx.ReadInterface("eth0", os.Stdout, ",", true, true, 1514, true, pcap.BlockForever)

The mtslx.Record type (re-exported from ja3.Record) holds all fields for a single fingerprint:

type Record struct {
    DestinationIP   string
    DestinationPort int
    JA3             string
    JA3Digest       string
    JA3S            string
    JA3SDigest      string
    SourceIP        string
    SourcePort      int
    Timestamp       float64
}

Command-line tool

Build
go build -o mtslx ./cmd/mtslx
Usage
Usage of mtslx:
  mtslx reads PCAP files or captures from a live interface and prints
  JA3/JA3S TLS fingerprints as JSON (default) or CSV.

  -csv
        print as CSV
  -debug
        toggle debug mode
  -iface string
        specify network interface to read packets from
  -ja3s
        include ja3 server hashes (ja3s) (default true)
  -ja3s-only
        dump ja3s only
  -json
        print as JSON array (default true)
  -promisc
        capture in promiscuous mode (requires root) (default true)
  -read string
        read PCAP file
  -separator string
        set a custom separator (default ",")
  -snaplen int
        default snap length for ethernet frames (default 1514)
  -timeout duration
        timeout for collecting packet batches (default -1ns)
  -tsv
        print as TAB separated values
  -version
        display version and exit
Examples

Read a PCAP file and print JSON output (including JA3S):

mtslx -read capture.pcap

Read a PCAP file and print CSV output:

mtslx -read capture.pcap -csv

Capture live from eth0 and print JSON:

sudo mtslx -iface eth0

Print only JA3S fingerprints:

mtslx -read capture.pcap -ja3s-only

Requirements

  • Go 1.24+
  • libpcap development headers (apt install libpcap-dev on Debian/Ubuntu)

License

See LICENSE.

Documentation

Overview

Package mtslx provides functions for scanning TLS traffic and computing JA3/JA3S fingerprints from PCAP files or live network interfaces. It wraps the dreadl0ck/ja3 and dreadl0ck/tlsx libraries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadInterface

func ReadInterface(iface string, out io.Writer, separator string, ja3s bool, asJSON bool, snaplen int, promisc bool, timeout time.Duration)

ReadInterface captures packets from the named network interface and writes JA3 fingerprints to out. If asJSON is true the results are written as newline-separated JSON objects, otherwise CSV is used with the given separator. When ja3s is true, server-side fingerprints (JA3S) are also computed.

Types

type Record

type Record = ja3.Record

Record contains all information for a calculated JA3 fingerprint. It is re-exported from the ja3 package for convenience.

func RetrieveIPTLS

func RetrieveIPTLS(ip string, port int, flagInterface string, timeout time.Duration) (Record, error)

RetrieveIPTLS captures TLS traffic to the specified IP and port from the default network interface and returns the first JA3 fingerprint found. The capture will timeout after the specified duration if no matching traffic is seen.

Directories

Path Synopsis
cmd
mtslx command
mtslx is a command-line tool for scanning TLS traffic and computing JA3/JA3S fingerprints from PCAP files or live network interfaces.
mtslx is a command-line tool for scanning TLS traffic and computing JA3/JA3S fingerprints from PCAP files or live network interfaces.

Jump to

Keyboard shortcuts

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