file

package
v0.0.0-...-9e7e4f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2019 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package file provides functions to scan a file system as an agent module. It can look into files using regexes. It can search files by name. It can match hashes in md5, sha1, sha256, sha384, sha512, sha3_224, sha3_256, sha3_384 and sha3_512. The filesystem can be searched using patterns, as described in the Parameters documentation at http://mig.mozilla.org/doc/module_file.html.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Size   float64 `json:"size"`
	Mode   string  `json:"mode"`
	Mtime  string  `json:"lastmodified"`
	SHA256 string  `json:"sha256,omitempty"`
}

Info describes the metadata associated with a file matched as a result of a search.

type MatchedFile

type MatchedFile struct {
	File     string `json:"file"`
	Search   Search `json:"search"`
	FileInfo Info   `json:"fileinfo"`
}

MatchedFile describes a single file matched as a result of a search.

type Search struct {
	Description string   `json:"description,omitempty"`
	Paths       []string `json:"paths"`
	Contents    []string `json:"contents,omitempty"`
	Names       []string `json:"names,omitempty"`
	Sizes       []string `json:"sizes,omitempty"`
	Modes       []string `json:"modes,omitempty"`
	Mtimes      []string `json:"mtimes,omitempty"`
	MD5         []string `json:"md5,omitempty"`
	SHA1        []string `json:"sha1,omitempty"`
	SHA2        []string `json:"sha2,omitempty"`
	SHA3        []string `json:"sha3,omitempty"`
	Options     options  `json:"options,omitempty"`
	// contains filtered or unexported fields
}

Search contains the fields used to execute an individual search

type SearchResult

type SearchResult []MatchedFile

SearchResult is the results of a single search the file module has executed. It contains a list of the files which were matched as a result of the search.

type SearchResults

type SearchResults map[string]SearchResult

SearchResults is the search result element for an invocation of the file module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL