473,395 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Batch file to read information from a router's config file

Hi,
I am an intern and I am tasked with writing a batch file to get information from a router's config file then store it in a database on a server. I do not have any idea of how to do this and so far have found nothing which sheds any light.

Can someone please tell me if this is possible and point me in the right direction.

Thanks in advance
Jun 24 '07 #1
15 6705
pbmods
5,821 Expert 4TB
Heya, justintaitt. Welcome to TSDN!

I'm going to go ahead and move this to the Windows forum, where you'll receive more relevant exposure.
Jun 24 '07 #2
epots9
1,351 Expert 1GB
it might have to done manually cuz when i tried backuping up my router's (linksys) config, its stores it in a CFG format which is no problem....but it encrypts so when u open it its all garbage.

but every router could be different, so see what happens when u backup.
i'm thinking the only way is to change the firmware but i doubt the company who made your router would give u the source to modify.

good luck
Jun 24 '07 #3
Hi
Doing it manually is not an option since that was what sparked the problem in the beginning. However now I am looking at some other alternatives.

Thanks
Jun 24 '07 #4
pbmods
5,821 Expert 4TB
Heya, justintaitt.

What is the router's brand/model?
Jun 24 '07 #5
I am not sure. I was just given an overview and told to check it out. I'll find out and get to you all though.

So far I was thinking about using winscp to copy the config file to the local pc then work from there.
Jun 25 '07 #6
Hi everyone,
It is a Cisco router.
Jun 27 '07 #7
epots9
1,351 Expert 1GB
Hi everyone,
It is a Cisco router.
if u save a backup of the config on to your, can u view it or is it encrypted?
Jun 27 '07 #8
Hi,
I am not sure if it is encrypted or not. As I said before I have not yet been given the project officially so I do not have much info.
Could you still give me your suggestion anyway?

Thanks
Jun 29 '07 #9
pbmods
5,821 Expert 4TB
Heya, justintaitt.

Where is the file located?

Can you FTP into that computer/server? Can you SSH?
Jun 29 '07 #10
epots9
1,351 Expert 1GB
well if it isn't encrypted then u just create a program that will read the file line by line and send the data to the database.
Jun 29 '07 #11
I can SSH to the router using PuTTY
Jun 29 '07 #12
pbmods
5,821 Expert 4TB
Heya, justintaitt.

I can SSH to the router using PuTTY
Excellent. Check out PHP's SSH Functions.
Jun 29 '07 #13
Ok
I will check out that site and pass it on to the other intern.

Thanks alot
Jul 2 '07 #14
ghostdog74
511 Expert 256MB
what other tools can you use to parse the file, assuming its readable, besides DOS batch ? Parsing files in DOS is tedious and error prone IMO. you might as well go with other tools good for parsing files, like Python/Perl/Vbscript/awk/sed...etc... they make your job easier.
Jul 3 '07 #15
Hi,
To be completely honest I have no idea. This is the first time I have ever done anything like this and I am still trying to find the best (easiest & most efficient) way to get it done. The thing is that I will probably hand over what I have found to the other intern since I am still working on my original prject.

After all that, even if I have to hand it over I would still like to know how it is done just for the sake of knowing.
Jul 3 '07 #16

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mustaq | last post by:
Hi, How to read same config file from different application? I have 4 application in VB.NET, all are using different app.config files. NOW I need all to read only one config file, how can I do...
6
by: Rich | last post by:
Hello, I picked up this example on using the Reflection namespace for loading forms/classes on the fly at msdn http://msdn.microsoft.com/library/default.asp?...
1
by: Antonio | last post by:
Hello, in my web.config file I have <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="a" value="aaa" /> <add key="b" value="bbb" /> </appSettings> <system.web>...
4
by: PeterW | last post by:
I have a Windows service that needs to get some values from a config file. I place the config file for the service in the System32 directory. I do not get the values using the usual...
8
by: aabdis | last post by:
Hello All.... I have a question... i have two Windows apps (one UI, and one service) which use a common DLL that hands out database results and such to the two apps. The DLL always connects to...
0
by: Eric | last post by:
I inherited some code that uses the settings designer to manage some app settings. One of the settings is a connection string that has a DefaultSettingValueAttribute with hard coded text for a...
1
by: M Irfan | last post by:
Hello all, Recently I have started working in .NET 2.0. I am developing a web service application that references a DLL component written in C# 2.0. The component has its own config file which...
5
by: mmcd79 | last post by:
I built a VB.net application that makes use of a machine level DB connection string setting, and a user level starting location setting. The machine level setting and the default user based...
1
by: Luyolo | last post by:
Good day developers.. I need help peeps on my project and I'll appreciate if i can get it imediately. My application reads from a comma separated file(CSV) and write to the SQL database. Now I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.