Re: Telnet to remote system and format output via web page
- Original Message - I would use something like fabric to automatically login to hosts via ssh then parse the data myself to generate static HTML pages in a document root. Having a web app execute remote commands on a server is so wrong in many ways. Such as ? JM -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- https://mail.python.org/mailman/listinfo/python-list
Re: Telnet to remote system and format output via web page
On Fri, Sep 13, 2013 at 10:31 PM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: - Original Message - I would use something like fabric to automatically login to hosts via ssh then parse the data myself to generate static HTML pages in a document root. Having a web app execute remote commands on a server is so wrong in many ways. Such as ? It depends exactly _how_ it's able to execute remote commands. If it can telnet in as a fairly-privileged user and transmit arbitrary strings to be executed, then any compromise of the web server becomes a complete takedown of the back-end server. You're basically circumventing the protection that most web servers employ, that of running in a highly permissions-restricted user. On the other hand, if the execute remote commands part is done by connecting to a shell that executes its own choice of command safely, then you're not forfeiting anything. Suppose you make this the login shell for the user foo@some-computer: #!/bin/sh head -4 /proc/meminfo You can then telnet to that user to find out how much RAM that computer has free. It's telnet, it's executing a command on the remote server... but it's safe. (For something like this, I'd be inclined to run a specific memory usage daemon that takes connections on some higher port, rather than having it look like a shell, but this is a viable demo.) I've done things like this before, though using SSH rather than TELNET. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Telnet to remote system and format output via web page
Hi I would like to create a web app using flask or cgi library along with telnetlib to telnet to specific servers and execute commands and retrieve the output. The output will then be formatted and outputted to a webpage . . Is this the best way of getting info from a remote system to be output to a web page? Is flask over kill for project like this ? Thanks, Kenroy -- https://mail.python.org/mailman/listinfo/python-list
Re: Telnet to remote system and format output via web page
- Original Message - Hi I would like to create a web app using flask or cgi library along with telnetlib to telnet to specific servers and execute commands and retrieve the output. The output will then be formatted and outputted to a webpage . . Is this the best way of getting info from a remote system to be output to a web page? Is flask over kill for project like this ? Thanks, Kenroy -- https://mail.python.org/mailman/listinfo/python-list I never used Flask, but most of python web framework provide an easy/quick way of setting up a web application server. So I'd say Flask is just fine. What concerns me is the telnet protocol you plan to use for remote execution. Do you have any other options ? are you trying to execute on a remote unix like system ? Anyway if you must stick with telnet, I don't see anything wrong in your plan, Flask + telnetlib should do the trick. JM -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- https://mail.python.org/mailman/listinfo/python-list
Re: Telnet to remote system and format output via web page
On 09/11/2013 11:45 AM, Kenroy Bennett wrote: Hi I would like to create a web app using flask or cgi library along with telnetlib to telnet to specific servers and execute commands and retrieve the output. The output will then be formatted and outputted to a webpage . Is security an issue ? How sensitive is the information you are querying ? Must it be Telnet ? -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list
Re: Telnet to remote system and format output via web page
I would use something like fabric to automatically login to hosts via ssh then parse the data myself to generate static HTML pages in a document root. Having a web app execute remote commands on a server is so wrong in many ways. Sent from my iPhone On Sep 11, 2013, at 8:56 AM, Jugurtha Hadjar jugurtha.had...@gmail.com wrote: On 09/11/2013 11:45 AM, Kenroy Bennett wrote: Hi I would like to create a web app using flask or cgi library along with telnetlib to telnet to specific servers and execute commands and retrieve the output. The output will then be formatted and outputted to a webpage . Is security an issue ? How sensitive is the information you are querying ? Must it be Telnet ? -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list