corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » c# Telnet


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author c# Telnet
VrsTurbo
Premium Member

Registered: 8th Jun 10
User status: Offline
13th Jun 12 at 17:32   View Garage View User's Profile U2U Member Reply With Quote

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
13th Jun 12 at 17:41   View User's Profile U2U Member Reply With Quote

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
13th Jun 12 at 17:43   View Garage View User's Profile U2U Member Reply With Quote

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
13th Jun 12 at 17:43   View Garage View User's Profile U2U Member Reply With Quote

but yes its c#.net in a win form
John
Member

Registered: 30th Jun 03
User status: Offline
13th Jun 12 at 20:15   View User's Profile U2U Member Reply With Quote

Batch file to keep it simple?
VrsTurbo
Premium Member

Registered: 8th Jun 10
User status: Offline
13th Jun 12 at 20:38   View Garage View User's Profile U2U Member Reply With Quote

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
13th Jun 12 at 20:40   View User's Profile U2U Member Reply With Quote

Why does this need to be in C# out of interest?
VrsTurbo
Premium Member

Registered: 8th Jun 10
User status: Offline
13th Jun 12 at 20:44   View Garage View User's Profile U2U Member Reply With Quote

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
14th Jun 12 at 08:02   View Garage View User's Profile U2U Member Reply With Quote

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
14th Jun 12 at 08:03   View User's Profile U2U Member Reply With Quote

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
14th Jun 12 at 08:55   View Garage View User's Profile U2U Member Reply With Quote

done it

Used plink and passed the variables from c# works like a charm

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Outlook Error Adam General Chat 18 1651
22nd Dec 03 at 20:46
by Dan B
 
Windows XP trick Jonny P Geek Day 10 324
7th May 06 at 23:12
by robmarriott
 
Networking people (NOT another n00b question!) PhilC Geek Day 9 278
29th Jun 08 at 22:51
by Paul
 
Any Linux Geeks out there who know how to use Aircrack? DaveyLC Geek Day 7 394
20th Jul 09 at 17:25
by willay
 
Cant get into my router? oceansoul Geek Day 18 391
8th Dec 09 at 18:19
by oceansoul
 

Corsa Sport » Message Board » Off Day » Geek Day » c# Telnet 29 database queries in 0.0110879 seconds