How to intercept OUTGOING browser data

M

_max_

HttpWebRequest() allows 'pseudo-browser' simulation to intercept
incoming HTML for 'screen scraping', etc.

But how would you do the opposite: Programmatically find out what a
browser is sending to a website? (Probably via POST)

I'd imagine this is done often, so maybe I'm just missing some
terminology for doing the search. It seems you'd also have to
simulate cookies to do this right. Is code available?
 
E

Egbert Nierop \(MVP for IIS\)

_max_ said:
HttpWebRequest() allows 'pseudo-browser' simulation to intercept
incoming HTML for 'screen scraping', etc.

But how would you do the opposite: Programmatically find out what a
browser is sending to a website? (Probably via POST)
Hi,

If you are 'the webserver' you don't use a HttWebRequest object unless *you*
write the webserver software totally yourselves.

In the ASP.NET environment, you'd use
Request.Headers["User-Agent"]
which would return for instance "Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)"
 
M

_max_

If you are 'the webserver' you don't use a HttWebRequest object unless *you*
write the webserver software totally yourselves.

In the ASP.NET environment, you'd use
Request.Headers["User-Agent"]
which would return for instance "Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)"

Thanks for your reply.

No, I'm not the webserver in this case. I'd like to monitor exactly
what's going on when clicking buttons on a website. If I could
intercept the stream going back from the browser when buttons are
clicked.

I turned up a post where someone referred to this as a 'sniffer', but
that's all I've found.
 
S

Sherif ElMetainy

Hello

Check this url, it is a software that provides your needs.
http://www.pocketsoap.com/tcptrace/

In case you want to implement it yourself, what it simply does is listen to
a TCP port, The browser sends data to it, and sends everything it receives
to the server, and sends everything it receives from the server to the
browser. So it sits between the browser and the server and logs all the
communication.

Best regards
Sherif
 
E

Egbert Nierop \(MVP for IIS\)

_max_ said:
If you are 'the webserver' you don't use a HttWebRequest object unless *you*
write the webserver software totally yourselves.

In the ASP.NET environment, you'd use
Request.Headers["User-Agent"]
which would return for instance "Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)"

Thanks for your reply.

No, I'm not the webserver in this case. I'd like to monitor exactly
what's going on when clicking buttons on a website. If I could
intercept the stream going back from the browser when buttons are
clicked.
I turned up a post where someone referred to this as a 'sniffer', but
that's all I've found.
In addition, you can setup a debug session using Visual Studio that can
connect your server app (that must be compiled in debug mode) and to your
client code as well.
But maybe, you expect too much automagically things happen, the answer is
no, you really need that sniffer or a debug session. The sniffer is a lot
easier to deploy than a good debug session (that gives the info you need).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top