Skip to content

Commit

Permalink
add arch_classic as a new fingerprint variable
Browse files Browse the repository at this point in the history
  • Loading branch information
shantanugadgil committed May 31, 2022
1 parent e922890 commit eb816dc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/fingerprint/arch.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ func NewArchFingerprint(logger log.Logger) Fingerprint {

func (f *ArchFingerprint) Fingerprint(req *FingerprintRequest, resp *FingerprintResponse) error {
resp.AddAttribute("cpu.arch", runtime.GOARCH)

if (runtime.GOARCH == "amd64") {
resp.AddAttribute("cpu.arch_classic", "x86_64")
} else if (runtime.GOARCH == "386") {
resp.AddAttribute("cpu.arch_classic", "i386")
} else if (runtime.GOARCH == "arm64") {
resp.AddAttribute("cpu.arch_classic", "aarch64")
}

resp.Detected = true
return nil
}

0 comments on commit eb816dc

Please sign in to comment.