class

Crowbar::Rules::FTPRule

Inherits Crowbar::Rule < Reference < Object

Structure-preserving rule for RFC 959 FTP command and response streams. Maintains strict CRLF line framing while mutating command arguments (e.g. PORT octets, RETR paths, credentials) or response status codes and messages.

Constants

COMMON_COMMANDS = ["USER", "PASS", "ACCT", "CWD", "CDUP", "SMNT", "QUIT", "REIN", "PORT", "PASV", "TYPE", "STRU", "MODE", "RETR", "STOR", "STOU", "APPE", "ALLO", "REST", "RNFR", "RNTO", "ABOR", "DELE", "RMD", "MKD", "PWD", "LIST", "NLST", "SITE", "SYST", "STAT", "HELP", "NOOP", "FEAT", "SIZE", "EPSV", "EPRT", "AUTH", "PBSZ", "PROT"]
RESPONSE_CODES = ["125", "150", "200", "211", "215", "220", "221", "226", "227", "230", "331", "332", "350", "421", "425", "426", "450", "451", "500", "501", "502", "503", "504", "530", "550", "552", "553", "999", "000"]

Constructors

new(weight : Float64 = 1.0, mutate_responses : Bool = true, mutate_verbs : Bool = false)
Source

Instance methods

apply(context : Context, buffer : Buffer) : Bool

Applies a structure-preserving transformation to the buffer

Source
description
Source
match?(buffer : Buffer) : Bool

Checks whether the buffer matches the format handled by this rule

Source
mutate_responses=(mutate_responses : Bool)
Source
mutate_responses?
Source
mutate_verbs=(mutate_verbs : Bool)
Source
mutate_verbs?
Source
name
Source