Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 451
  • Last Modified:

Telnet

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
tatikor_143
Asked:
tatikor_143
  • 4
  • 4
1 Solution
 
tatikor_143Author Commented:
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
 
tatikor_143Author Commented:
I am not looking for any links and I have a stable telnet code..

I just need an idea to achieve my requirement
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
AxterCommented:
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
 
AxterCommented:
If you need to send a file to your target server, then you should look at the first link I posted.
0
 
tatikor_143Author Commented:
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
 
AxterCommented:
>>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
 
tatikor_143Author Commented:
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
 
AlexNekCommented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now