Tag Archives: C#

BBSLink Client

If you have heard of or came across http://bbslink.net/ and wanted to add the services door games to your BBS but find that they only offer a javascript file for Synchronet BBSes then this might help you out.

I recently joined and not having a Synchronet BBS I had to make my own client to work with their service. It is written in C# against .NET 2.0 and *might* work in mono on Linux. You will have to test.

Local Binary: BBSLink Door Binaries
Local Source: BBSLink Door Source Code

C# DOOR32.SYS BBSLink Client

If you have heard of or came across http://bbslink.net/ and wanted to add the services door games to your BBS but find that they only offer a javascript file for Synchronet BBSes then this might help you out.

I recently joined and not having a Synchronet BBS I had to make my own client to work with their service. As promised I am also releasing the source.

It is written in C# against .NET 2.0 and *might* work in mono on linux. You will have to test.

Local Binary: BBSLink Door Binaries
Local Source: BBSLink Door Source Code

Update: I made a small change to the dropped carrier handling and disconnections. The door should now handle dropped carrier and exit correctly. Let me know if you have issues.

Update: Removed Github links.

Reddit Posts on Archaic Binary BBS

I have been asked on the BBS how I pulled reddit links into the BBS for callers to see. As you might know, I have been using RMLib to make some simple door utilities with C#.

My latest utility pulls some headlines from reddit, as well as showing recent activity on the board.

Here is the code that does this… I don’t want to release the full program source yet, as it has other stuff I need to finish up. Sorry.
Using this though you should be able to get a C# door running with RMLib.


WebClient w = new WebClient();
            string s = w.DownloadString("http://www.reddit.com/r/tech");
            string cleanString = "";
            string cleanURL = "";

            foreach (LinkItem i in LinkFinder.Find(s))
            {
                cleanString = Regex.Replace(i.Text.ToString(), @"[^\u0000-\u007F]", string.Empty);
                cleanURL = Regex.Replace(i.Href.ToString(), @"[^\u0000-\u007F]", string.Empty);
                Door.WriteLn(StringUtils.PadRight(cleanString, ' ', 57) + " | ");
                Door.WriteLn(StringUtils.PadRight(cleanURL, ' ', 57) + " | ");
                Door.WriteLn(StringUtils.PadRight(" ", ' ', 57) + " | ");
            }

---

public struct LinkItem
        {
            public string Href;
            public string Text;

            public override string ToString()
            {
                return Text + Href;
            }
        }

static class LinkFinder
        {
            public static List Find(string file)
            {
                List list = new List();
                int j = 0;

                MatchCollection m1 = Regex.Matches(file, @"(.*?)", RegexOptions.Singleline);

                foreach (Match m in m1)
                {
                    if (j <= 6)
                    {
                        string value = m.Groups[1].Value;
                        LinkItem i = new LinkItem();

                        Match m2 = Regex.Match(value, @"href=\""(.*?)\""", RegexOptions.Singleline);
                        if (m2.Success)
                        {
                            i.Href = m2.Groups[1].Value;

                        }

                        string t = Regex.Replace(value, @"\s*<.*?>\s*", "", RegexOptions.Singleline);
                        i.Text = t;

                        list.Add(i);
                        j++;
                    }
                }

                j = 0;
                return list;
            }
        }

Telnet Server Connection Concentrator/Router

I have been working on getting my multi-node BBS back online using some FOSSIL drivers and telnet instead of dial-up modems.

One large problem is the speed Windows NTVDM (DOS Console) gives to legacy 16-bit applications running inside of it. You can really tell the difference from running a pure DOS 6.22 install with a packet driver and FOSSIL -> Telnet software and running say Windows 2003 server with the software inside a DOS box, especially when drawing full screen ANSI.

So this is what I did, I found the best combination by running two Windows NT 4 Servers (inside ESXi), and then loading TelSrv on each. It’s odd that NT 4 handles DOS virtual machines (NTVDM) better then Windows 2000 and 2003. When the DOS software is setup correctly and tested, the NTVDM rarely used more then 20% spiking and around 3% idle.

Each ESXi virtual machine handles two nodes currently, for a total of four. Now the problem comes up how can I handle connections from the outside, coming into one port (23 Telnet) off the router and then choose which telnet server to redirect it to.

I built this small application in C# that will take in a telnet connection, and then based on the code at the moment, will direct it to a specific server based on some simple rules. Say, first connection and third to server one, and second and fourth to server two.

If you need more information on running it, you can check the source code that is available, as I cannot offer a compiled version. It would be of no use unless you changed the code anyway.

I suppose you could re-route any TCP socket connections using this, I know FTP will not work, as it uses two sockets.

Telnet Concentrator

Automatic Rift Scratch Off

Rift (http://www.riftgame.com) is an MMO that is fairly dynamic. I play every now and then, and I have an Android phone. Trion offers a neat mobile application that allows you to talk to your guild, friends, and play some scratch off games. You get a max total of six game credits, and as you use them they regenerate at the rate of one per hour.

It is a little fun while away from the game, and you get some small loot that gets delivered to your mailbox in game.

Playing around I made a small C# client that plays the games for you. It’s not a way to cheat, because you really cannot. But it will make it so you do not miss out when you hit your max of six points and cannot gain anymore like when you are sleeping.

This program plays whichever game you choose for it to play for you, at the rate of one every ten minutes. If none are available, it will just skip. Trion really has already lowered the rate that you can win at, I have noticed a very large drop in winnings after the last patch. This will help you always use your available points.

This program is really just an example project. It was made as a proof of concept as I am doing some C# web data clients for work. It is a console program and NOT all that easy to use as you will need to know some strings that you can only get from HTTP decoding the streams from your phone.

The strings you need are:

Character ID – This is a large string of numbers that identify your character.

Session ID – This is another string of numbers and letters that you are given AFTER you login with the Android client.

This program really just continues the session your phone created with your login credentials. Trion is using (for Android) the google authentication service with Device IDs so I cannot offer a login form with player name and such. Sorry.

Features include:

Playing any of the three games.
Automatically replaying on a replay win.
Automatically replaying on a replay win of a replay win.

Source code is also available, it’s not a secret. I’m sure this has been done. No it’s not easy. No you cannot cheat with this. Yes it will help you use the points you already have more efficiently. No it will not always win for you.

Program: RiftScratch.exe
Source: RiftScratch.zip