VrsTurbo
Premium Member
Registered: 8th Jun 10
User status: Offline
|
How the fudge can i get it to telnet to a server
Example
Telnet 192.168.0.1
Admin
Password
set policy id 8 disable
.................
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
You need to telnet from C#? If it's .NET then there are a few libraries you can use although couldn't you just shell telnet and parse commands to it?
|
VrsTurbo
Premium Member
Registered: 8th Jun 10
User status: Offline
|
Never actually used c# before. Created a couple of buttons to test a ping. But i need it so once i press the button it telnets onto the router and parse's the username/password and the set policy bit
|
VrsTurbo
Premium Member
Registered: 8th Jun 10
User status: Offline
|
but yes its c#.net in a win form
|
John
Member
Registered: 30th Jun 03
User status: Offline
|
Batch file to keep it simple?
|
VrsTurbo
Premium Member
Registered: 8th Jun 10
User status: Offline
|
quote: Originally posted by John
Batch file to keep it simple?
Has to be customer facing so cant really have the user name password in a txt file/batch file
Trying to embed an app i found and use that now!
|
Sam
Moderator Premium Member
Registered: 24th Dec 99
Location: West Midlands
User status: Offline
|
Why does this need to be in C# out of interest?
|
VrsTurbo
Premium Member
Registered: 8th Jun 10
User status: Offline
|
it doesn't need to be but that's what i have installed on the laptop
|
VrsTurbo
Premium Member
Registered: 8th Jun 10
User status: Offline
|
can also be done in ssh. Cant figure out how to add a library to get it to work. Now i know why i never went into programming
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
Have a look at the Net::Telnet library. Alternatively you should be able to set up a TCP socket to interact with the telnet/ssh server; can't say i've ever done it though.
|
VrsTurbo
Premium Member
Registered: 8th Jun 10
User status: Offline
|
done it
Used plink and passed the variables from c# works like a charm
|