Commit graph

1809 commits

Author SHA1 Message Date
adisbladis
4305c82e66
Use python-iptables for iptables instead of os.system, will enable integration with linux capabilities 2017-06-11 16:50:17 +08:00
Simone Margaritelli
7f334fffde
Update README.md 2017-06-04 23:04:06 +08:00
adisbladis
946a7741e1
Minor restructuring in snitch.py, packet callback belongs in NetfilterQueueWrapper 2017-05-23 16:20:13 +08:00
adisbladis
09c66148fe
Dont handle queued connections from dead processes 2017-05-23 16:17:59 +08:00
adisbladis
a3852e10da
Fix Namespace is not iterable after change from optparse to argparse 2017-05-22 23:17:16 +08:00
adisbladis
7390c3d486
PEP8: Now all Python code is PEP8 2017-05-22 18:15:07 +08:00
adisbladis
5649ece28d
PEP8: Procmon 2017-05-22 18:14:39 +08:00
Simone Margaritelli
299a970737 Merge pull request #79 from adisbladis/connection-refactor
Refactor connection.py to use namedtuples instead of classes
2017-05-21 21:02:30 +02:00
adisbladis
f8dc4c60b3
Refactor connection.py to use namedtuples instead of objects
Move utility functions to get app path and cmdline into proc.py
get_pid_by_connection now only gets pid by connection data

Move Application into connection.py, this didn't really do much anyway
and had some overlap with connection

Move more things into ui subpackage that should not belong in daemon

