I'm having a hard time figuring out the best way to approach this problem. Security is not much of a concern in this particular setup, but performance is.
I have a script that will Telnet to a telecommunications switch and run a series of commands, display the output, and logout of the switch. This is currently written in Perl, uses Net::Telnet, and is ran via CGI in a browser form. I will be rewriting it in Python.
The Problem: There is default username this script uses, but it can only be logged in once. So if 2 or more people are using this script in a web browser, then an error will occur. Also, it takes about 10 seconds for the script to completely run due to the predefined commands that need to be sent.
So the idea that I have is to create a daemon that will connect to the switch via Telnet or SSH > Login > Run a series of predefined commands, then wait for other commands that will come in via the web form.
Is this something you guys would recommend or should I completely rethink the idea? Would it be best to listen to a port? Any good resources on how to create something like this?
Thanks!