MCPcopy Create free account
hub / github.com/SamNet-dev/snix / RankSNIs

Function RankSNIs

scanner/ip.go:93–102  ·  view source on GitHub ↗

RankSNIs keeps only OK outcomes and sorts by handshake time ascending.

(in []Result)

Source from the content-addressed store, hash-verified

91
92// RankSNIs keeps only OK outcomes and sorts by handshake time ascending.
93func RankSNIs(in []Result) []Result {
94 out := make([]Result, 0, len(in))
95 for _, r := range in {
96 if r.Outcome == OutcomeOK {
97 out = append(out, r)
98 }
99 }
100 sort.Slice(out, func(i, j int) bool { return out[i].Handshake < out[j].Handshake })
101 return out
102}

Callers 6

renderSNIPanelMethod · 0.92
saveToProfileMethod · 0.92
newScanSNICmdFunction · 0.92
newScanAllCmdFunction · 0.92
runWizardFunction · 0.92
TestRankSNIsKeepsOnlyOKFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestRankSNIsKeepsOnlyOKFunction · 0.68