Re: [問題] 如何用linux去控制router的設定檔
※ 引述《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
04/11 16:53, 2F
推
04/11 16:56, , 3F
04/11 16:56, 3F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
LinuxDev 近期熱門文章
PTT數位生活區 即時熱門文章