LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-22-2012, 10:31 AM   #1
oneindelijk
Member
 
Registered: Oct 2012
Location: Belgium
Distribution: Xubuntu
Posts: 32

Rep: Reputation: Disabled
How to use curl to load a router's backup configuration file


Hi,

For the purpose of testing we need to change a lot of routers to a lot of different settings.
To automate this process, I'm trying to upload the settings files that we've made into the router.
Somebody told me to use curl, but I can't even figure out how to get the string that needs to be sent to the router.
I've tried to get this information with snarf en dsniff, but I don't know how to use these either.
Can someone help, please ?
 
Old 10-22-2012, 12:55 PM   #2
oneindelijk
Member
 
Registered: Oct 2012
Location: Belgium
Distribution: Xubuntu
Posts: 32

Original Poster
Rep: Reputation: Disabled
Hi, I think I found the fields I need to use (in the http header captured with wireshark).
So I constructed teh syntax as follows:
curl --form button=restore --form upload=/home/sam/test.cfg -u admin:password http://192.168.2.103:8080/restore.cgi
curl exits without errors, but the router's configuration is not updated
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
backup cisco configuration via linux without accessing router dudastt Linux - Networking 6 02-07-2012 08:49 AM
[SOLVED] Help me backup a configuration file? LAPIII Linux - Newbie 2 02-11-2011 11:50 AM
[SOLVED] Use curl to load a page every 5 seconds xxdxhxx Linux - Newbie 4 11-30-2009 06:45 PM
backup configuration file for webmin via command line? paul_mat Linux - Networking 1 02-05-2006 01:54 PM
curl configuration problem Harry Seldon Linux - Software 1 12-07-2005 03:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration