Commit graph

1770 commits

Author SHA1 Message Date
Daniel Aleksandersen
d4cc6093a3 Add Fedora build dependencies
* Move dependencies from `Install` to `Requirements`
* List dependencies and sort alphabetically
2017-06-28 15:07:56 +02:00
adisbladis
993f46be91
Improve getting pid for udp connections 2017-06-20 20:27:06 +08:00
adisbladis
28e5395fbe
Update README install instructions 2017-06-13 15:52:44 +08:00
adisbladis
19aaa168a6
Add sudo params to inherit environment 2017-06-12 21:24:04 +08:00
adisbladis
657c97e59a
Gobject should be pygobject, not python-gobject in setup.py 2017-06-12 21:20:09 +08:00
Simone Margaritelli
52d4d0d218 Merge pull request #84 from evilsocket/dbus-ipc
Dbus ipc
2017-06-12 14:47:40 +02:00
adisbladis
f6f6079fbd
Update README after code split 2017-06-12 20:32:29 +08:00
adisbladis
b07071585c
Clear up iptables rules properly on shutdown 2017-06-12 20:30:46 +08:00
adisbladis
0d5561c734
Split codebase into daemon and ui components 2017-06-12 20:30:03 +08:00
Simone Margaritelli
79c92cd058 Merge pull request #83 from evilsocket/iptc-capsh
Iptc capsh
2017-06-11 14:37:37 +02:00
adisbladis
371207a71f
Set capabilities for runnning process and drop user to provided username (defaults to SUDO_USER) 2017-06-11 17:17:57 +08:00
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