evilsocket / opensnitch

OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch.
GNU General Public License v3.0
9.92k stars 490 forks source link

opensnitch-ui broken after latest commit #744

Closed pizzadude closed 1 year ago

pizzadude commented 1 year ago

on fedora 36 kde:

opensnitch-ui                                                                                                                                         
Loading translations: /usr/local/lib/python3.10/site-packages/opensnitch/i18n locale: en_CA
is new file, or IN MEMORY, setting initial schema version
setting schema version to: 2
setting schema version to: 2
schema version: 2
db schema is up to date
exception loading ipasn db: No module named 'pyasn'
Install python3-pyasn to display IP's network name.
Traceback (most recent call last):
  File "/usr/local/bin/opensnitch-ui", line 69, in <module>
    service = UIService(app, on_exit)
  File "/usr/local/lib/python3.10/site-packages/opensnitch/service.py", line 92, in __init__
    self._stats_dialog = StatsDialog(dbname="general", db=self._db, appicon=self.white_icon)
  File "/usr/local/lib/python3.10/site-packages/opensnitch/dialogs/stats.py", line 399, in __init__
    self._rules_dialog = RulesEditorDialog(appicon=appicon)
  File "/usr/local/lib/python3.10/site-packages/opensnitch/dialogs/ruleseditor.py", line 61, in __init__
    self.ifaceCheck.toggled.connect(self._cb_iface_check_toggled)
AttributeError: 'RulesEditorDialog' object has no attribute 'ifaceCheck'. Did you mean: 'enableCheck'?
pizzadude commented 1 year ago

Also, Fedora 36 doesn't seem to have a "pyasn" package. It has a "python3-pyasn1" package but I don't think that's the same thing, because it doesn't seem to be detected by opensnitch.

gustavo-iniguez-goya commented 1 year ago

Thank you @pizzadude , it should be fixed now.

gustavo-iniguez-goya commented 1 year ago

You're right @pizzadude , some distros don't have python3-pyasn. You can install it manually:

$ pip3 install --user pyasn
$ .local/bin/pyasn_util_download --latest
$ .local/bin/pyasn_util_convert.py --single rib.20220924.2000.bz2 ipasn_db.dat
$ gzip ipasn_db.dat
$ mv ipasn_db.dat.gz .config/opensnitch/
$ .local/bin/pyasn_util_asnames.py > .config/opensnitch/asnames.json

The thing is that the package python3-pyasn packaged in some distros distributes by default those files, which are (outdated btw) the ones present on the repo https://github.com/hadiasghari/pyasn/tree/master/data

pizzadude commented 1 year ago

You're right @pizzadude , some distros don't have python3-pyasn. You can install it manually:

$ pip3 install --user pyasn
$ .local/bin/pyasn_util_download --latest
$ .local/bin/pyasn_util_convert.py --single rib.20220924.2000.bz2 ipasn_db.dat
$ gzip ipasn_db.dat
$ mv ipasn_db.dat.gz .config/opensnitch/
$ .local/bin/pyasn_util_asnames.py > .config/opensnitch/asnames.json

The thing is that the package python3-pyasn packaged in some distros distributes by default those files, which are (outdated btw) the ones present on the repo https://github.com/hadiasghari/pyasn/tree/master/data

Thank you.