Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Commit

Permalink
README updates, add Version, prep for goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
hdm committed Nov 24, 2020
1 parent 5719b0e commit 965cd08
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 1 deletion.
60 changes: 60 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
before:
hooks:
- go mod tidy
- go generate ./...
builds:
-
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X "github.com/RumbleDiscovery/jarm-go/cmd/jarmscan/main.Version={{.Version}}"
gcflags:
- all=-trimpath={{.Env.GOPATH}}
asmflags:
- all=-trimpath={{.Env.GOPATH}}
goos:
- windows
- linux
- darwin
- freebsd
goarch:
- amd64
- 386
- arm
- arm64
goarm:
- 5
- 6
- 7
ignore:
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
- goos: darwin
goarch: arm64
- goos: freebsd
goarch: arm
- goos: freebsd
goarch: arm64
signs:
- artifacts: checksum
archives:
- replacements:
darwin: macos
386: x86
arm64: aarch64
format: binary
files:
- none*
name_template: "jarmscan-{{ .Os }}-{{ .Arch }}{{.Arm}}"
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# jarm-go

This is a Go implementation of [JARM](https://github.com/salesforce/jarm).
This is a Go implementation of [JARM](https://github.com/salesforce/jarm).

# jarmscan

To install jarmscan, download a binary from the releases page or install using `go get github.com/RumbleDiscovery/jarm-go/cmd/jarmscan`.

To run a scan, provide a list of targets. The following examples are all supported:

* `jarmscan www.rumble.run`
* `jarmscan -p 443,8443 192.168.0.1`
* `jarmscan -p 1-1024 https://www.example.com/`
* `jarmscan -p 443,465,993,995,8443,9443 192.168.0.0/24`
* `jarmscan -p 192.168.0.1:8443`
* `jarmscan -p 192.168.0.1,443`

# jarm

To use the jarm-go library from a Go application please review the `Fingerprint()` function in the `cmd/jarmscan/main.go` code.

The basic process involves:

* Creating a list of probes for a given host and port using `GetProbes()`. The host is sent as part of the client probe.
* Building each individual probe in the order they are returned using `BuildProbe()`.
* Opening a connection to the host and port and sending the probe.
* Receiving the response (up to 1484 bytes). Receiving more or less can change the hash.
* Parsing the Server Hello from the received data using `ParseServerHello()`.
* Calculating the JARM hash using `RawHashToFuzzyHash()`.
3 changes: 3 additions & 0 deletions cmd/jarmscan/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import (
"github.com/RumbleDiscovery/rumble-tools/pkg/rnd"
)

// Version is set by the goreleaser build
var Version = "dev"

var defaultPorts = flag.String("p", "443", "default ports")
var workerCount = flag.Int("w", 256, "worker count")
var quietMode = flag.Bool("q", false, "quiet mode")
Expand Down

0 comments on commit 965cd08

Please sign in to comment.