• PATCH: getnewsgroupslist.js optional authentication

    From Ragnarok@1:103/705 to DOVE-Net.Synchronet_Programming_C+ on Sun Jun 14 16:51:49 2020
    I have modified version of getnewsgroupslist.js with optional
    authentication support because use nntp.aioe.org server that don't need it.

    http://paste.debian.net/1152067/

    I share here because can be useful for another people

    thanks!

    --- getnewsgrouplist.js 2019-12-01 00:02:31.000000000 -0300
    +++ ../mods/getnewsgrouplist.js 2020-06-14 16:36:18.134989504 -0300
    @@ -2,21 +2,39 @@

    "use strict";

    -if(argc < 3) {
    - print("usage: " + js.exec_file + " <user> <password> <host> [port] [pattern]");
    +if(argc < 1) {
    + print("usage: " + js.exec_file + " -h <host> -p [port] -a [user:pass] -t [pattern]");
    exit(0);
    }

    +var host = "";
    +var port = 119;
    +var auth = "";
    +var name = "";
    +var pass = "";
    +var pattern = "";
    +
    +for(var i=0;i<argc;i++) {
    + switch (argv[i].toLowerCase()) {
    + case "-h":
    + host = argv[++i];
    + break;
    + case "-p":
    + port = argv[++i];
    + break;
    + case "-a":
    + auth = argv[++i];
    + break;
    + case "-t":
    + pattern = argv[++i];
    + break;
    + default:
    + // compatibilty no -params?
    + host = argv[0];
    + }
    +}
    +
    var socket = new Socket();
    -var name = argv[0]
  • From Digital Man@1:103/705 to Ragnarok on Mon Jun 15 19:28:44 2020
    Re: PATCH: getnewsgroupslist.js optional authentication
    By: Ragnarok to DOVE-Net.Synchronet_Programming_C+ on Sun Jun 14 2020 04:51 pm

    I have modified version of getnewsgroupslist.js with optional
    authentication support because use nntp.aioe.org server that don't need it.

    http://paste.debian.net/1152067/

    I share here because can be useful for another people

    And that method is fine so long as there isn't a colon in your password. :-) A separate username and password argument would probably be better.

    digital man

    Synchronet/BBS Terminology Definition #7:
    BinkP = BinkD Protocol
    Norco, CA WX: 70.3øF, 66.0% humidity, 10 mph E wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)