core

package
v0.0.0-...-4cd3964 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorReset  = "\x1b[0m"
	ColorGreen  = "\x1b[92m"
	ColorRed    = "\x1b[91m"
	ColorYellow = "\x1b[93m"
	ColorBlue   = "\x1b[94m"
)
View Source
const (
	Version  = "0.1.0"
	Codename = "Ymir"
)

Variables

This section is empty.

Functions

func Debug

func Debug(msg string)

func Failure

func Failure(msg string)

func ParseTargets

func ParseTargets(target string) ([]string, error)

ParseTargets expands a target string into a list of hosts. Accepts: single IP/hostname, CIDR range (e.g. 192.168.1.0/24), @file reference, or a path to an existing file.

func RunConcurrent

func RunConcurrent(jobs []Job, threads int, fn func(Job))

RunConcurrent executes fn for each job using at most threads goroutines.

func Section

func Section(title string, count int)

func SetDebug

func SetDebug(d bool)

SetDebug enables or disables debug output.

func SetLogFile

func SetLogFile(path string) error

SetLogFile opens a file for logging (appends if it exists).

func SetVerbose

func SetVerbose(v bool)

SetVerbose enables or disables verbose output.

func Success

func Success(msg string)

func TreeDetail

func TreeDetail(label, value string, last bool)

func TreeEntry

func TreeEntry(name string, last bool)

func TreeEntryColored

func TreeEntryColored(name, color string, last bool)

func Verbose

func Verbose(msg string)

Types

type Credential

type Credential struct {
	Username string
	Password string
	Hash     string
}

Credential holds authentication information for one attempt.

func ParseCredentials

func ParseCredentials(username, password, hash string) ([]Credential, error)

ParseCredentials builds all credential combinations from the provided inputs. Each input can be a literal value, a file path, or an @file reference. If hash is set, it is used for all users (password ignored). Otherwise builds a Cartesian product of users × passwords.

type Job

type Job struct {
	Target string
	Cred   Credential
}

Job represents one unit of work: one target paired with one credential.

type OutputBuffer

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

OutputBuffer accumulates output lines from a single goroutine and prints them all at once under the global lock, preventing interleaved output when multiple goroutines are running concurrently.

func (*OutputBuffer) Failure

func (b *OutputBuffer) Failure(msg string)

func (*OutputBuffer) Flush

func (b *OutputBuffer) Flush()

Flush writes all buffered messages atomically to the output.

func (*OutputBuffer) Section

func (b *OutputBuffer) Section(title string, count int)

func (*OutputBuffer) Success

func (b *OutputBuffer) Success(msg string)

func (*OutputBuffer) TreeDetail

func (b *OutputBuffer) TreeDetail(label, value string, last bool)

func (*OutputBuffer) TreeEntry

func (b *OutputBuffer) TreeEntry(name string, last bool)

func (*OutputBuffer) TreeEntryColored

func (b *OutputBuffer) TreeEntryColored(name, color string, last bool)

Jump to

Keyboard shortcuts

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