maurosoria / dirsearch

Web path scanner
11.58k stars 2.29k forks source link

Outdated API, although this is not a bug, it is recommended to update it #1321

Open ssrsec opened 10 months ago

ssrsec commented 10 months ago

dirsearch/dirsearch.py:23: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import DistributionNotFound, VersionConflict

saltasatelites commented 9 months ago

https://setuptools.pypa.io/en/latest/pkg_resources.html :

Attention

Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata). Some useful APIs are also provided by packaging (e.g. requirements and version parsing). Users should refrain from new usage of pkg_resources and should work to port to importlib-based solutions.

nrathaus commented 2 months ago

An option can be to use what is seen here: https://github.com/HansBug/hbutils/blob/main/hbutils/system/python/package.py#L202

I reached this code from here: https://github.com/python/importlib_metadata/issues/450

nrathaus commented 2 months ago

If this looks like a worthwhile direction, I can work on it @shelld3v