LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-31-2017, 03:08 PM   #1
intmail01
Member
 
Registered: May 2013
Posts: 91

Rep: Reputation: Disabled
Changing web based configuration to command line by using curl


Hi,

I am using several router where the only way to set configurations is by a web based access.

There are some fields to fill and button to press and i want to replace it with command line.
I think to use command line instead of web and think to use curl program.

I am not http/html specialist and want to know if it is possible.
Please help me how to proceed.

Thanks
 
Old 07-31-2017, 10:44 PM   #2
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 668

Rep: Reputation: 190Reputation: 190
Could you add a little more information specifically about your hardware setup? Are you trying to control the router settings from the command line? If your device(s) support this, it should be in the device manual. As modem/router softwares are specific to manufacturer/device, it would be difficult to list all possibilities of how you might accomplish this
 
Old 08-01-2017, 04:41 AM   #3
intmail01
Member
 
Registered: May 2013
Posts: 91

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TheEzekielProject View Post
Could you add a little more information specifically about your hardware setup? Are you trying to control the router settings from the command line? If your device(s) support this, it should be in the device manual. As modem/router softwares are specific to manufacturer/device, it would be difficult to list all possibilities of how you might accomplish this
There is no way to use a command line on this kind of hardware this is reason I want to hack it with curl or any command line program available.
 
Old 08-01-2017, 02:06 PM   #4
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 668

Rep: Reputation: 190Reputation: 190
Your question and goal are still unclear. Have a look at how to ask a question https://www.linuxquestions.org/linux...Ask_a_Question and edit your post with more information. As of right now, there is too little information to help you
 
Old 08-01-2017, 02:22 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
this seems similar to site scraping in a kodi add-on.
something like this mite work but youd have to hack out what the (i assume) php variables are:
Code:
wget --user=schneidz --password=hello-world --post-data "user_id=intmail01&password=hello-world&host=linuxquestions&path=linux-software&action=button-ok" "http://www.linuxquestions.org"
...

Last edited by schneidz; 08-01-2017 at 02:23 PM.
 
Old 08-01-2017, 02:27 PM   #6
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 668

Rep: Reputation: 190Reputation: 190
Quote:
Originally Posted by intmail01 View Post
There is no way to use a command line on this kind of hardware this is reason I want to hack it with curl or any command line program available.
If there is "no way to use a command line" then you certainly wouldn't be able to use command line tools. Your question seems to contradict itself
 
Old 08-01-2017, 02:40 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,462

Rep: Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828
The OP wants to use the command line to configure a router instead of using a web browser. The short answer to your question without knowing anything about the hardware/software is most likely yes.

The first step is to read the documentation.

https://curl.haxx.se/
https://frank.itlab.us/IT/TheArtOfHttpScripting.txt

I also think the OP was stating that by no command line using telnet or ssh is not possible.

Last edited by michaelk; 08-01-2017 at 02:42 PM.
 
Old 08-01-2017, 02:53 PM   #8
intmail01
Member
 
Registered: May 2013
Posts: 91

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
The OP wants to use the command line to configure a router instead of using a web browser. The short answer to your question without knowing anything about the hardware/software is most likely yes.

The first step is to read the documentation.

https://curl.haxx.se/
https://frank.itlab.us/IT/TheArtOfHttpScripting.txt

I also think the OP was stating that by no command line using telnet or ssh is not possible.
It is a cheap usb stick wifi router with a builtin lite http server to set configurations.
Your second link is interesting.
 
Old 08-01-2017, 02:58 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,462

Rep: Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828Reputation: 5828
Quote:
usb stick wifi router
Does not really help...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: curl - Command Line Download Manager Examples LXer Syndicated Linux News 0 10-23-2016 12:18 PM
LXer: Best Text based (Command Line) Web Browsers for Linux LXer Syndicated Linux News 0 07-19-2016 05:52 PM
twitter via command line (curl) and Oauth genderbender Programming 8 06-30-2012 06:37 AM
How 2 change command line based SUSE LINUX enterprise Server to GNOME or KDE based? royxiao Linux - Newbie 1 09-06-2009 09:50 PM
using cURL from the command line lauram93 Linux - Software 4 06-05-2009 02:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:47 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