ftp

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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

RunPentest performs FTP pentest operations for multiple targets. mode controls how the data connection is established (auto/passive/active).

Types

This section is empty.

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.

Jump to

Keyboard shortcuts

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