Solved

Telnet

Posted on 2007-04-11
9
412 Views
Last Modified: 2010-04-01
I am a telnet client,I want to send some commands to the server from my code and get the information out of it and send this information to some other application...This sequence will continue in  a while loop.

while(1)
{
 enter into pdt shell from code instead of typing it manually as CTRL+pdt.
send the command and get the information...
Wait for 30 seconds of time to send the command again  and in mean while
enter into vxshell ..
send the command and get the information and again wait here for 30 seconds to send the command again
Again enter into pdt mode...
Repeat the cycle..
}

Hope I explained the requirement clearly...
Any idea on how to do this? Just an idea...

My code is in Visual Studio 2005.


 
0
Comment
Question by:tatikor_143
  • 4
  • 4
9 Comments
 

Author Comment

by:tatikor_143
ID: 18890738
Just want to add a point ...

To enter into pdt shell manually hold the control key and enter pdt..
HOw to achieve the same from code...
0
 
LVL 30

Expert Comment

by:Axter
ID: 18891398
0
 

Author Comment

by:tatikor_143
ID: 18891523
I am not looking for any links and I have a stable telnet code..

I just need an idea to achieve my requirement
0
 
LVL 30

Expert Comment

by:Axter
ID: 18891635
I'm sorry, but your question is not clear.

What exactly are you having problems with implementing?

Please post your stable telnet code, and ask a specific question related to it.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 30

Expert Comment

by:Axter
ID: 18891642
If you need to send a file to your target server, then you should look at the first link I posted.
0
 

Author Comment

by:tatikor_143
ID: 18891867
Just a simple question...

Enter key sequence - " \r\n"
Control sequence  - ?
To enter into pdt shell manullay ,I do CNTRL+pdt..
To enter from the code,How ?
0
 
LVL 30

Expert Comment

by:Axter
ID: 18891925
>>To enter from the code,How ?

I'm not sure how you can do it from the code, but you should be able to set this up as your default shell using .cshrc file.
0
 

Author Comment

by:tatikor_143
ID: 18891967
I am able to do it from the code but my question is How to enter the control sequence?

To emulate the enter key we can send -- "\r\n"
What is the same for the CNTRL key ????
0
 
LVL 16

Accepted Solution

by:
AlexNek earned 500 total points
ID: 18894263
I think you already have the answer from other thread. Just to summary.
You can use any code as symbol  /Not correct for Unicode/ for this yoou only need to write the code after backslash '\21'. You can use octal, decimal or hexidecimal scale of notation.
Some usefull codes have the equvalent symbol
\t = '\9', \r= \13, \n = '\10', \f = ' \12' , \a = '\7', '\b' = '\8'.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now