0
GET/POST를 가로 채려고 시도하고 있습니다. IdHTTPProxyServer에서 가져 와서 IdHTTP로 보내 GET/POST를 복제하고 결국 쿠키를 가져 와서 모든 웹 사이트에 로그인 할 수 있습니다.WebBrowser에 프록시 GET/POST 보내기
어떻게 개선 할 수 있습니까? 이 코드를 실행하려고하면 충돌이 발생합니다.
procedure TForm1.IdHTTPProxyServer1HTTPDocument(
AContext: TIdHTTPProxyServerContext; var VStream: TStream);
begin
if AContext.Command='POST' then begin
EmbeddedWB1.LoadFromString(IdHTTP1.Post(AContext.Target,AContext.Headers.Text)); << CRASH
end;
if AContext.Command='GET' then begin
EmbeddedWB1.LoadFromString(IdHTTP1.Get(AContext.Target)); << CRASH
end;
end;
은 무엇 정확히 충돌? 좀 더 구체적이어야합니다. –
@RemyLebeau IE를 사용하여 웹 사이트에 연결하려고 할 때마다 HTML을 EmbeddedWB로로드하려고 할 때 EmbeddedWB와 충돌합니다. IdHttp에서 반환 된 html은 EmbeddedWB가로드하는 데 실패합니다. :( –
글쎄,'TEmbeddedWB'는 시각적 인 UI 컴포넌트이고, 'TIdHTTPProxyServer'는 멀티 쓰레드 구성 요소이므로 뭔가 관련이있을 수 있습니다. 작업자 스레드 컨텍스트에서 UI 구성 요소에 액세스 할 수 없으며, 기본 UI 스레드의 컨텍스트 만 –