recon-ng icon indicating copy to clipboard operation
recon-ng copied to clipboard

Python 3.12 issue

Open pingpongterminator300 opened this issue 1 year ago • 6 comments

Trying to install and run recon-ng from source with latest python on my distro Installed all requirements from file

~/venv/bin/python3 --version
Python 3.12.3
~/venv/bin/python3 recon-ng
Traceback (most recent call last):
  File "/opt/cybertools/recon-ng/recon-ng", line 8, in <module>
    from recon.core import base
  File "/opt/cybertools/recon-ng/recon/core/base.py", line 7, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

pingpongterminator300 avatar May 18 '24 13:05 pingpongterminator300

i have the same problem. Did you solve this?

julietasafa avatar May 24 '24 11:05 julietasafa

i have the same problem. Did you solve this?

I have a PR for this, if possible you can try and test it. Thank you!

l4rzy avatar May 24 '24 17:05 l4rzy

i have the same problem. Did you solve this?

I have a PR for this, if possible you can try and test it. Thank you!

Yes. Please do an leave your results in the PR. I just haven't had a chance to test it.

lanmaster53 avatar May 27 '24 02:05 lanmaster53

The problem is that python 3.12 no longer supports module "imp". Changing the "import imp" to "import importlib" at line 7 in recon-ng/recon/core will make it possible to run the framework, however the modules do not seem to work without "imp". At the present moment the most sensible solution seems to be using python 3.11

Enuma029 avatar Jun 18 '24 13:06 Enuma029

I have a solution to this issue that I believe preserves original functionality

dinkleburger avatar Oct 11 '24 17:10 dinkleburger

Just dropping a note: wasn't able to pull @dinkleburger fix yet, but made the changes manually and it works. (6.11.3-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Oct 10 22:31:19 UTC 2024 x86_64 GNU/Linux, Python 3.12.6)

realivetech avatar Oct 16 '24 18:10 realivetech

Just want to clarify the actual file to change is recon-ng/recon/core/base.py.

Installing modules does not work with this fix, though.

blurrred avatar Oct 30 '24 14:10 blurrred