Okey, I now have a simple FTP client that at least seems to be working
somewhat. The only problem right now is that binary data seems to be
scrambled in some way since binary files are broken when retrieved and
written to local disk. Any ideas why?
https://github.com/poppa/Pike-Modules/blob/master/Protocols.pmod/FTP.pmod
A simple use case:
int main(int argc, array(string) argv)
{
Protocols.FTP.Client cli = Protocols.FTP.Client("graveyard");
if (!cli->login("poppa", "some-password-dude")) {
werror("Login failed!\n");
return 1;
}
cli->binary_mode();
cli->cwd("/Main");
cli->retr("house.jpg", __DIR__);
cli->quit();
return 0;
}
# Pontus
Post by Chris AngelicoOn Fri, Jan 16, 2015 at 2:15 PM, H. William Welliver III
Agreed⊠Iâll also add that Iâd love to have an SSH/SFTP protocol module,
but thatâs not at all a one hour project :)
Definitely! Pike does have a fairly awesome crypto module, though...
how much of the existing SSL work can be reused? It would be rather
awesome.
ChrisA