Netcat problem - please help

From: Piotrek (
Date: 03/03/04

Date: Wed, 3 Mar 2004 18:39:22 +0100


I'm trying to write a simple ftp-talk script using netcat.
Now what I want to do is to make netcat wait for '220 FTP Server ready.' and
send USER (whatever) than wait for '331 Pass req...' send PASS (whatever)
and so on.... Can somebody tell me how such a script suppose to look and how
to pipe it thru netcat? I've tried to do that for 5 hours but I'm running
out of ideas ;)

The best way is to make such a script that recognizes only the code of
server message (for '220 FTP Server ready' it wopuld recognize only first
three digits -> 220 ) Because the greetings and server messages are
different for every server.


Best regards,