I'd just write a perl script to use telnet or ftp or ssh