LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-29-2008, 02:20 AM   #1
Hailey's_Comet
Member
 
Registered: Jul 2005
Location: USA
Distribution: PCLinuxOS
Posts: 36

Rep: Reputation: 18
Post interactive telnet/netcat script help


I am wondering if it is possible to write an interactive script to run telnet or nc. I want to write a graphical front end with menus (default selections and such) for point and click... a telnet server is on the other end.

The issue I have is that the connection can't be broken once started. I can't have a program flow like this:

Code:
first:
 (item 1 selected)
   telnet << item1script
   (connection broken)
then:
 (item 3 selected)
   telnet << item3script
   (connection broken)
The script has to flow like this:

Code:
start_telnet
 (item 1 selected)
   send_command_1
   receive_data
   display_data
 (item 4 selected)
   send_command_4
   receive_data
   display_data
 (item 1 selected)
   send_command_1
   receive_data
   display_data
 (quit selected)
   connection_broken_and_quit
Is this at all possible? Maybe someone already has this capability written? I have been on google for hours... Any help would be appreciated, thanks in advance.

Last edited by Hailey's_Comet; 12-30-2008 at 12:50 AM.
 
Old 12-29-2008, 02:58 AM   #2
Hailey's_Comet
Member
 
Registered: Jul 2005
Location: USA
Distribution: PCLinuxOS
Posts: 36

Original Poster
Rep: Reputation: 18
BTW: the interaction has to be dynamic, as the next choice is determined by the return data. I am using this to control the target host in an unusual way, and the menued script allows for far less typing on my part - also, it will allow others to have the same setup without difficulty.

Last edited by Hailey's_Comet; 12-30-2008 at 12:43 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to automate SMTP emails using netcat (not telnet) beeblequix Linux - Software 1 12-23-2008 10:30 AM
BASH - How to open an interactive script from a non interactive script..... OldGaf Programming 4 06-29-2008 04:34 PM
Please help with interactive script moosedaddy Linux - Newbie 3 12-08-2005 09:02 PM
Using Netcat through shell script zael Programming 1 05-22-2004 10:31 AM
netcat shell script didi Programming 3 03-17-2004 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration