store

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store handles persistence of scan results and hosts in SQLite.

func New

func New(path string, readOnly bool) (*Store, error)

New opens or creates a SQLite database at the specified path.

func (*Store) Close

func (s *Store) Close() error

Close closes the underlying SQLite database and prepared statements.

func (*Store) CompletedRoots added in v1.4.0

func (s *Store) CompletedRoots() (map[string]bool, error)

CompletedRoots returns the set of root domains whose latest scan finished.

func (*Store) DeleteHosts added in v1.3.0

func (s *Store) DeleteHosts(root string, hosts []string) error

DeleteHosts removes wildcard-polluted subdomains (never deleting the root apex) and any associated host_refs.

func (*Store) DistinctRoots added in v1.4.0

func (s *Store) DistinctRoots() ([]string, error)

DistinctRoots returns all distinct root domains present in the hosts table.

func (*Store) FinishScan

func (s *Store) FinishScan(id int64) error

FinishScan marks a scan run as completed.

func (*Store) GetScansSummary

func (s *Store) GetScansSummary() ([]types.RootInfo, error)

GetScansSummary returns a summary of scans grouped by root domain.

func (*Store) QueryHostRefs added in v1.2.0

func (s *Store) QueryHostRefs(root string) ([]types.HostRef, error)

QueryHostRefs returns content-derived host references, optionally scoped to a root domain.

func (*Store) QueryHosts

func (s *Store) QueryHosts(f types.Filter) ([]types.Host, error)

QueryHosts fetches hosts matching the given filter.

func (*Store) RawQuery

func (s *Store) RawQuery(q string) ([]string, [][]string, error)

RawQuery runs raw SQL against the database.

func (*Store) ResetDNS added in v1.3.0

func (s *Store) ResetDNS(root string) error

ResetDNS clears previous DNS resolution columns for a root domain before a DNS-only refresh.

func (*Store) ResetProbe

func (s *Store) ResetProbe(root string) error

ResetProbe clears last scan's DNS and probe data so hosts that went down show as dead.

func (*Store) SaveDNS added in v1.3.0

func (s *Store) SaveDNS(host string, d types.DNSResult) error

SaveDNS updates DNS records (IPs, CNAME chain, CDN, and IP-range WAF) for a host.

func (*Store) SaveHostRef added in v1.2.0

func (s *Store) SaveHostRef(host, referrer, source string) error

SaveHostRef records or updates a cross-host reference extracted from HTTP content.

func (*Store) SaveProbe

func (s *Store) SaveProbe(host string, p types.Probe) error

SaveProbe updates probe results for a host while preserving DNS fields when httpx leaves them blank.

func (*Store) SetScanRounds added in v1.4.0

func (s *Store) SetScanRounds(id int64, rounds int) error

SetScanRounds records the number of completed enumeration rounds for a scan.

func (*Store) StartScan

func (s *Store) StartScan(root, opts string) (int64, error)

StartScan records the start of a scan run.

func (*Store) UnprobedScope added in v1.4.0

func (s *Store) UnprobedScope(root string) (bool, error)

UnprobedScope reports whether root (or the whole database when empty) has stored hosts that have not yet been through HTTP probing.

func (*Store) UpdateAuth added in v1.1.0

func (s *Store) UpdateAuth(host, authType, authURL string) error

UpdateAuth updates the asset role classification and auth URL for a host.

func (*Store) UpsertContentHost added in v1.2.0

func (s *Store) UpsertContentHost(scan int64, root, host string, depth int, referrer string) error

UpsertContentHost records a content-derived host without overwriting non-empty passive sources.

func (*Store) UpsertHost

func (s *Store) UpsertHost(scan int64, root, host string, depth int, sources []string) error

UpsertHost records a discovered host, keeping its first-seen info on re-runs.

Jump to

Keyboard shortcuts

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