I have an exe compiled in delphi, it connects to asocket that reads and recieves data. I would like to know if is possbile to hook the TClientSocket delphi class and use some library like detours to do that.
Asked
Active
Viewed 172 times
0
-
What do you mean by "hook"? FWIW, `TClientSocket` and `TServerSocket` (`ScktComp` in general) is extremely outdated and highly discouraged to use. You should consider switching to a newer library. – Jerry Dodge Aug 26 '15 at 15:50
-
i dont have the source from that exe, i just want to knot what is sending or recieving – Alexxxx Aug 26 '15 at 16:23
-
Maybe use something like [Wireshark](https://en.wikipedia.org/wiki/Wireshark)? – GabrielF Aug 26 '15 at 17:28
-
Detouring involves executing hooking code inside the running process that is to be hooked. `TClientSocket` and `TServerSocket` use the WinSock `send()` and `recv()` functions, which can certainly be detoured. But since you don't have the source of the EXE, you cannot detour its functions, unless you write another app that injects custom code into the running EXE process, or otherwise use an API Monitoring utility that does such hooking. If you just want to monitor the socket data and look at it, a packet sniffer like Wireshark is your best choice. – Remy Lebeau Aug 26 '15 at 19:09
-
do you know what version of WinSock it use? – Alexxxx Aug 26 '15 at 20:30