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.
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
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.
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...
Perhaps if you tell us what you want to do, we can help you achieve that.
digital man
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.
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
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.
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!
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 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).
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.
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..
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).
Sysop: | Eric Oulashin |
---|---|
Location: | Beaverton, Oregon, USA |
Users: | 91 |
Nodes: | 16 (0 / 16) |
Uptime: | 07:55:21 |
Calls: | 4,903 |
Calls today: | 4 |
Files: | 8,491 |
Messages: | 350,507 |
Posted today: | 1 |