I am connecting to a proftpd server via netcat
nc 10.10.239.150 21
Then I am doing some copy operations like "The mod_copy module implements SITE CPFR and SITE CPTO commands"
After "250 Copy successful" i want to exit this netcat connection and continue with the bash script.
I already tried following call, with CPFR and CPTO instructions outsourced to a msg.txt file
nc 10.10.115.253 21 < msg.txt
But still I dont know how to exit the netcat proftpd connection after successful proftpd operations.
Several tried EOF instructions are not understood by nc/proftpd: Only the CTRL C user input does the job, but this should be done automatically.
man expect
.expect
can automate some or all interactions with a program.