Witam..
Od paru godzin probuje napisac program ktory bedzie restartowal ruter..
Problem mianowicie na samym poczatku przy logowaniu niby proste.. ale cos nie idzie. probowalem IdHttp
i IdIEEHtpp
To co oczekuje ruter :
<body onload="init()">
<form method="POST" action="../cgi-bin/webcm" name="formLogin">
<input type="hidden" name="getpage" value="../html/frame.htm">
<input type="hidden" name="login:command/username" value="Admin" >
<input type="hidden" name="login:command/password" value="Admin" >
</form>
i moje :
procedure TForm1.Button6Click(Sender: TObject);
var
Params,F : TStringList;
begin
Params := TStringList.Create;
{ Params.Values['getpage'] :='../html/frame.htm';
Params.Values['login:command/username'] :='Admin';
Params.Values['login:command/password'] :='Admin'; }
{
IdHTTP1.Request.Username:='Admin';
IdHTTP1.Request.Password:='Admin'; }
F.Text:= IdHTTP1.POST('http://192.168.1.1/cgi-bin/webcm',Params);
AdvMemo1.Lines.Text:=F.Text;
WriteText(WebBrowser,AdvMemo1.Lines.Text);
end;
powiem ze probowalem.. wszystkiego..
Zrzut ze sniffa.. z FF
<image src="http://i49.tinypic.com/lzh5j.jpg">
Dostaje ciagle :
- invalid argument
- Auth. error 401
- getcgivars(): No Content-Length was sent with the POST request.
cuda niewidy..
</image>