credentials

package
v0.0.0-...-d1533f9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveKeyFromPassword

func DeriveKeyFromPassword(password string) []byte

DeriveKeyFromPassword derives an encryption key from a password

Types

type APICredentials

type APICredentials struct {
	CirclUsername     string `json:"circl_username,omitempty"`
	CirclPassword     string `json:"circl_password,omitempty"`
	PassiveTotalUser  string `json:"passivetotal_user,omitempty"`
	PassiveTotalKey   string `json:"passivetotal_key,omitempty"`
	ShodanAPIKey      string `json:"shodan_api_key,omitempty"`
	CensysAPIID       string `json:"censys_api_id,omitempty"`
	CensysAPISecret   string `json:"censys_api_secret,omitempty"`
	VirusTotalAPIKey  string `json:"virustotal_api_key,omitempty"`
	SecurityTrailsKey string `json:"securitytrails_key,omitempty"`
}

APICredentials represents the structure of stored credentials

type Manager

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

Manager handles secure storage and retrieval of API credentials

func NewManager

func NewManager(logger *logger.Logger) (*Manager, error)

NewManager creates a new credentials manager

func (*Manager) CheckAndPromptForCircl

func (m *Manager) CheckAndPromptForCircl() error

CheckAndPromptForCircl checks if CIRCL credentials exist and prompts if not

func (*Manager) GetAPIKeys

func (m *Manager) GetAPIKeys() map[string]string

GetAPIKeys returns a map of API keys for use by discovery modules

func (*Manager) Load

func (m *Manager) Load() error

Load decrypts and loads credentials from disk

func (*Manager) PromptForAllAPIs

func (m *Manager) PromptForAllAPIs() error

PromptForAllAPIs provides an interactive prompt for all supported APIs

func (*Manager) Save

func (m *Manager) Save() error

Save encrypts and saves credentials to disk

Jump to

Keyboard shortcuts

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