Re: [問題] 如何用linux去控制router的設定檔

看板LinuxDev作者 (xinu)時間17年前 (2008/03/30 12:37), 編輯推噓3(300)
留言3則, 2人參與, 最新討論串2/2 (看更多)
※ 引述《RiverJackson (JACK)》之銘言: : 一般IP分享器不是都可以做一些設定 然後可以把它Backup 也就是存檔 就是一個 : config檔 假設我現在linux有十份ip分享器的config檔 可能要做十件事情 每件事情 : 用不同的config檔 請問有高手知道怎麼在linux底下把config丟到IP分享器呢 : (也就是做設定) 完全沒頭緒= = 希望有個方向^^ : 這時候電腦是有接一條網路線到分享器上面的~~~~ 用linux上的console run wget 你得先試試用wget跟router連線 先用IE跟router連線 再抓html或javascript出來看 看看他怎麼丟檔案上去的 然後再想辦法用一些url把 config丟上router... 給個方向, 我沒試過 不過我想應該就是下面wget的指令 wget不行的話, 可能要去學怎麼用perl或python了~ --post-data=string --post-file=file Use POST as the method for all HTTP requests and send the specified data in the request body. "--post-data" sends string as data, whereas "--post-file" sends the contents of file. Other than that, they work in exactly the same way. Please be aware that Wget needs to know the size of the POST data in advance. Therefore the argument to "--post-file" must be a regular file; specifying a FIFO or something like /dev/stdin won't work. It's not quite clear how to work around this limitation inherent in HTTP/1.0. Although HTTP/1.1 introduces chunked transfer that doesn't require knowing the request length in advance, a client can't use chunked unless it knows it's talking to an HTTP/1.1 server. And it can't know that until it receives a response, which in turn requires the request to have been completed -- a chicken-and-egg problem. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.73.5.45

03/30 16:51, , 1F
妳真厲害ㄟ 聽的懂我在講什麼 我先去試試看 謝囉^^
03/30 16:51, 1F

04/11 16:53, , 2F
用upnp,如果你的router 有支援用upnp去控制的話。
04/11 16:53, 2F

04/11 16:56, , 3F
如果妳wget這方法,還要去reset router
04/11 16:56, 3F
文章代碼(AID): #17xnZtEx (LinuxDev)
文章代碼(AID): #17xnZtEx (LinuxDev)