imap

package
v0.0.196 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 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

func PerformAuthentication

func PerformAuthentication(ctx context.Context, target string, config *imapfern.PentestImapConfig) *imapfern.AuthResult

PerformAuthentication exercises every (username, password) pair against target and records each attempt in the returned AuthResult. The caller may reuse a successful credential for downstream actions.

func PerformFetchHeaders

func PerformFetchHeaders(ctx context.Context, target, username, password string, config *imapfern.PentestImapConfig) *imapfern.MessageHeadersResult

PerformFetchHeaders authenticates, EXAMINEs the configured folder, then runs FETCH 1:N (UID BODY.PEEK[HEADER.FIELDS (FROM TO SUBJECT DATE)]) so the retrieval is read-only (does not set \Seen). Sequence-number FETCH is used (not UID FETCH) to make 1:N mean "first N messages by sequence number" — EXAMINE forbids EXPUNGE so the sequence-number space is stable for this session, and the UID is still returned per-message for downstream callers.

func PerformListFolders

func PerformListFolders(ctx context.Context, target, username, password string, config *imapfern.PentestImapConfig) *imapfern.FolderListResult

PerformListFolders authenticates with the supplied credentials and runs LIST "" "*" followed by STATUS on each returned mailbox.

func PerformSearch

func PerformSearch(ctx context.Context, target, username, password string, config *imapfern.PentestImapConfig) *imapfern.SearchResult

PerformSearch authenticates, EXAMINEs the target folder, and runs UID SEARCH using the configured search expression. The matching UIDs are returned for caller-side ranking / follow-up FETCH.

func RunPentest

RunPentest performs IMAP pentest operations for every target × every requested action. AUTH is implicit for any action that requires a session; successful credentials drive the subsequent LIST_FOLDERS / FETCH_HEADERS / SEARCH actions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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