Documentation
¶
Index ¶
- func AuthenticateUser(ctx context.Context, target, username, password string, timeoutMs int) (bool, string, error)
- func ConnectAndLogin(ctx context.Context, target, username, password string, ...) (*ftpclient.Client, error)
- func PerformAuth(ctx context.Context, target string, config *ftpfern.PentestFtpConfig) (*pentestfern.AuthResult, error)
- func PerformDownloadWithContext(ctx context.Context, target, username, password string, ...) (*ftpfern.DownloadResult, error)
- func PerformListWithContext(ctx context.Context, target, username, password string, ...) (*ftpfern.ListResult, error)
- func PerformUploadWithContext(ctx context.Context, target, username, password string, ...) (*ftpfern.UploadResult, error)
- func PerformWriteTestWithContext(ctx context.Context, target, username, password string, ...) (*ftpfern.WriteTestResult, error)
- func RunPentest(ctx context.Context, config *ftpfern.PentestFtpConfig, mode ftpclient.DataMode) (*ftpfern.PentestFtpReport, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateUser ¶
func AuthenticateUser(ctx context.Context, target, username, password string, timeoutMs int) (bool, string, error)
AuthenticateUser attempts a single FTP authentication and returns success, message, error. Used by the spray module for credential spraying.
func ConnectAndLogin ¶ added in v0.0.150
func ConnectAndLogin(ctx context.Context, target, username, password string, config *ftpfern.PentestFtpConfig, mode ftpclient.DataMode) (*ftpclient.Client, error)
ConnectAndLogin opens a control connection and authenticates.
func PerformAuth ¶ added in v0.1.3
func PerformAuth(ctx context.Context, target string, config *ftpfern.PentestFtpConfig) (*pentestfern.AuthResult, error)
PerformAuth tests each username+password combination against the FTP service and returns an AuthResult. It reuses the existing AuthenticateUser primitive from auth.go. When StopOnFirstSuccess is set, it stops after the first successful attempt. When SuccessfulOnly is set, only successful attempts are included in the result.
func PerformDownloadWithContext ¶ added in v0.0.150
func PerformDownloadWithContext(ctx context.Context, target, username, password string, config *ftpfern.PentestFtpConfig, mode ftpclient.DataMode) (*ftpfern.DownloadResult, error)
PerformDownloadWithContext downloads files from an FTP server and returns their content as base64.
func PerformListWithContext ¶ added in v0.0.150
func PerformListWithContext(ctx context.Context, target, username, password string, config *ftpfern.PentestFtpConfig, mode ftpclient.DataMode) (*ftpfern.ListResult, error)
PerformListWithContext enumerates files and directories on an FTP server.
func PerformUploadWithContext ¶ added in v0.0.150
func PerformUploadWithContext(ctx context.Context, target, username, password string, config *ftpfern.PentestFtpConfig, mode ftpclient.DataMode) (*ftpfern.UploadResult, error)
PerformUploadWithContext uploads files to an FTP server from in-memory content.
func PerformWriteTestWithContext ¶ added in v0.0.150
func PerformWriteTestWithContext(ctx context.Context, target, username, password string, config *ftpfern.PentestFtpConfig, mode ftpclient.DataMode) (*ftpfern.WriteTestResult, error)
PerformWriteTestWithContext tests write/delete/rename permissions on FTP directories.
func RunPentest ¶ added in v0.0.154
func RunPentest(ctx context.Context, config *ftpfern.PentestFtpConfig, mode ftpclient.DataMode) (*ftpfern.PentestFtpReport, error)
RunPentest performs FTP pentest operations for multiple targets. mode controls how the data connection is established (auto/passive/active).
Types ¶
This section is empty.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ftpclient is a minimal FTP client that supports both passive (EPSV/PASV) and active (PORT/EPRT) data connection modes, with explicit context propagation for connect and data transfer operations.
|
Package ftpclient is a minimal FTP client that supports both passive (EPSV/PASV) and active (PORT/EPRT) data connection modes, with explicit context propagation for connect and data transfer operations. |