Python 3.12: Migrate from deprecated imp to importlib
This PR migrates from imp to importlib.
The helper function followed https://docs.python.org/3/whatsnew/3.12.html#imp
This should make recon-ng work with Python 3.12
I tried with your settings but now I get the same error but on line 15 import yaml
Traceback (most recent call last):
File "/usr/share/recon-ng/recon-ng", line 8, in
I tried with your settings but now I get the same error but on line 15 import yaml
Traceback (most recent call last): File "/usr/share/recon-ng/recon-ng", line 8, in
from recon.core import base File "/usr/share/recon-ng/recon/core/base.py", line 15, in import yaml ModuleNotFoundError: No module named 'yaml'
That has nothing to do with my PR. This is to fix the problem with Python 3.12, which doesn't have imp
Its working
~/venv/bin/python3 --version
Python 3.12.3
~/venv/bin/python3 recon-ng
_/_/_/ _/_/_/_/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/_/_/
_/ _/ _/ _/ _/ _/ _/_/ _/ _/_/ _/ _/
_/_/_/ _/_/_/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/_/_/
_/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/_/ _/ _/
_/ _/ _/_/_/_/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/_/_/
/\
/ \\ /\
Sponsored by... /\ /\/ \\V \/\
/ \\/ // \\\\\ \\ \/\
// // BLACK HILLS \/ \\
www.blackhillsinfosec.com
____ ____ ____ ____ _____ _ ____ ____ ____
|____] | ___/ |____| | | | |____ |____ |
| | \_ | | |____ | | ____| |____ |____
www.practisec.com
[recon-ng v5.1.2, Tim Tomes (@lanmaster53)]
[*] No modules enabled/installed.
[recon-ng][default] >
modules load worked
[recon-ng][default] > marketplace install recon/domains-hosts/hackertarget
[*] Module installed: recon/domains-hosts/hackertarget
[*] Reloading modules...
[recon-ng][default] > modules load recon/domains-hosts/hackertarget
[recon-ng][default][hackertarget] > options set SOURCE github.com
SOURCE => github.com
[recon-ng][default][hackertarget] > run
----------
GITHUB.COM
----------
[*] Country: None
...
Resolved by #218.