How to intercept OUTGOING browser data

Discussion in 'ASP .Net' started by _max_, Dec 14, 2003.

  1. _max_

    _max_ Guest

    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?
    _max_, Dec 14, 2003
    #1
    1. Advertising

  2. "_max_" <_max_@_nospam_.com> wrote in message
    news:...
    > 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)"

    > 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?
    >
    Egbert Nierop \(MVP for IIS\), Dec 14, 2003
    #2
    1. Advertising

  3. _max_

    _max_ Guest

    On Sun, 14 Dec 2003 09:21:13 +0100, "Egbert Nierop \(MVP for IIS\)"
    <> wrote:

    >"_max_" <_max_@_nospam_.com> wrote in message
    >news:...
    >> 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)


    >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.
    _max_, Dec 14, 2003
    #3
  4. 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

    "_max_" <_max_@_nospam_.com> wrote in message
    news:...
    > 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?
    >
    Sherif ElMetainy, Dec 14, 2003
    #4
  5. "_max_" <_max_@_nospam_.com> wrote in message
    news:...
    > On Sun, 14 Dec 2003 09:21:13 +0100, "Egbert Nierop \(MVP for IIS\)"
    > <> wrote:
    >
    > >"_max_" <_max_@_nospam_.com> wrote in message
    > >news:...
    > >> 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)

    >
    > >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).
    Egbert Nierop \(MVP for IIS\), Dec 15, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alfred Salton

    Outgoing Page DOM

    Alfred Salton, Jun 25, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    320
    Teemu Keiski
    Jun 25, 2004
  2. gh0st54
    Replies:
    0
    Views:
    354
    gh0st54
    Oct 26, 2004
  3. Simon Pedersen

    Outgoing GPRS while incoming call

    Simon Pedersen, Jun 27, 2005, in forum: Java
    Replies:
    0
    Views:
    441
    Simon Pedersen
    Jun 27, 2005
  4. Joseph Chase

    Monitoring Outgoing Connections?

    Joseph Chase, May 30, 2005, in forum: Python
    Replies:
    1
    Views:
    240
    Peter Hansen
    May 30, 2005
  5. Joe
    Replies:
    1
    Views:
    314
    mlimber
    Jan 15, 2007
Loading...

Share This Page