regit / pynetfilter_conntrack Goto Github PK
View Code? Open in Web Editor NEWPython binding of libnetfilter_conntrack
License: GNU General Public License v2.0
Python binding of libnetfilter_conntrack
License: GNU General Public License v2.0
Hi,
I have cloned your project and want to use it. However, I'm stuck in using Filter.
For example, in case I want to get the result like: "conntrack -L -p tcp -s 127.0.0.1", how can I use your library?
pynetfilter_conntrack can be installed with pip3.
$ sudo pip3 install pynetfilter_conntrack
Collecting pynetfilter_conntrack
Installing collected packages: pynetfilter-conntrack
Successfully installed pynetfilter-conntrack-0.7
$
The installed files are identical to what comes from pip (python 2) though:
$ DIR2="/usr/local/lib/python2.7/dist-packages/pynetfilter_conntrack"
$ DIR3="/usr/local/lib/python3.5/dist-packages/pynetfilter_conntrack"
$ find "${DIR2}" -name \*.py -printf "%f\n" | while read -r FILE; do diff -u "${DIR2}/${FILE}" "${DIR3}/${FILE}"; done
$
The code is not valid python3:
$ python3 -c 'import pynetfilter_conntrack'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/pynetfilter_conntrack/__init__.py", line 2, in <module>
from pynetfilter_conntrack.tools import *
File "/usr/local/lib/python3.5/dist-packages/pynetfilter_conntrack/tools.py", line 38
shift = 0L
^
SyntaxError: invalid syntax
$
The code should either be forward-ported or be removed from pip3.
As described in the subject, contrack.catch() segfaults with libnetfilter_conntrack 1.0.5 and version 0.6 of the egg. It occurs with the provided example events.py and conntrack.py, too.
setup.py
points to the missing README
(after the renaming it into the README.rst
).nfct_conntrack_compare
sysmbol.maximum recursion depth exceeded
.The following files are missing in the PyPi 0.6 tarball:
Traceback (most recent call last):
File "setup.py", line 19, in <module>
LONG_DESCRIPTION = open("README.rst").read() + open("INSTALL").read() + open("ChangeLog").read()
IOError: [Errno 2] No such file or directory: 'README.rst
I experience a segfault with pynetfilter_conntrack, reproducible with:
$ python -c "import pynetfilter_conntrack; pynetfilter_conntrack.Conntrack()"
Since issue #4 is specific regarding the call to catch() I believe this is not a duplicate.
Versions (Debian stretch):
Here are an example python file and the gdb 'backtrace full' after the segfault.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.