0

I have this code:

<a href="telnet://localhost:33330">
<button>MUD</button>
</a>
<a href="telnet://localhost:24">
<button>Renegade BBS</button>
</a>
<a href="telnet://localhost:26">
<button>Daydream BBS</button>
</a>
<a href="telnet://localhost:28">
<button>Impulse BBS</button>
</a>
<a href="telnet://localhost:30">
<button>Iniquity BBS</button>
</a>

It works fine and everything. However, i'm trying to execute a script before the telnet connections occur.

I'd like it to do something like this:

<a href="mud.sh">
<button>MUD</button>
</a>

Where mud.sh contains this:

/usr/bin/cp4372 <a ref=telnet://localhost:33330">

Is this possible?

Thank you

5
  • Do you want to execute a script on the server (eg to open a port through the firewall) or on the client? Commented Sep 5, 2023 at 17:56
  • Whichever telnet is connecting from. I go to my web site with the HTML on it, and click one of the buttons, and it executes the telnet command. Excuse my ignorance, but i'm not sure if it's ran from the server or the client. Commented Sep 5, 2023 at 18:12
  • From which system are you visiting the page and then running telnet? Try to be as specific as possible. That should go into the question. Commented Sep 5, 2023 at 18:57
  • I'm visiting the remote site from my system.. I'm visiting it, and also localhost for testing. Thank you for the help. It's greatly appreciated. Commented Sep 5, 2023 at 19:01
  • Please edit your question to add requested information or clarification. Don't use comments for this purpose. Add an example what exactly the script is supposed to do. With links like telnet://localhost:1234, the connection will be to the local system (= localhost) where the browser is running, not to the remote system. Is this what you want to achieve? Commented Sep 6, 2023 at 16:20

1 Answer 1

0

You could associate the telnet: scheme to your script (instead of the telnet client).

And then, at the end of your script, run the telnet client using the parameter sent to your script.

You could also write what you want to run inside of the .telnetrc file if your client supports it.

1
  • It appears my telnet client doesn't support ~/.telnetrc. :( Commented Sep 5, 2023 at 18:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.