A
amwfhv
Unregistered / Unconfirmed
GUEST, unregistred user!
1.<br>lpfn_CONNECT = function ( const s: TSocket; const name: PSockAddr; const namelen: Integer): Integer; stdcall;<br> lpfn_WSACONNECT = function ( const s : TSocket; const name : PSockAddr; const namelen : Integer; lpCallerData,lpCalleeData : LPWSABUF; lpSQOS,lpGQOS : LPQOS ) : Integer; stdcall;<br>var<br> DLLData: PData;<br> MainHwnd:THandle;<br><br> Oldconect:lpfn_CONNECT;<br> OldWSAConnect: lpfn_WSACONNECT; //原来的API地址<br> JmpCodeCONNECT: TJmpCodeCONNECT;<br> JmpCodeWSACONNECT: TJmpCodeWSACONNECT;<br> OldProcCONNECT:TJmpCodeCONNECT;<br> OldProcWSACONNECT:TJmpCodeWSACONNECT;<br> Addconect, AddWSAConnect: pointer; //API地址<br>// TmpJmp: TJmpCode;<br> ProcessHandle: THandle;<br>//conect函数的HOOK<br>function Myconect( const s: TSocket; const name: PSockAddr; const namelen: Integer): Integer; stdcall;<br>var<br> dwSize: cardinal;<br> port:word;<br>begin<br> WriteProcessMemory(ProcessHandle, Addconect, @OldProcCONNECT, 8, dwSize);<br> //showmessage(inttostr(mainhwnd));<br> port:=ntohs(name^.sin_port);<br> if (port<>80) and (port<>7000) and (port<>7100) then<br> begin<br> sendmessage(mainhwnd,Wm_NeedConnect,name^.sin_port,name^.sin_addr.S_addr);//发送消息,并等待消息执行结果<br> name^.sin_addr.S_addr:=inet_Addr('127.0.0.1');<br> end;<br> Result := Oldconect(S, name,namelen);<br> //MessageBeep(1000);<br> JmpCodeCONNECT.Address := @Myconect;<br> WriteProcessMemory(ProcessHandle, Addconect, @JmpCodeCONNECT, 8, dwSize);<br>end;<br>请问<br>lpfn_CONNECT = function ( const s: TSocket; const name: PSockAddr; const namelen: Integer): Integer; stdcall;<br> lpfn_WSACONNECT = function ( const s : TSocket; const name : PSockAddr; const namelen : Integer; lpCallerData,lpCalleeData : LPWSABUF; lpSQOS,lpGQOS : LPQOS ) : Integer; stdcall;<br>这几句是什么意思啊第一次见到这种语句<br><br>2.WriteProcessMemoryAPI函数的作用用法