views:

29

answers:

1

Hi, how can i access to the socket, that is used by web browser. Or how can i get data transfered between web browser and web server.

I need to connect to that socket and modify the data, the web browser sends and recieves. What concrete functions should i use? I studiend the msdn documentation about this, but didnt noticed how do i get the identifier to the browsers socket. So this is my main question. I am using vc++

+1  A: 

I think you first need to gain a clearer understanding of the different layers of IP networking in a Windows OS environment.

Web browsers connect to web servers by creating an HTTP connection, which first requires a TCP connection. Therefore the web browser asks the OS to open a TCP socket to port 80 on the web browser. The OS creates a TCP connection by exchanging IP packets with the webserver.

Now you are wondering about WinSock SPI. This works at the network stack level, i.e. TCP and IP. As a result, you will see all sockets. It is up to you to determine which ones you are interested in. You can't separate them by process trivially. In fact, quite a few sockets will belong to services.

MSalters