Forum Discussion
KenG
Nimbostratus
May 19, 2017Inject commands on an FTP connection
Does anyone know if it is possible to inject a command into an FTP conversation?
I've trying to work around a bug in the application that is incorrectly asking for a transfer in ascii mode and prior to any GET I'd like to inject a BIN command. It looks like the server defaults to ASCII so I can't just remove the ASCII command from the stream so the [TCP::Payload] replacement thing doesn't seem appropriate.
Anyone got any bright ideas?
- Anesh
Cirrostratus
try the below
when SERVER_CONNECTED { TCP::collect } when SERVER_DATA { if {[TCP::payload] contains "string after which you want to inject BIN" } TCP::respond "BIN" TCP::payload replace 0 [TCP::payload length] "" TCP::release }
- Anesh
Cirrostratus
Or you can use sideband connections
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects