REMnux / salt-states

This repository maintains the SaltStack state files for the REMnux distro.
https://REMnux.org
39 stars 21 forks source link

FakeNet-NG package is broken for python2, python3 #282

Open thejoelpatrol opened 6 months ago

thejoelpatrol commented 6 months ago

Appliance version: remnux-v7-focal-virtualbox.ova OVA hash: 412689aabf7d203c3fb46d141704671a1dbf858b13b404f0bbd0096f6d6bd7b9 lsb_release: Ubuntu 20.04.4 LTS Package: fakenet-ng.sls FakeNet version: 3.1

We have run remnux upgrade as of 2024-04-10.

There are two issues with the installation of FakeNet. Out of the box, this error occurs:

remnux@remnux:~$ sudo fakenet
Traceback (most recent call last):
  File "/usr/local/bin/fakenet", line 5, in <module>
    from fakenet.fakenet import main
  File "/usr/local/lib/python2.7/dist-packages/fakenet/fakenet.py", line 23, in <module>
    from configparser import ConfigParser
ImportError: No module named configparser

It seems that currently FakeNet is installed as a python2 package. The ConfigParser package appears to be missing for python2, most immediately leading to this error. This is strange as it's part of the standard library, but not actually the root of the problem here.

More importantly, FakeNet 3.1 now only supports Python 3.7 or higher. It should be installed for python3, not python2. I tried editing /usr/local/bin/fakenet to use python3 instead of python2, but the fakenet package is not installed for python3.

cc @tinajohnson

digitalsleuth commented 6 months ago

Hi @thejoelpatrol I've taken a look at this, and unfortunately the latest version of Fakenet (which is a Python3 update) is still in its Alpha / Pre-release phase. There is currently no version 3.1 available, and the only Python 3 versions available are 3.0-alpha and 3.2-alpha which appear to still have some bugs.

I'll keep looking into what can be done to mitigate these errors, and keep this Issue updated.

tinajohnson commented 2 months ago

Hi @digitalsleuth, Thank you for your comment clarifying what is required from FakeNet to resolve this issue. FakeNet team will look into this.

tinajohnson commented 16 hours ago

@digitalsleuth We just released FakeNet 3.3. Hopefully, this helps in including the Python 3 version of FakeNet in REMnux.

digitalsleuth commented 14 hours ago

Thanks @tinajohnson , I'll take a peek!

digitalsleuth commented 13 hours ago

Hi @tinajohnson , unfortunately it looks like there's still an error in the codebase. I'm seeing this error still, where line 391 calls e.message when e does not have an attribute message. I manually patched the line in code in REMnux and it started fakenet, but without that patch, it won't run properly in Ubuntu Focal.

I can either bump the issue I referenced to see if someone will address it, or I can leave it to you. Whichever you prefer.

tinajohnson commented 12 hours ago

Thank you, I now understand that this is the error you referenced in your earlier message. I will work on this.

digitalsleuth commented 12 hours ago

Hi @tinajohnson , I actually submitted a PR for the resolution just before you replied. It's the resolution provided by @thejoelpatrol in the reference issue.