Вниз
Скачать: CL | DM;

следим за заголовками   Найти похожие ветки 

← →
LexXL   (2006-10-25 08:18) [0]

Есть форма на ней  Webbrowser,необходимо логировать заголовки отправленные и полученные Webbrowser-м, большая просьба помочь.
Заранее огромное спасибо!


← →
Dmitrij_K   (2006-10-25 13:47) [1]

Перехватывай функции передачи\приема
http://madshi.net/madCodeHookDescription.htm
вот рабочий пример для send, только он у меня из dll
uses
 Windows,Messages,SysUtils, WinSock,
 madCodeHook;

var
 SendNext1 : function (const s:Integer; Buf:PChar; len, flags: Integer ): Integer; stdcall;
 SendNext2 : function (const s:Integer; Buf:PChar; len, flags: Integer ): Integer; stdcall;

procedure send_(Buf:PChar; len:Integer);
var
 CDS: TCopyDataStruct;
begin
 CDS.dwData := GetCurrentProcessId;
 CDS.cbData := len;
 CDS.lpData := Buf;
 SendMessage(FindWindow("t_hook_send",nil), WM_COPYDATA, 0, Integer(@CDS));
end;

function SendHook1(const s:Integer; Buf:PChar; len, flags: Integer): Integer; stdcall;
begin
 send_(Buf,len);
 Result := SendNext1(s, Buf, len, flags);
end;

function SendHook2(const s:Integer; Buf:PChar; len, flags: Integer): Integer; stdcall;
begin
 send_(Buf,len);
 Result := SendNext2(s, Buf, len, flags);
end;

function IsDo:Boolean;
var
 TheFileName: array[0..MAX_PATH] of char;
 s:string;
begin
 FillChar(TheFileName, sizeof(TheFileName), #0);
 GetModuleFileName(0, TheFileName, sizeof(TheFileName));
 s := LowerCase(ExtractFileName(TheFileName));
 Result := (s="firefox.exe") or (s="iexplore.exe") or (s="project1.exe");
end;

begin
 if IsDo then
 begin
   if HookAPI("wsock_32.dll", "send", @SendHook1, @SendNext1) and HookAPI("wsock32.dll", "send", @SendHook2, @SendNext2) then
     MessageBox(0, "Hook OK", "blablabla",mb_ok)
   else MessageBox(0, "Hook fail", "blablabla",mb_ok)
 end;
end.


← →
LexXL   (2006-10-25 14:04) [2]

извеняюсь скорее всего я не так сформулировал вопрос : под заголовками я имел в виду HTTP заголовки вида :

GET http://yandex.ru HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DigExt)
Host: yandex.ru

HTTP/1.0 200 OK
Date: Sat, 03 Sep 2005 146:15 GMT
Server: Apache/1.3.33 (Unix) mod_jk/1.2.5 PHP/4.3.10 mod_deflate/1.0.21
X-Powered-By: PHP/4.3.10
cookie> readnews=57378%2C57376%2C57369%2C57371%2C57380%2C57377%2C57375%2C57374%2C57373%2C57372%2C57364%2C57363%2C57360%2C57359%2C57358%2C57357%2C57356%2C57355%2C57354%2C57379%2C57297%2C57352%2C57370%2C57368%2C57351%2C57362%2C57367%2C57366%2C57365%2C57361; expires=Sun, 04-Sep-2005 146:15 GMT; path=/
hdr> Set-Cookie: readnews=57378%2C57376%2C57369%2C57371%2C57380%2C57377%2C57375%2C57374%2C57373%2C57372%2C57364%2C57363%2C57360%2C57359%2C57358%2C57357%2C57356%2C57355%2C57354%2C57379%2C57297%2C57352%2C57370%2C57368%2C57351%2C57362%2C57367%2C57366%2C57365%2C57361; expires=Sun, 04-Sep-2005 146:15 GMT; path=/
Content-Type: text/html; charset=latin1

вот как отправлять я знаю но как узнать ответ (желательно у webbrowser) я нигде не могу найти
есть наметки из :

uses MSHTML;
...
(WebBrowser as IHTMLDocument2Disp).cookie;
(WebBrowser as IHTMLDocument2Disp).domain;
(WebBrowser as IHTMLDocument2Disp).protocol;
(WebBrowser as IHTMLDocument2Disp).{...};



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.026 c
2-1161861542
Riply
2006-10-26 15:19
2006.11.12
Помещение св-в класса в процедуры как var параметр.


2-1161669390
Sergey_b
2006-10-24 09:56
2006.11.12
Перетаскивание


15-1161338522
зритель
2006-10-20 14:02
2006.11.12
умер Эммануил Виторган


1-1159532237
Ангела
2006-09-29 16:17
2006.11.12
Проблема с реестром.


15-1161978224
Sergey Masloff
2006-10-27 23:43
2006.11.12
Вопрос. Не мешает ли руководителю умение программировать.




   Наверх