Re: [Twisted-Python] twisted irc client + packet capturing

2013-11-11 Thread Edmund Wong
Thanks all for your pointers and ways to do this packet capturing. Going to try 'em all, if I can. Edmund ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] twisted irc client + packet capturing

2013-11-08 Thread Phil Mayers
Another option is to run tcpdump as a sub-process writing to stdout, and write a ProcessProtocol to parse the pcap stream. This is not terribly difficult, and can actually have some advantages - if your python process blocks for too long you can lose captured packets, but by letting tcpdump agg

Re: [Twisted-Python] twisted irc client + packet capturing

2013-11-08 Thread Sofiane Akermoun
Hello, 1) create a pcapdevice I use pcapy because it can return a file descriptor of the new pcapdevice created 2) Use abstract.FileDescriptor With absbract.FileDescriptor you can wrap the previvous pcapdevice with its file descriptor into some that twisted can use properly into the reactor. With

Re: [Twisted-Python] twisted irc client + packet capturing

2013-11-08 Thread David Stainton
I got my sniffer to work in Twisted... but then I'm not using pycap : https://github.com/david415/hushVPN/blob/master/nflog_reader.py I use the NetLinkFilter socket via this python cffi: https://github.com/mk-fg/scapy-nflog-capture Anyhow this allows me to control which packets my sniffer picks up

Re: [Twisted-Python] twisted irc client + packet capturing

2013-11-08 Thread exarkun
On 08:50 am, ew...@pw-wspx.org wrote: Hi, I've created a script that would log on to an irc server, while capturing packets. I came across the following link: http://dound.com/2009/09/integrating-twisted-with-a-pcap-based-python- packet-sniffer/ But I'm using pycap (http://pycap.sourceforge

Re: [Twisted-Python] twisted irc client + packet capturing

2013-11-08 Thread bino
> Hi, > > I've created a script that would log on to an irc server, while > capturing packets. > > I came across the following link: > > http://dound.com/2009/09/integrating-twisted-with-a-pcap-based-python-packet-sniffer/ > > But I'm using pycap (http://pycap.sourceforge.net/), but I'm having > so