Documentation
¶
Index ¶
- func PerformAuthentication(ctx context.Context, target string, config *imapfern.PentestImapConfig) *imapfern.AuthResult
- func PerformFetchHeaders(ctx context.Context, target, username, password string, ...) *imapfern.MessageHeadersResult
- func PerformListFolders(ctx context.Context, target, username, password string, ...) *imapfern.FolderListResult
- func PerformSearch(ctx context.Context, target, username, password string, ...) *imapfern.SearchResult
- func RunPentest(ctx context.Context, config *imapfern.PentestImapConfig) (*imapfern.PentestImapReport, error)
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 ¶
func RunPentest(ctx context.Context, config *imapfern.PentestImapConfig) (*imapfern.PentestImapReport, error)
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.