MCPcopy
hub / github.com/dreadl0ck/netcap / buildAlgorithmsString

Function buildAlgorithmsString

decoder/stream/ssh/ssh_reader.go:571–584  ·  view source on GitHub ↗

buildAlgorithmsString creates a summary of the SSH algorithms from KexInit

(init KexInitMsg)

Source from the content-addressed store, hash-verified

569
570// buildAlgorithmsString creates a summary of the SSH algorithms from KexInit
571func buildAlgorithmsString(init KexInitMsg) string {
572 var b strings.Builder
573
574 b.WriteString("kex:")
575 b.WriteString(strings.Join(init.KexAlgos, ","))
576 b.WriteString(";ciphers:")
577 b.WriteString(strings.Join(init.CiphersClientServer, ","))
578 b.WriteString(";macs:")
579 b.WriteString(strings.Join(init.MACsClientServer, ","))
580 b.WriteString(";compression:")
581 b.WriteString(strings.Join(init.CompressionClientServer, ","))
582
583 return b.String()
584}
585
586// weakKexAlgorithms contains key exchange algorithms considered weak
587var weakKexAlgorithms = map[string]bool{

Callers 1

searchKexInitMethod · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected