Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 7th, 2007, 11:27 AM   #1
trez
Newbie
 
Join Date: Nov 2007
Posts: 1
Rep Power: 0 trez is on a distinguished road
telnet a router with perl?

Hi guys

Im new to to writing scripts, but very keen to learn. My query is this:

i work at an ISP, and our new thomson 546 modems have a bug on them, basically we have to enable the routing of the internet else nothing will work...

now this is solvable by 6 lines of command by telnet:

telnet 10.0.0.138

[Username:] Administrator
[Password:] {No pass, we just press enter}

nat

ifconfig

[intf:] internet
[translation:] enabled
..
config saveall

exit

that is all the commands we need to do ( where in "[ ] " the text is displayed automatically) . now for us technicians, its not a problem to write a few lines, but our clients usually mess about with telnet....

we are already bringing in new modems, however I was trying to develop a fix for this bug. i got a VBscript working in secureCRT, however you need to have that program to make it work....

my question is, any ideas on how I can write a small program to perform these commands? any help is greatly appreciated.

thanks

Andrew
trez is offline   Reply With Quote
Old Dec 1st, 2007, 1:59 PM   #2
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Re: telnet a router with perl?

Yes, it's certainly possible to write such a program using perl...infact perl is probably the best language to use for such a project.

If your interested in going ahead with the fix, i would check out this here perl module.

It will allow you to create a telnet session (using perl) to a port that you tell it and then allow you to execute commands on that remote computer.

As always, CPAN does a good job of the documentation with the perl module, so there are examples and lists all the methods and their options.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Telnet Client PhilBon Visual Basic .NET 4 Aug 31st, 2007 11:07 AM
How does a 'router setup page' work? Duck Other Web Development Languages 2 Mar 1st, 2007 10:07 AM
Why do most shared hosting services offer php not perl? Jonnno Perl 5 May 19th, 2005 3:56 PM
Learning and Programming Perl G.I.Josh Perl 2 Mar 23rd, 2005 1:48 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:26 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC