Permalink
Please sign in to comment.
Showing
with
229 additions
and 25 deletions.
- +5 −1 .gitignore
- +7 −0 MANIFEST.in
- +10 −0 README.md
- +42 −0 bin/opensnitch
- +0 −24 main.py
- +18 −0 opensnitch/app.py
- +18 −0 opensnitch/connection.py
- +18 −0 opensnitch/dns.py
- +18 −0 opensnitch/proc.py
- +18 −0 opensnitch/rule.py
- +18 −0 opensnitch/snitch.py
- +18 −0 opensnitch/ui.py
- +39 −0 setup.py
| @@ -1,2 +1,6 @@ | ||
| -*.swp | ||
| *.pyc | ||
| +build | ||
| +dist | ||
| +*.egg-info | ||
| +.idea | ||
| +*.swp |
| @@ -0,0 +1,7 @@ | ||
| +exclude *.pyc .DS_Store .gitignore MANIFEST.in | ||
| +include setup.py | ||
| +include distribute_setup.py | ||
| +include README.md | ||
| +include LICENSE | ||
| +recursive-include bin * | ||
| +recursive-include opensnitch *.py |
| @@ -0,0 +1,42 @@ | ||
| +#!/usr/bin/python | ||
| +# This file is part of OpenSnitch. | ||
| +# | ||
| +# Copyright(c) 2017 Simone Margaritelli | ||
| +# evilsocket@gmail.com | ||
| +# http://www.evilsocket.net | ||
| +# | ||
| +# This file may be licensed under the terms of of the | ||
| +# GNU General Public License Version 2 (the ``GPL''). | ||
| +# | ||
| +# Software distributed under the License is distributed | ||
| +# on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either | ||
| +# express or implied. See the GPL for the specific language | ||
| +# governing rights and limitations. | ||
| +# | ||
| +# You should have received a copy of the GPL along with this | ||
| +# program. If not, go to http://www.gnu.org/licenses/gpl.html | ||
| +# or write to the Free Software Foundation, Inc., | ||
| +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| +import os | ||
| +import sys | ||
| +import logging | ||
| + | ||
| +if not os.geteuid() == 0: | ||
| + sys.exit('OpenSnitch must be run as root.') | ||
| + | ||
| +logging.basicConfig(format='[%(asctime)s] (%(levelname)s) %(message)s',level=logging.INFO) | ||
| +logging.getLogger("scapy.runtime").setLevel(logging.ERROR) | ||
| + | ||
| +from opensnitch.snitch import Snitch | ||
| + | ||
| +snitch = Snitch() | ||
| + | ||
| +try: | ||
| + logging.info( "OpenSnitch running with pid %d." % os.getpid() ) | ||
| + snitch.start() | ||
| +except KeyboardInterrupt, e: | ||
| + pass | ||
| + | ||
| +logging.info( "Quitting ..." ) | ||
| + | ||
| +snitch.stop() |
| @@ -1,24 +0,0 @@ | ||
| -#!/usr/bin/python | ||
| -import os | ||
| -import sys | ||
| -import logging | ||
| - | ||
| -if not os.geteuid() == 0: | ||
| - sys.exit('OpenSnitch must be run as root.') | ||
| - | ||
| -logging.basicConfig(format='[%(asctime)s] (%(levelname)s) %(message)s',level=logging.INFO) | ||
| -logging.getLogger("scapy.runtime").setLevel(logging.ERROR) | ||
| - | ||
| -from opensnitch.snitch import Snitch | ||
| - | ||
| -snitch = Snitch() | ||
| - | ||
| -try: | ||
| - logging.info( "OpenSnitch running with pid %d." % os.getpid() ) | ||
| - snitch.start() | ||
| -except KeyboardInterrupt, e: | ||
| - pass | ||
| - | ||
| -logging.info( "Quitting ..." ) | ||
| - | ||
| -snitch.stop() |
| @@ -0,0 +1,39 @@ | ||
| +# This file is part of OpenSnitch. | ||
| +# | ||
| +# Copyright(c) 2017 Simone Margaritelli | ||
| +# evilsocket@gmail.com | ||
| +# http://www.evilsocket.net | ||
| +# | ||
| +# This file may be licensed under the terms of of the | ||
| +# GNU General Public License Version 2 (the ``GPL''). | ||
| +# | ||
| +# Software distributed under the License is distributed | ||
| +# on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either | ||
| +# express or implied. See the GPL for the specific language | ||
| +# governing rights and limitations. | ||
| +# | ||
| +# You should have received a copy of the GPL along with this | ||
| +# program. If not, go to http://www.gnu.org/licenses/gpl.html | ||
| +# or write to the Free Software Foundation, Inc., | ||
| +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| +from setuptools import setup, find_packages | ||
| +import os | ||
| + | ||
| +try: | ||
| + long_description = open( 'README.md', 'rt' ).read() | ||
| +except: | ||
| + long_description = 'OpenSnitch - An application level firewall for GNU/Linux.' | ||
| + | ||
| +setup( name = 'opensnitch', | ||
| + version = '0.0.1', | ||
| + description = long_description, | ||
| + long_description = long_description, | ||
| + author = 'Simone Margaritelli', | ||
| + author_email = 'evilsocket@gmail.com', | ||
| + url = 'http://www.github.com/evilsocket/opensnitch', | ||
| + packages = find_packages(), | ||
| + scripts = [ 'bin/opensnitch' ], | ||
| + license = 'GPL', | ||
| + zip_safe = False, | ||
| + install_requires = [ 'scapy', 'easygui', 'dpkt' ] | ||
| +) |
0 comments on commit
94196d4