MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / sectionMapValuer

Method sectionMapValuer

pkg/filter/ql/function.go:630–646  ·  view source on GitHub ↗

sectionMapValuer returns map valuer with PE section data.

(segments []*BoundSegmentLiteral, section pe.Sec)

Source from the content-addressed store, hash-verified

628
629// sectionMapValuer returns map valuer with PE section data.
630func (f *Foreach) sectionMapValuer(segments []*BoundSegmentLiteral, section pe.Sec) MapValuer {
631 var valuer = MapValuer{}
632 for _, seg := range segments {
633 key := seg.Value
634 switch seg.Segment {
635 case fields.NameSegment:
636 valuer[key] = section.Name
637 case fields.SizeSegment:
638 valuer[key] = section.Size
639 case fields.EntropySegment:
640 valuer[key] = section.Entropy
641 case fields.MD5Segment:
642 valuer[key] = section.Md5
643 }
644 }
645 return valuer
646}

Callers 1

CallMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected