![]() |
Re: MSSP (Mud Server Status Protocol)
The thing is, you are reading into a static buffer and I don't use a static buffer. I will install this feature, but I have a feeling it will cause crashes when someone overtly spams a connection with > MAX_INPUT_LENGTH characters, possibly causing memory corruption or a crash.
Is there an easy way to modify this so that it doesn't use a static buffer? EDIT: The following code was used: The result was I could not press <enter> after a hotboot, but the other characters made it through. Upon reboot, it would crash the mud upon connection. Try it now, the above should translate the telopts, but it should be discarding any resulting buffer since it is running parallel (sort of) to the main networking. UPDATE: Spoke too soon, it's causing crashes. I'm trying to figure out why, but I'm inside translate_telopts() at this point. I don't see anything, so I'm left to wonder what exactly I should do next. I've tried this several ways. |
Re: MSSP (Mud Server Status Protocol)
Remove the stripping of \\r in telopt.c and see if that makes a difference, it's the lines:
Just remove the entire thing. Try the following after that: |
Re: MSSP (Mud Server Status Protocol)
This results with an immediate crash upon connection.
|
Re: MSSP (Mud Server Status Protocol)
Odd, I'm at a loss.
|
Re: MSSP (Mud Server Status Protocol)
You're using calloc instead of malloc, right?
Calloc automatically zeroes the memory, otherwise odd things might happen. Regardless, I added a non telnet version to the MSSP specification which should be easier to implement. MSSP Plaintext Since it's not feasible for every mud to implement telopt negotiations a plaintext alternative is available. Whenever a new connection enters the command: MSSP-REQUEST a Mud supporting MSSP Plaintext should send the following: \r\nMSSP-REPLY-START\r\nvariable\tvalue\r\nvariable\tvalue\r\nMSS P-REPLY-END\r\n If a variable has multiple values you can use multiple tabs: \r\nMSSP-REPLY-START\r\nvariable\tvalue\tvalue\r\nMSSP-REPLY-END\r\n |
Re: MSSP (Mud Server Status Protocol)
I use malloc() Maybe you could write a little piece of code that checks for the request in a string and a variant of the MSSP send routine that maps to mud_data, so I can install that. I manually assign or use memset() to init variables to 0. |
Re: MSSP (Mud Server Status Protocol)
You'd want to set everything to NULL, notably d->mccp and d->teltop. Also make sure that d->terminal_type is handled correctly.
What you can do as well is to disable negotiating anything but MSSP in tables.c just in case the crash is in one of the other negotiations. |
Re: MSSP (Mud Server Status Protocol)
I'll try this and let you know. I don't think I'm setting those variables to anything right now.
What do you mean by "disable negotiating anything but MSSP"? |
Re: MSSP (Mud Server Status Protocol)
The announce_support function looks through the telnet table in tables.c for entries that are flagged to send a WILL or DO request, setting the flag to 0 will disable the auto announce.
|
Re: MSSP (Mud Server Status Protocol)
I tried it by reverting to using translate_telopts() after setting the pointers to NULL and it kicked in my sigsegv monitor, reporting this through the telnet port when I connected:
|
Re: MSSP (Mud Server Status Protocol)
Might be the RESTRING macro call on d->terminal_type while it's NULL. Not sure what you're doing, but if you use it "as is" you'd want to use: d->terminal_type = strdup("");
Should be more obvious if you execute: telnet set options open nimud.divineright.org 5333 |
Re: MSSP (Mud Server Status Protocol)
While using gdb it hung in select() instead of crashing.
|
Re: MSSP (Mud Server Status Protocol)
This was already done as d->terminal_type = &str_empty[0];
|
Re: MSSP (Mud Server Status Protocol)
You should use d->terminal_type = strdup(""); if you're gonna use the macro provided with mth.
|
Re: MSSP (Mud Server Status Protocol)
This fixed the problem, and I am now using translate_telopts with no wierdness. Undefined Behavior beware.
So, please try connecting us to your network. Once connected I will release NiMUD with an announcement at the top of the README about contacting you should someone want to start a NiMUD and join your network. The specific copy of NiMUD I run is at nimud.divineright.org 5333, but others may join your network someday. Tintin was the first client I ever used, but I later switched to TinyFugue. Now I just use PuTTy. It would be interesting to see a "lite" version written for use with the standard telnet port instead of stdin, that was easily added to existing MUDs -- one with the ability only to connect with multiple sessions to a default mud address -- as a proxy service. That way MUD admins could set up Tintin on their primary port, with some default settings to auto connect to the MUD, plus the ability to allow players to manage multiple sessions with Tintin on MUDs (like mine) that allow multiplaying. You know .. it could activate when another client isn't detected, otherwise merely forwarding to the port like tcpxd. Regards, Locke |
Re: MSSP (Mud Server Status Protocol)
It's not working as of yet, I get:
RCVD IAC 0 0 NiM5 Build 12773 <the greeting screen> What is thy name? RCVD IAC IAC RCVD IAC SE 253 ÿú RCVD IAC IAC RCVD IAC SE 32 ÿúFNAMEThe Isles: Lands of KltaraPLAYERS62UPTIME24CODEBASENiMUDCONTACT<etc> Looks like it tries to send out the actual MSSP data, but it gets mangled somewhere. The debug output in tintin is supposed to look something like the following: |
Re: MSSP (Mud Server Status Protocol)
There's that wierd character combination, ÿú !!! I have no idea but I will switch to your write_to_descriptor and see if that helps.
Are you related to 121.149.104.1 ? This bot seems to be repeatedly connecting, maybe it's your crawler? |
Re: MSSP (Mud Server Status Protocol)
I have done this. Please retry.
|
Re: MSSP (Mud Server Status Protocol)
That's a korean IP, not sure who it is.
MSSP is still not working, nor is the mud announcing MSSP support. I suggest you use tintin++ for debugging it with the following line to connect: #config debug on;#ses x nimud.divineright.org 5333 If MSSP works you'll automatically get a formatted display of MSSP variables and values as I pasted earlier on. |
Re: MSSP (Mud Server Status Protocol)
Scandum,
Yet it still does not work. Why? |
All times are GMT -4. The time now is 09:49 AM. |
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022