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

Commit

Permalink
Fixed grease I was missing. And added logging of raw hash string
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Laycock committed Dec 16, 2020
1 parent 25b3965 commit a10202d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/jarmscan",
"env": {},
"args": ["23.115.74.102"]
}
]
}
6 changes: 4 additions & 2 deletions jarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"encoding/binary"
"encoding/hex"
"fmt"
"log"
"math/rand"
"strconv"
"strings"
Expand Down Expand Up @@ -153,11 +154,11 @@ func GetCiphers(details JarmProbeOptions) []byte {
}
}

if details.CipherOrder == "FORWARD" {
if details.CipherOrder != "FORWARD" {
ciphers = MungCiphers(ciphers, details.CipherOrder)
}

if details.Grease != "GREASE" {
if details.Grease == "GREASE" {
ciphers = append([][]byte{RandomGrease()}, ciphers...)
}

Expand Down Expand Up @@ -485,6 +486,7 @@ func RawHashToFuzzyHash(raw string) string {
alpex = alpex + comp[2]
alpex = alpex + comp[3]
}
log.Print(raw)
hash256 := sha256.Sum256([]byte(alpex))
fhash += hex.EncodeToString(hash256[:])[0:32]
return fhash
Expand Down

0 comments on commit a10202d

Please sign in to comment.