checkpoint

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListCheckpoints

func ListCheckpoints() ([]string, error)

Types

type Checkpoint

type Checkpoint struct {
	// contains filtered or unexported fields
}

func Load

func Load(filename string) (*Checkpoint, error)

func New

func New(network, user, domain, pattern string, hosts []string, outputDir string, excludePatterns, excludedShares []string, minDate, maxDate string) *Checkpoint

func (*Checkpoint) AddFailedHost

func (c *Checkpoint) AddFailedHost(host, reason string)

func (*Checkpoint) AddFoundFile

func (c *Checkpoint) AddFoundFile(host string, fileInfo *FileInfo)

func (*Checkpoint) CreateSimplifiedLog

func (c *Checkpoint) CreateSimplifiedLog(outputPath string) error

CreateSimplifiedLog cria uma versão simplificada do log para relatórios

func (*Checkpoint) GetAllFoundFiles

func (c *Checkpoint) GetAllFoundFiles() map[string][]FileInfo

func (*Checkpoint) GetDomain

func (c *Checkpoint) GetDomain() string

func (*Checkpoint) GetFailedHosts

func (c *Checkpoint) GetFailedHosts() map[string]string

func (*Checkpoint) GetFilename

func (c *Checkpoint) GetFilename() string

func (*Checkpoint) GetFoundFiles

func (c *Checkpoint) GetFoundFiles(host string) []FileInfo

func (*Checkpoint) GetFoundFilesCount

func (c *Checkpoint) GetFoundFilesCount() int

GetFoundFilesCount retorna o número real de arquivos únicos encontrados

func (*Checkpoint) GetLeetSpeak

func (c *Checkpoint) GetLeetSpeak() bool

GetLeetSpeak retorna se a busca usa leet speak

func (*Checkpoint) GetMaxDate

func (c *Checkpoint) GetMaxDate() string

func (*Checkpoint) GetMinDate

func (c *Checkpoint) GetMinDate() string

func (*Checkpoint) GetNetwork

func (c *Checkpoint) GetNetwork() string

func (*Checkpoint) GetNoCopy

func (c *Checkpoint) GetNoCopy() bool

GetNoCopy retorna se a execução está em modo no-copy

func (*Checkpoint) GetNoCopyDeep

func (c *Checkpoint) GetNoCopyDeep() bool

GetNoCopyDeep retorna se a execução está em modo no-copy-deep

func (*Checkpoint) GetPendingHosts

func (c *Checkpoint) GetPendingHosts() []string

func (*Checkpoint) GetProcessedHosts

func (c *Checkpoint) GetProcessedHosts() []string

func (*Checkpoint) GetSearchPattern

func (c *Checkpoint) GetSearchPattern() string

func (*Checkpoint) GetUser

func (c *Checkpoint) GetUser() string

func (*Checkpoint) MarkHostProcessed

func (c *Checkpoint) MarkHostProcessed(host string)

func (*Checkpoint) Save

func (c *Checkpoint) Save() error

func (*Checkpoint) SetFilename

func (c *Checkpoint) SetFilename(filename string)

func (*Checkpoint) SetLeetSpeak

func (c *Checkpoint) SetLeetSpeak(useLeet bool)

SetLeetSpeak define se a busca usa leet speak

func (*Checkpoint) SetNoCopy

func (c *Checkpoint) SetNoCopy(noCopy bool)

SetNoCopy define se a execução está em modo no-copy

func (*Checkpoint) SetNoCopyDeep

func (c *Checkpoint) SetNoCopyDeep(noCopyDeep bool)

SetNoCopyDeep define se a execução está em modo no-copy-deep

type CheckpointData

type CheckpointData struct {
	StartTime       time.Time             `json:"start_time"`
	LastUpdate      time.Time             `json:"last_update"`
	Network         string                `json:"network"`
	User            string                `json:"user"`
	Domain          string                `json:"domain"`
	SearchPattern   string                `json:"search_pattern"`
	LeetSpeak       bool                  `json:"leet_speak"`
	NoCopy          bool                  `json:"no_copy"`
	NoCopyDeep      bool                  `json:"no_copy_deep"`
	ProcessedHosts  []string              `json:"processed_hosts"`
	PendingHosts    []string              `json:"pending_hosts"`
	FoundFiles      map[string][]FileInfo `json:"found_files"`  // host -> []FileInfo
	FailedHosts     map[string]string     `json:"failed_hosts"` // host -> erro
	OutputDir       string                `json:"output_dir"`
	ExcludePatterns []string              `json:"exclude_patterns,omitempty"`
	ExcludedShares  []string              `json:"excluded_shares,omitempty"`
	MinDate         string                `json:"min_date,omitempty"`
	MaxDate         string                `json:"max_date,omitempty"`
}

type FileInfo

type FileInfo struct {
	Path        string    `json:"path"`
	ShareName   string    `json:"share_name"`
	Size        int64     `json:"size"`
	Found       time.Time `json:"found"`
	Occurrences []Match   `json:"occurrences,omitempty"` // Lista de ocorrências encontradas no arquivo
}

type Match

type Match struct {
	LineNumber int    `json:"line_number,omitempty"` // Número da linha onde foi encontrado
	Content    string `json:"content,omitempty"`     // Conteúdo encontrado
	Pattern    string `json:"pattern,omitempty"`     // Padrão que matched
}

type SimplifiedLogEntry

type SimplifiedLogEntry struct {
	Path      string    `json:"path"`
	ShareName string    `json:"share_name"`
	Size      int64     `json:"size"`
	Found     time.Time `json:"found"`
	Pattern   string    `json:"pattern,omitempty"`
	Content   string    `json:"content,omitempty"`
	NoCopy    bool      `json:"no_copy"`
}

SimplifiedLogEntry representa uma entrada simplificada para o log

Jump to

Keyboard shortcuts

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