On 2005-02-02, Dana Marcusanu <[EMAIL PROTECTED]> wrote:
> Yes. I want to write a very small web sniffer that gets data
> from a specified port.
OK, know we know what you're actually trying to do. You should
have told us that to start with rather than leading us down the
wrong path with your lit
On 2005-02-02, Dana Marcusanu <[EMAIL PROTECTED]> wrote:
> Yes. It hangs at accept. I always end up doing end task
> because it never passes the "accept" statement.
And you're sure that somebody tries to initiate a connection
after your program has gotten to the accept() line?
> When I set the
>>> I am trying to use Python to get the data received at a
>>> specific port (in use) on my computer. I already tried below
>>> code which seems to hang at the statement accepting
>>> connections.
>
> Yes. It hangs at accept. I always end up doing end task
> because it never passes the "accept"
Yes. I want to write a very small web sniffer that gets data from a
specified port. I already looked at some of the existing ones on Internet,
but they are not in Python (I am trying to learn Python!) and they have a
lot more features that I want. Thanks for your suggestion. I will check
out pcap l
Yes. It hangs at accept. I always end up doing end task because it never
passes the "accept" statement. When I set the port I use netstat (netstat
-bn) to get the ports that are in use. I use PythonWin 2.4. I am still
puzzled about the fact that it runs fine for you.
You are right about using the w
--- Tony Meyer <[EMAIL PROTECTED]> wrote:
> > I am trying to use Python to get the data received at a
> > specific port (in use) on my computer. I already tried below
> > code which seems to hang at the statement accepting
> > connections.
>
> Seems to hang, or does hang? Using print statemen
On 2005-02-01, Dana Marcusanu <[EMAIL PROTECTED]> wrote:
> I am trying to use Python to get the data received at a specific port (in
> use) on my computer.
What do you mean "in use"? You mean you want to evesdropt on
data that's being sent to an existing connection? If so,
you'll need to use som
> I am trying to use Python to get the data received at a
> specific port (in use) on my computer. I already tried below
> code which seems to hang at the statement accepting
> connections.
Seems to hang, or does hang? Using print statements will tell you whether
that's where it's getting stuck
Hi to all,
I am trying to use Python to get the data received at a specific port (in
use) on my computer. I already tried below code which seems to hang at the
statement accepting connections. I don't know what else I can try. Any
suggestions will be welcome.
import socket, select, os
PORT = 200