As an added bonus this also gives a nice little decrease in memory usage
2017-05-22 02:57:11 +08:00
Simone Margaritelli
eb3f96c303 Merge pull request #78 from adisbladis/ruleperf
Rule performance fixes
2017-05-21 14:06:14 +02:00
adisbladis
588eb76126
Merge branch 'ruleperf' 2017-05-21 20:05:23 +08:00
Simone Margaritelli
e56b50cd70 Merge pull request #77 from adisbladis/codestyle-fixes
Improve code styling and performance in proc.py
2017-05-21 13:52:32 +02:00
Simone Margaritelli
8fe9a62ed7 Merge pull request #76 from adisbladis/uisplit-pre
Split ui into separate subpackage
2017-05-21 13:52:20 +02:00
adisbladis
befff27f53
Only iterate over rules where app_path is matching 2017-05-21 18:54:54 +08:00
adisbladis
7ac6d21746
Convert Rule into namedtuple with RuleSaveOption and RuleVerdict enums
This decreases memory usage because of Python using a shared
dictionary for all instances of Rule
2017-05-21 18:36:57 +08:00
adisbladis
f19ce5c9a7
Improve code styling and performance in proc.py
Previously was O(N), now only O(N) in worst case
2017-05-21 15:36:15 +08:00
adisbladis
302992c30d
Split ui into separate subpackage
Move LinuxDesktopParser into ui subpackage, it does not belong in the
Opensnitch core
2017-05-21 15:24:34 +08:00
Simone Margaritelli
2e4b91ceea Merge pull request #75 from adisbladis/icmp
Add ICMP support
2017-05-19 13:04:32 +02:00
adisbladis
baef7ee28a
Add ICMP support 2017-05-19 16:50:12 +08:00
Simone Margaritelli
9838989e1b Merge pull request #73 from adisbladis/sqlite-unique
Add unique constrain to sqlite db (fixes #70)
2017-05-16 15:38:09 +02:00
adisbladis
eac2a11bc4
Add unique constrain to sqlite db (fixes #70) 2017-05-16 21:34:35 +08:00
Simone Margaritelli
a7f1f73342 Merge pull request #72 from adisbladis/qt-rulefix
Dont show dialog if connection got permanent rule
2017-05-16 15:32:14 +02:00
adisbladis
33c5b17db8
Dont show dialog if connection got permanent rule
Currently the UI will show dialog if the connection got a permanent rule
after the connection was queued.
This fixes this behaviour.

We are also having an issue where the QComboBox won't get reset to Once
after being set.
2017-05-16 21:28:43 +08:00
Simone Margaritelli
4250c6d337 Merge pull request #64 from adisbladis/fix-blocking
Fix packet blocking behaviour while UI is open (fixes #40)
2017-05-12 18:39:59 +02:00
adisbladis
a042090cb7
Resolving merge with master 2017-05-13 00:34:05 +08:00
adisbladis
f24bda2a25
Fix packet blocking behaviour while UI is open (fixes #40)
There are a few non-obvious reasons why this commit is so big:

The PyQt mainloop must run in main thread.. This was not particularly
easy since the packet callbacks were running in the main thread.

Because of the PyQt running in the main thread thing NetFilterQueue had
to be wrapped up in a thread.

The packet callback is now dispatched to a thread if user has to be
prompted.
Packets are sent over a queue to the ui thread.

SQLite connection must be called from the same thread it was created
in. Thats why all the calls are wrapped up in a lock and create a new
connection. This is not ideal but I would say it's good enough for now.
2017-05-12 23:58:47 +08:00
Simone Margaritelli
4a237d27a5 Merge pull request #63 from in1t3r/master
resizing should work now
2017-05-11 20:20:55 +02:00
Marko Shiva Pavlovic - in1t3r
640216815a resize is done in steps now 2017-05-11 20:14:13 +02:00
Marko Shiva Pavlovic - in1t3r
c1ec70380a Issue with resizing fixed 2017-05-11 20:07:19 +02:00
Marko Shiva Pavlovic - in1t3r
5880f8900d Min and max sizes working now resizing 2017-05-11 19:54:14 +02:00
Simone Margaritelli
4e2a98fc68 Merge pull request #62 from in1t3r/master
Minor ui improvements in resizing
2017-05-11 18:49:41 +02:00
Marko Shiva Pavlovic - in1t3r
cd5cc3e8c5 Minor ui improvements in resizing 2017-05-11 18:45:51 +02:00
Simone Margaritelli
ae279a41e7 Merge pull request #61 from in1t3r/master
Fix for the resizing window and text issue
2017-05-11 16:52:33 +02:00
Marko Shiva Pavlovic - in1t3r
17469f7b00 Properly resizing windows and text with pyqt5 solving few issues 2017-05-11 16:45:37 +02:00
Marko Shiva Pavlovic - in1t3r
2a07b00557 new version of pyqt prompt 2017-05-11 15:07:34 +02:00
Simone Margaritelli
635aed0732 Merge pull request #60 from melizeche/feature/hidpi_support
feature/hidpi support
2017-05-10 19:33:32 +02:00
Marcelo Elizeche Landó
2835f309bf Merge branch 'master' into feature/hidpi_support 2017-05-10 13:23:03 -04:00
Marcelo Elizeche Landó
cb71d2fe80 Added new UI layout 2017-05-10 13:22:01 -04:00
Simone Margaritelli
2ee693e29c Merge pull request #59 from kant/patch-1
Minor fixes (proposal)
2017-05-10 12:33:16 +02:00
Darío Hereñú
2b742b7872 Minor fixes (proposal) 2017-05-10 00:54:44 -03:00
Simone Margaritelli
d7c8d3dc00 Merge pull request #57 from jacobculley/master
Added CLI argument for the database path.
2017-05-10 01:02:20 +02:00
BuildTools
3c505a14d2 Added CLI argument for the database path. 2017-05-09 23:52:23 +01:00
Simone Margaritelli
9b73e97228 Merge pull request #56 from adisbladis/fix-55
Allow duplicate desktop file entries
2017-05-09 21:09:24 +02:00
adisbladis
88f87e081f
Allow duplicate desktop file entries 2017-05-10 02:28:53 +08:00
Simone Margaritelli
f87c8bafff Merge pull request #54 from adisbladis/unicode
Read .desktop files as utf8
2017-05-09 19:23:49 +02:00
adisbladis
5f8be017d0
Read .desktop files as utf8 2017-05-10 01:21:26 +08:00
Simone Margaritelli
8fc74e67cc Merge pull request #51 from in1t3r/master
Changes to Readme file that reflects dependency on python3
2017-05-09 16:59:19 +02:00
Marko Shiva Pavlovic - in1t3r
323b59bf41 Change to the readme file that reflects now dependency on the python3 2017-05-09 16:27:30 +02:00
Marko Shiva Pavlovic - in1t3r
fb76639da6 Merge remote-tracking branch 'upstream/master' 2017-05-09 16:17:30 +02:00
Simone Margaritelli
ce72931d2e Merge pull request #47 from adisbladis/setuppy3
Refuse to install on Python 2
2017-05-09 13:50:49 +02:00