Pr/ftp greeting code 220 - #625
Open
ethan-thomason wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: use RFC 959 greeting code 220 for FTP greeting
Problem
The FTP handler sends
200as the initial greeting code when a client connects:Per [RFC 959 4.2.1](https://datatracker.ietf.org/doc/html/rfc959#section-4.2.1),
220 Service ready for new useris the correct code for a connection greeting.200 Command okayis a response to a completed command and isn't valid before any command has been issued.Why it matters
220greeting.220. The200greeting is a trivial way to distinguish a Conpot instance from the hardware it's emulating.Change
One line in
conpot/protocols/ftp/ftp_base_handler.py, plus the stale comment above it. No behavior change beyond the response code; the banner text is untouched.Testing
Fresh clone of this branch,
uv sync, running the default template:Previously returned
200 FTP server ready.black --check .passes — 127 files unchanged.