downloaders

package
v0.1.38 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: BSD-2-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOrDefault added in v0.1.23

func GetOrDefault(data []string, index int, def string) string

Types

type IntelXDownloader

type IntelXDownloader struct {
	Term     string
	ZipFile  string
	Threads  int
	ProxyURL string // Proxy to use+
	Limit    int
	// contains filtered or unexported fields
}

func NewIntelXDownloader

func NewIntelXDownloader(term string, apiKey string, outZipFile string) (*IntelXDownloader, error)

func (*IntelXDownloader) ClearScreen added in v0.1.8

func (dwn *IntelXDownloader) ClearScreen()

func (*IntelXDownloader) Close

func (dwn *IntelXDownloader) Close()

func (*IntelXDownloader) DownloadResult

func (dwn *IntelXDownloader) DownloadResult(api *ixapi.IntelligenceXAPI, searchID uuid.UUID, Limit int) error

func (*IntelXDownloader) ParseInfo added in v0.1.23

func (dwn *IntelXDownloader) ParseInfo(file_path string) error

func (*IntelXDownloader) Run

func (*IntelXDownloader) SearchNext

func (dwn *IntelXDownloader) SearchNext() (int, error)

func (*IntelXDownloader) WriteDb

func (dwn *IntelXDownloader) WriteDb(result *ixapi.SearchResult, update bool) (bool, error)

Write results to the database

func (*IntelXDownloader) WriteInfoCsv

func (dwn *IntelXDownloader) WriteInfoCsv() error

func (*IntelXDownloader) WriteInfoJson added in v0.1.37

func (dwn *IntelXDownloader) WriteInfoJson() error

WriteInfoJson dumps every search result record (as returned by the IntelX intelligent/search and persisted in the temp database) to a JSON file inside the package. Unlike Info.csv it keeps the full record, and it is later scanned for content by the parser together with the downloaded data files.

type IntelXDownloaderStatus

type IntelXDownloaderStatus struct {
	TotalFiles int
	Downloaded int
	Duplicated int
	TotalBytes int64
	StateBytes int64
	ResultCode int
	Spin       string
	Step       string
	Running    bool
	IsTerminal bool
}

func (*IntelXDownloaderStatus) Clear

func (st *IntelXDownloaderStatus) Clear()

func (*IntelXDownloaderStatus) Print

func (st *IntelXDownloaderStatus) Print()

Jump to

Keyboard shortcuts

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