diff --git a/config_default/protocols.ini b/config_default/protocols.ini index 5d03190..3df497e 100644 --- a/config_default/protocols.ini +++ b/config_default/protocols.ini @@ -6,3 +6,15 @@ Upload Prompt = false Upload Command = rz -R Download Command = sz *f stdio = true + +[LRZSZ Ymodem] +Upload Prompt = false +Upload Command = rb -R +Download Command = sb *f +stdio = true + +[LRZSZ XModem] +Upload Prompt = true +Upload Command = rx -R *f +Download Command = sx *f +stdio = true diff --git a/files.c b/files.c index 5e1d859..7c090ab 100644 --- a/files.c +++ b/files.c @@ -336,6 +336,8 @@ int do_download(struct user_record *user, char *file) { int last_char_space; char **arguments; int bpos; + int len; + if (conf.protocols[user->defprotocol - 1]->internal_zmodem) { if (sshBBS) { ttySetRaw(STDIN_FILENO, &oldit); @@ -379,9 +381,10 @@ int do_download(struct user_record *user, char *file) { bpos = 1; arguments = (char **)malloc(sizeof(char *) * (argc + 1)); - - for (i=0;idefprotocol - 1]->internal_zmodem) { upload_zmodem(user, final_path); @@ -470,9 +474,10 @@ int do_upload(struct user_record *user, char *final_path) { } bpos = 1; arguments = (char **)malloc(sizeof(char *) * (argc + 1)); - - for (i=0;idefprotocol - 1]->upload_prompt) { snprintf(upload_command, 1024, "%s%s", upload_path, buffer3); - if (stat(buffer3, &s) != 0) { + if (stat(upload_command, &s) != 0) { recursive_delete(upload_path); return 0; } diff --git a/magicka.strings b/magicka.strings index d34ed6e..94a8e9a 100644 --- a/magicka.strings +++ b/magicka.strings @@ -208,7 +208,7 @@ Is this Correct? (Y/N) \e[1;31m%d. \e[1;37m%s\e[0m\r\n > Sorry, this %s is unavailable over SSH\r\n -Please enter the filename of the file you want to upload\r\n> +\r\n\r\nPlease enter the filename of the file you want to upload\r\n> \r\nUpload Failed\r\n \r\n\e[1;32mSelect a protocol...\e[0m\r\n\r\n \e[0;36mO. \e[1;37mDefault Protocol (\e[1;33m%s\e[1;37m)\r\n