• Executing SEXYZ from Javascript

    From High Spirit@DCBBS to All on Tue Mar 21 18:57:10 2017
    Hey All,

    Having a little problem with SEXYZ being executed from a Javascript file...

    I looked at SEXYZ command line settings in SCFG and working from that:

    %!sexyz%. %h -%p sz @%f%!sexyz%. %h -%p sz @%f

    after changing the values (running on *nix):

    %! = /sbbs/exec/
    %. =
    %h = client.socket.descriptor
    %p = client.protocol
    %f = <FILE WITH LIST OF FILES TO TRANSFER>

    so my command is:

    /sbbs/exec/sexyz 39 -Telnet sz @/sbbs/node1/filelist.txt

    Client is running SyncTerm and when the command executes, the download screen in SyncTERM pops up and will *ATTEMPT* to auto download the files. Sometimes I see the filenames of the files it is trying to send, but most of the times I see timeouts. I hit ESCape to abort and it trys to send the next file... again sometimes I see the filename, sometimes not, but the transfer fails...

    Anyone have thoughts? Am I missing something?

    -- High Spirit

    ---
    ■ Synchronet ■ Digital Creation BBS -- bbs.digitalcreationbbs.com:2323
  • From Digital Man to High Spirit on Tue Mar 21 18:43:09 2017
    Re: Executing SEXYZ from Javascript
    By: High Spirit to All on Tue Mar 21 2017 06:57 pm

    Hey All,

    Having a little problem with SEXYZ being executed from a Javascript file...

    I looked at SEXYZ command line settings in SCFG and working from that:

    %!sexyz%. %h -%p sz @%f%!sexyz%. %h -%p sz @%f

    after changing the values (running on *nix):

    %! = /sbbs/exec/
    %. =
    %h = client.socket.descriptor
    %p = client.protocol
    %f = <FILE WITH LIST OF FILES TO TRANSFER>

    so my command is:

    /sbbs/exec/sexyz 39 -Telnet sz @/sbbs/node1/filelist.txt

    And how are you executing that command from JavaScript?

    Client is running SyncTerm and when the command executes, the download screen in SyncTERM pops up and will *ATTEMPT* to auto download the files. Sometimes I see the filenames of the files it is trying to send, but most of the times I see timeouts. I hit ESCape to abort and it trys to send the next file... again sometimes I see the filename, sometimes not, but the transfer fails...

    Anyone have thoughts? Am I missing something?

    The correct way to initiate a download (send a file) using JavaScript is with the bbs.send_file() function (see http://synchro.net/docs/jsobjs.html for details). It possible you could setup the sexyz command-line and execute it correctly from Synchronet, but it's not the "proper" way to achieve this.

    digital man

    Synchronet "Real Fact" #49:
    Synchronet program was named 'sbbs' instead of 'sync' to avoid conflict w/Unix. Norco, CA WX: 56.9°F, 93.0% humidity, 0 mph SE wind, 0.00 inches rain/24hrs
  • From High Spirit@DCBBS to Digital Man on Tue Mar 21 22:08:54 2017
    Re: Executing SEXYZ from Javascript
    By: Digital Man to High Spirit on Tue Mar 21 2017 06:43 pm

    And how are you executing that command from JavaScript?

    Using the system.exec() command.

    The correct way to initiate a download (send a file) using JavaScript is with the bbs.send_file() function (see http://synchro.net/docs/jsobjs.html for details). It possible you could setup the sexyz command-line and execute it correctly from Synchronet, but it's not the "proper" way to achieve this.

    I tried that, but I do not want the prompt to "Hang up after transfer?" and it does not handle batch transfers that I could see.

    -- High Spirit

    ---
    ■ Synchronet ■ Digital Creation BBS -- bbs.digitalcreationbbs.com:2323
  • From Digital Man to High Spirit on Wed Mar 22 11:17:08 2017
    Re: Executing SEXYZ from Javascript
    By: High Spirit to Digital Man on Tue Mar 21 2017 10:08 pm

    Re: Executing SEXYZ from Javascript
    By: Digital Man to High Spirit on Tue Mar 21 2017 06:43 pm

    And how are you executing that command from JavaScript?

    Using the system.exec() command.

    I wouldn't expect that to work. Firstly, with Telnet, the session must be put into "binary mode" (for both directions). You could possibly use the console.telnet_cmd() function to do this:
    var telnet = load(new Object, "telnet_lib.js");
    console.telnet_cmd(telnet.DO, 0);
    console.telnet_cmd(telnet.WILL, 0);

    0 is the "binary tx" telnet command.

    Also, that method will definitely not work with SSH (but it might with RLogin).

    The correct way to initiate a download (send a file) using JavaScript is with the bbs.send_file() function (see http://synchro.net/docs/jsobjs.html for details). It possible you could setup the sexyz command-line and execute it correctly from Synchronet, but it's not the "proper" way to achieve this.

    I tried that, but I do not want the prompt to "Hang up after transfer?" and it does not handle batch transfers that I could see.

    Did you try using bbs.batch_add_list() and bbs.batch_download()?

    digital man

    Synchronet/BBS Terminology Definition #4:
    BBS = Bulletin Board System
    Norco, CA WX: 61.4°F, 82.0% humidity, 6 mph E wind, 0.09 inches rain/24hrs
  • From High Spirit@DCBBS to Digital Man on Wed Mar 22 17:30:14 2017
    Re: RE: Executing SEXYZ from Javascript
    By: Digital Man to High Spirit on Wed Mar 22 2017 11:17 am

    I wouldn't expect that to work. Firstly, with Telnet, the session must be put into "binary mode" (for both directions). You could possibly use the console.telnet_cmd() function to do this:
    var telnet = load(new Object, "telnet_lib.js"); console.telnet_cmd(telnet.DO, 0);
    console.telnet_cmd(telnet.WILL, 0);
    0 is the "binary tx" telnet command.
    Also, that method will definitely not work with SSH (but it might with RLogin).

    Interesting! Good to know.

    Did you try using bbs.batch_add_list() and bbs.batch_download()?

    Now that you mention it, I do remember these commands and probably forgot all about them... code at work, code at home... I need a vacation. ;)

    -- High Spirit Digital Creation BBS - bbs.digitalcreationbbs.com

    ---
    ■ Synchronet ■ Digital Creation BBS -- bbs.digitalcreationbbs.com:23