![]() |
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? :icon_neutral:any help is greatly appreciated. thanks Andrew |
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. |
| All times are GMT -5. The time now is 3:34 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC