Home > Back-end >  Hook the Send Recv for help
Hook the Send Recv for help

Time:11-03

From the Internet to find a Hook the send recv source, but an earlier time, directly using the compiled exe + DLL source code, you can Hook is successful, but not recv information

I now use the Delphi xe 10.3, changed a few variable type hook after success, recv also have, but all gibberish,

Main purpose is to intercept the recv modify the source code in blue, which help transform to realize the great god, few points, first thanked,

Hook the source code download

CodePudding user response:

If the browser, had better be WSA that sets

CodePudding user response:

reference 1/f, wu poor response:
if a browser, it is best to WSA that set of


First extended a warm welcome, in learning Delphi hook, countless times to see forward written big hook around source

Purpose is not intercept browser, is a given application geturl return data, I test target hook procedure was literally written in Delphi idhttp. Get, MyRecv in the source code is as follows:

The function MyRecv (s: TSocket; Var Buf. Len, flags: Integer) : Integer; Stdcall;
Var
DwSize: cardinal;
TMP: String;
The begin
MessageBeep (1000);
WriteProcessMemory (ProcessHandle AddRecv, @ OldProc [1], 8, dwSize);
Result:=OldRecv (S, Buf, len, flags);
JmpCode. Address:=@ MyRecv;
WriteProcessMemory (ProcessHandle, AddRecv, @ JmpCode, 8, dwSize);
Setlength (TMP, len);
Move (buf, TMP [1], len);
Showmessage (TMP);
end;

Can hook to intercept the success, but are stil showmessage out, where is the specific problem
  • Related