• New User Script

    From Lab Rat@TOXIC to All on Tuesday, February 18, 2014 16:31:18
    Hi All,

    When connecting by RLogin with credentials unknown to the server it takes the user straight to the new user script with "Do you have a color terminal" - can anyone tell me where this script is? I presume it's a JavaScript file? I want to intercept the process before it gives the 'Do you have a color terminal' prompt.

    /sbbs/exec/newuser.js would have been my first port of call but this seems to be quite a way down the default new user process and seems to be more a part
    of the guest login process.

    Lab Rat


    ---
    ■ Synchronet ■ Toxic Laboratory BBS - Birmingham, UK - toxicbbs.com
  • From Bill McGarrity@TEQUILAM to Lab Rat on Tuesday, February 18, 2014 15:11:00
    Lab Rat wrote to All <=-

    Hi All,

    When connecting by RLogin with credentials unknown to the server it
    takes the user straight to the new user script with "Do you have a
    color terminal" - can anyone tell me where this script is? I presume
    it's a JavaScript file? I want to intercept the process before it gives the 'Do you have a color terminal' prompt.

    /sbbs/exec/newuser.js would have been my first port of call but this
    seems to be quite a way down the default new user process and seems to
    be more a part of the guest login process.

    I believe you're looking for login.js

    Enjoy!


    Bill

    Telnet: tequilamockingbirdonline.net
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Motorcycles are everywhere... Look twice, save a life!!
    --- MultiMail/Win32 v0.50
    ■ Synchronet ■ TequilaMockingbird Online - TELNET: tequilamockingbirdonline.net
  • From Digital Man to Lab Rat on Tuesday, February 18, 2014 15:39:30
    Re: New User Script
    By: Lab Rat to All on Tue Feb 18 2014 04:31 pm

    Hi All,

    When connecting by RLogin with credentials unknown to the server it takes the user straight to the new user script with "Do you have a color
    terminal" - can anyone tell me where this script is? I presume it's a JavaScript file? I want to intercept the process before it gives the 'Do
    you have a color terminal' prompt.

    There's no script in control at that point.

    /sbbs/exec/newuser.js would have been my first port of call but this seems to be quite a way down the default new user process and seems to be more a part of the guest login process.

    Perhaps if you tell us what you want to do, we can help you achieve that.

    digital man

    Synchronet "Real Fact" #17:
    Rob Swindell first learned to program in C by hacking on WWIV BBS software. Norco, CA WX: 68.8°F, 43.0% humidity, 2 mph ESE wind, 0.00 inches rain/24hrs
  • From Lab Rat@TOXIC to Bill McGarrity on Tuesday, February 18, 2014 22:29:16
    Re: Re: New User Script
    By: Bill McGarrity to Lab Rat on Tue Feb 18 2014 15:11:00

    I believe you're looking for login.js

    I can't see anything of the sort in login.js though.

    Lab Rat


    ---
    ■ Synchronet ■ Toxic Laboratory BBS - Birmingham, UK - toxicbbs.com
  • From Bill McGarrity@TEQUILAM to Digital Man on Wednesday, February 19, 2014 00:40:00
    Digital Man wrote to Lab Rat <=-


    Hi All,

    When connecting by RLogin with credentials unknown to the server it takes the user straight to the new user script with "Do you have a color
    terminal" - can anyone tell me where this script is? I presume it's a JavaScript file? I want to intercept the process before it gives the 'Do
    you have a color terminal' prompt.

    There's no script in control at that point.

    For my own knowledge, when New is answered on the Login, what generates the questions regarding Alias, Full Name, etc...


    Bill

    Telnet: tequilamockingbirdonline.net
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Motorcycles are everywhere... Look twice, save a life!!
    --- MultiMail/Win32 v0.50
    ■ Synchronet ■ TequilaMockingbird Online - TELNET: tequilamockingbirdonline.net
  • From Digital Man to Bill McGarrity on Tuesday, February 18, 2014 22:30:58
    Re: Re: New User Script
    By: Bill McGarrity to Digital Man on Wed Feb 19 2014 12:40 am

    Digital Man wrote to Lab Rat <=-


    Hi All,

    When connecting by RLogin with credentials unknown to the server it
    takes the user straight to the new user script with "Do you have a color terminal" - can anyone tell me where this script is? I presume it's a JavaScript file? I want to intercept the process before it gives the 'Do you have a color terminal' prompt.

    There's no script in control at that point.

    For my own knowledge, when New is answered on the Login, what generates the questions regarding Alias, Full Name, etc...

    src/sbbs3/newuser.cpp. The strings come from ctrl/text.dat.

    digital man

    Synchronet "Real Fact" #81:
    Flapuebarg unf vagreany ebg13 fhccbeg sbe fhcresvpvnyyl rapelcgvat grkg.
    Norco, CA WX: 55.8°F, 81.0% humidity, 0 mph SSE wind, 0.00 inches rain/24hrs
  • From Lab Rat@TOXIC to Digital Man on Wednesday, February 19, 2014 10:56:15
    Re: New User Script
    By: Digital Man to Lab Rat on Tue Feb 18 2014 15:39:30

    Perhaps if you tell us what you want to do, we can help you achieve that.

    digital man

    OK, this is what I am trying to do - wasn't deliberately being cagey, just didn't want to bore you with the details!

    I want to capture the username of the unknown user passed by RLogin as a string but not use it to log in to the system. I then want to log in using the remote system's IP address as the username which is already in the user database and disregard the RLogin password completely. That way, anyone connecting by RLogin from a remote BBS is automatically logged in as the same user (the remote system's IP) and then their actual username is just floating around as a string which I will then use later on.

    I can get this working fine by telnet, but I want the user to be automatically logged in and therefore need RLogin. From what I can tell, RLogin with an unknown username doesn't seem to touch login.js - I have put many strategically placed

    console.print(str);
    console.pause();

    in login.js any using RLogin, it doesn't pause once, let alone show the username with a known or unknown user.

    The only alternative that I can think of that would work for me is if there would be some way of passing a different username and password to that of the logged in user from a remote board using RLogin - i.e. create an external program: *rlogin <remote host> <user> <pass> - but as far as I can tell, this isn't possible.

    Thanks for your help with this - I'm sure I'll get there in the end...


    Lab Rat.


    ---
    ■ Synchronet ■ Toxic Laboratory BBS - Birmingham, UK - toxicbbs.com
  • From Digital Man to Lab Rat on Wednesday, February 19, 2014 14:45:17
    Re: New User Script
    By: Lab Rat to Digital Man on Wed Feb 19 2014 10:56 am

    Re: New User Script
    By: Digital Man to Lab Rat on Tue Feb 18 2014 15:39:30

    Perhaps if you tell us what you want to do, we can help you achieve
    that.

    digital man

    OK, this is what I am trying to do - wasn't deliberately being cagey, just didn't want to bore you with the details!

    I want to capture the username of the unknown user passed by RLogin as a string but not use it to log in to the system. I then want to log in using the remote system's IP address as the username which is already in the user database and disregard the RLogin password completely. That way, anyone connecting by RLogin from a remote BBS is automatically logged in as the same user (the remote system's IP) and then their actual username is just floating around as a string which I will then use later on.

    I can get this working fine by telnet, but I want the user to be automatically logged in and therefore need RLogin. From what I can tell, RLogin with an unknown username doesn't seem to touch login.js - I have put many strategically placed

    console.print(str);
    console.pause();

    in login.js any using RLogin, it doesn't pause once, let alone show the username with a known or unknown user.

    The RLogin "negotiation" (such that it is) is implemented in the C/C++ source code and not controllable via JavaScript.

    The only alternative that I can think of that would work for me is if there would be some way of passing a different username and password to that of the logged in user from a remote board using RLogin - i.e. create an external program: *rlogin <remote host> <user> <pass> - but as far as I can tell, this isn't possible.

    Yeah, that would be a better approach. If you're using the current development build (v3.16), then you can pass the username and password to the JavaScript bbs.rlogin_gate method (as the 2nd and 3rd arguments). Like this:

    bbs.rlogin_gate(host, name, pass);

    If you use that instead of bbs.telnet_gate() in the remote systems's rlogin.js,
    that'll allow you to pass whatever name/pass combination you wish via RLogin.

    digital man

    Synchronet "Real Fact" #72:
    SyncTERM (created by Deuce) contains portions of Synchronet and SEXYZ code. Norco, CA WX: 65.2°F, 57.0% humidity, 13 mph ESE wind, 0.00 inches rain/24hrs
  • From Lab Rat@TOXIC to Digital Man on Thursday, March 06, 2014 13:16:15
    Yeah, that would be a better approach. If you're using the current development build (v3.16), then you can pass the username and password to the JavaScript bbs.rlogin_gate method (as the 2nd and 3rd arguments). Like this:

    bbs.rlogin_gate(host, name, pass);

    If you use that instead of bbs.telnet_gate() in the remote systems's rlogin.js, that'll allow you to pass whatever name/pass combination you
    wish via RLogin.

    digital man

    I'm afraid I just cannot get rlogin_gate to do anything. When I run it in JavaScript, absolutely nothing happens:

    load("sbbsdefs.js");

    var host="192.168.0.172";
    var name="Bbs Client";
    var pass="password";

    bbs.rlogin_gate(host, name, pass);

    console.writeln("Finished");
    console.pause();

    I don't even get to see the 'Finished' text. If I connect to the system 192.168.0.172 from SyncTERM using RLogin and those same credentials, it connects just fine.

    If I substitute the rlogin_gate with telnet_gate and use this line:

    bbs.telnet_gate(host, TG_RLOGIN);

    This connects fine, but of course it's passing the logged in user's credentials, not the specific ones I want to pass.

    Any ideas appreciated!


    Lab Rat.

    ---
    ■ Synchronet ■ Toxic Laboratory BBS - Birmingham, UK - toxicbbs.com
  • From MCMLXXIX@MDJ to Lab Rat on Friday, March 07, 2014 15:13:15
    Re: Re: New User Script
    By: Lab Rat to Digital Man on Thu Mar 06 2014 13:16:15

    var host="192.168.0.172";
    var name="Bbs Client";
    var pass="password";

    bbs.rlogin_gate(host, name, pass);

    console.writeln("Finished");
    console.pause();

    I don't even get to see the 'Finished' text. If I connect to the system 192.168.0.172 from SyncTERM using RLogin and those same credentials, it connects just fine.

    the fact that you dont see the Finished text suggests that it is doing something. I'd suggest checking the terminal server logs to see whether or not there's an inbound connection as a result of that call. I use bbs.rlogin_gate() in a similar fashion, with similar arguments, and it works for me.

    ---
    ■ Synchronet ■ The BRoKEN BuBBLE (bbs.thebrokenbubble.com)
  • From Digital Man to Lab Rat on Friday, March 07, 2014 15:32:23
    Re: Re: New User Script
    By: Lab Rat to Digital Man on Thu Mar 06 2014 01:16 pm

    Yeah, that would be a better approach. If you're using the current development build (v3.16), then you can pass the username and password
    to the JavaScript bbs.rlogin_gate method (as the 2nd and 3rd arguments). Like this:

    bbs.rlogin_gate(host, name, pass);

    If you use that instead of bbs.telnet_gate() in the remote systems's rlogin.js, that'll allow you to pass whatever name/pass combination you wish via RLogin.

    digital man

    I'm afraid I just cannot get rlogin_gate to do anything. When I run it in JavaScript, absolutely nothing happens:

    load("sbbsdefs.js");

    var host="192.168.0.172";
    var name="Bbs Client";
    var pass="password";

    bbs.rlogin_gate(host, name, pass);

    console.writeln("Finished");
    console.pause();

    I don't even get to see the 'Finished' text. If I connect to the system 192.168.0.172 from SyncTERM using RLogin and those same credentials, it connects just fine.

    If I substitute the rlogin_gate with telnet_gate and use this line:

    bbs.telnet_gate(host, TG_RLOGIN);

    This connects fine, but of course it's passing the logged in user's credentials, not the specific ones I want to pass.

    Any ideas appreciated!

    I tested it and noticed that it was throwing an exception (in a Win32 debug build) due to a variable being used without being initialized. Are you building
    the code yourself? Anyway, I made substatial changes to this over the past 1-2 days and suggest you get the latest development build and use that (or get latest source from CVS) - it's working fine for me.

    You'll need to reverse the order of the 'name' and 'pass' arguments however. RLogin doesn't actually have a 'password' as part of the protocol, but Synchronet does support it if it's in the *first* string passed upon RLogin connection (which correlates with the *first* argument to bbs.rlogin_gate).

    digital man

    Synchronet "Real Fact" #67:
    Robert D. Bouman, the author of SyncEdit, died in the mid to late 1990's. Norco, CA WX: 72.8°F, 39.0% humidity, 7 mph SE wind, 0.00 inches rain/24hrs
  • From Nightfox@DIGDIST to Digital Man on Saturday, March 08, 2014 15:49:44
    Re: Re: New User Script
    By: Digital Man to Bill McGarrity on Tue Feb 18 2014 22:30:58

    There's no script in control at that point.

    For my own knowledge, when New is answered on the Login, what
    generates the questions regarding Alias, Full Name, etc...

    src/sbbs3/newuser.cpp. The strings come from ctrl/text.dat.

    I had the same question as Lab Rat, but for a different reason.. I was thinking of writing a custom new user signup script (so I could have more control over things like screen location, etc. for the new user question prompts) - but it sounds like there's no way to change the new user signup process? I see that login.js simply calls bbs.newuser(), which starts that process..

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion BBS - digitaldistortionbbs.com
  • From Lab Rat@TOXIC to Digital Man on Sunday, March 09, 2014 23:16:54
    Re: Re: New User Script
    By: Digital Man to Lab Rat on Fri Mar 07 2014 15:32:23

    I tested it and noticed that it was throwing an exception (in a Win32 debug build) due to a variable being used without being initialized. Are you build the code yourself? Anyway, I made substatial changes to this over the past 1 days and suggest you get the latest development build and use that (or get latest source from CVS) - it's working fine for me.

    You'll need to reverse the order of the 'name' and 'pass' arguments however. RLogin doesn't actually have a 'password' as part of the protocol, but Synchronet does support it if it's in the *first* string passed upon RLogin connection (which correlates with the *first* argument to bbs.rlogin_gate).

    I'm running in Linux using latest CVS that I compiled. I'll rebuild from scratch (only testing in virtual machines with everything stock until I get
    it right) and see how it goes - just as soon as I've got my night shifts out the way... Thanks for that.

    Lab Rat


    ---
    ■ Synchronet ■ Toxic Laboratory BBS - Birmingham, UK - toxicbbs.com
  • From Lab Rat@TOXIC to MCMLXXIX on Sunday, March 09, 2014 23:18:32
    Re: Re: New User Script
    By: MCMLXXIX to Lab Rat on Fri Mar 07 2014 15:13:15

    the fact that you dont see the Finished text suggests that it is doing something. I'd suggest checking the terminal server logs to see whether or n there's an inbound connection as a result of that call. I use bbs.rlogin_gat in a similar fashion, with similar arguments, and it works for me.

    I was thinking that - was wondering if it was just hanging though. Will play again with DM's modifications and see what I can do then.

    Lab Rat


    ---
    ■ Synchronet ■ Toxic Laboratory BBS - Birmingham, UK - toxicbbs.com
  • From Digital Man to Nightfox on Monday, March 10, 2014 03:29:26
    Re: Re: New User Script
    By: Nightfox to Digital Man on Sat Mar 08 2014 03:49 pm

    Re: Re: New User Script
    By: Digital Man to Bill McGarrity on Tue Feb 18 2014 22:30:58

    There's no script in control at that point.

    For my own knowledge, when New is answered on the Login, what
    generates the questions regarding Alias, Full Name, etc...

    src/sbbs3/newuser.cpp. The strings come from ctrl/text.dat.

    I had the same question as Lab Rat, but for a different reason.. I was thinking of writing a custom new user signup script (so I could have more control over things like screen location, etc. for the new user question prompts) - but it sounds like there's no way to change the new user signup process? I see that login.js simply calls bbs.newuser(), which starts that process..

    Correct. Of course, you could modify login.js to *not* call bbs.newuser() for new user signups, but then you'd have to reproduce everything that the internal
    (newuser.cpp) code does in JavaScript. Not an impossible task (see the web server newuser.ssjs for example), but potentially problematic.

    You can disable many of the new user questions with toggles in SCFG->System->New User Values, or by setting the text.dat strings to blank strings (which eliminates many prompts).

    digital man

    Synchronet "Real Fact" #32:
    The Synchronet web user interface was contributed by Robert Couture, Runemaster.
    Norco, CA WX: 60.9°F, 31.0% humidity, 0 mph ESE wind, 0.00 inches rain/24hrs
  • From Nightfox@DIGDIST to Digital Man on Tuesday, March 11, 2014 06:45:29
    Re: Re: New User Script
    By: Digital Man to Nightfox on Mon Mar 10 2014 03:29:26

    I had the same question as Lab Rat, but for a different reason.. I
    was thinking of writing a custom new user signup script (so I could
    have more control over things like screen location, etc. for the new
    user question prompts) - but it sounds like there's no way to change
    the new user signup process? I see that login.js simply calls
    bbs.newuser(), which starts that process..

    Correct. Of course, you could modify login.js to *not* call
    bbs.newuser() for new user signups, but then you'd have to reproduce everything that the internal (newuser.cpp) code does in JavaScript. Not
    an impossible task (see the web server newuser.ssjs for example), but potentially problematic.

    You can disable many of the new user questions with toggles in SCFG->System->New User Values, or by setting the text.dat strings to
    blank strings (which eliminates many prompts).

    I see, thanks.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion BBS - digitaldistortionbbs.com