imap

package
v0.0.193 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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