alpha1e0 / pentestdb

WEB渗透测试数据库
Apache License 2.0
676 stars 276 forks source link

无法运行...如何解决这个? #7

Open 687766616e opened 5 years ago

687766616e commented 5 years ago
$ python2 -m pip install appdirs
Requirement already satisfied: appdirs in /home/root/.local/lib/python2.7/site-packages (1.4.3)
$ sudo python2 -m pip install appdirs
Requirement already satisfied: appdirs in /usr/local/lib/python2.7/dist-packages/appdirs-1.4.3-py2.7.egg (1.4.3)

$ sudo python2 -m pip install -r requirements.txt
...
[!]: 安装pentestdb失败,原因:No module named appdirs

$ pentest
无法找到配置文件 '/home/root/.config/pentestdb/pentestdb.conf'
687766616e commented 5 years ago
~/pentestdb/pentest-tool$ ls
build  dist  MANIFEST.in  pentest  pentestdb.egg-info  requirements.txt  setup.py
alpha1e0 commented 5 years ago

看起来是appdir这个包安装有问题

在python试图下输入 from appdirs import AppDirs 试试,例如:

Python 2.7.15 (default, Sep 2 2018, 21:57:34) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38)] on darwin Type "help", "copyright", "credits" or "license" for more information.

from appdirs import AppDirs

from appdirs import AppDirs

如果有问题,也可试试手动生成配置文件:

/home/root/.config/pentestdb/pentestdb.conf

里面的内容是:

[basic] datapath=你的pentest-tool-data目录的绝对路径

在 2019年7月7日,03:47,huitc notifications@github.com 写道:

$ python2 -m pip install appdirs Requirement already satisfied: appdirs in /home/root/.local/lib/python2.7/site-packages (1.4.3) $ sudo python2 -m pip install appdirs Requirement already satisfied: appdirs in /usr/local/lib/python2.7/dist-packages/appdirs-1.4.3-py2.7.egg (1.4.3)

$ sudo python2 -m pip install -r requirements.txt ... [!]: 安装pentestdb失败,原因:No module named appdirs

$ pentest 无法找到配置文件 '/home/root/.config/pentestdb/pentestdb.conf' — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alpha1e0/pentestdb/issues/7?email_source=notifications&email_token=AC2WCRLEPLGWORINNC63VOLP6DZF7A5CNFSM4H6UEPKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G5VSXIQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AC2WCRMITM6CFREAQYHUGJLP6DZF7ANCNFSM4H6UEPKA.

bakersville6996 commented 4 years ago
$ python2 -m pip install appdirs
Requirement already satisfied: appdirs in /home/root/.local/lib/python2.7/site-packages (1.4.3)
$ sudo python2 -m pip install appdirs
Requirement already satisfied: appdirs in /usr/local/lib/python2.7/dist-packages/appdirs-1.4.3-py2.7.egg (1.4.3)

$ sudo python2 -m pip install -r requirements.txt
...
[!]: 安装pentestdb失败,原因:No module named appdirs

$ pentest
无法找到配置文件 '/home/root/.config/pentestdb/pentestdb.conf'

6996

alpha1e0 commented 4 years ago

你这里问题现象比较奇怪,第一个错误,应该是你运行 python2 setup.py时候出现的,原因是没有appdirs组件,而后面执行pentest后,出现那个错误,说明appdirs组件已经安装了。

你可以通过以下方法修复以下:

创建文件:/home/root/.config/pentestdb/pentestdb.conf

在其中填写如下信息:

[basic] datapath=你的pentestdb根目录的绝对路径(就是pentest-tool的父目录的绝对路径)

2020年3月3日 10:13,Bakersville notifications@github.com 写道:

$ python2 -m pip install appdirs Requirement already satisfied: appdirs in /home/root/.local/lib/python2.7/site-packages (1.4.3) $ sudo python2 -m pip install appdirs Requirement already satisfied: appdirs in /usr/local/lib/python2.7/dist-packages/appdirs-1.4.3-py2.7.egg (1.4.3)

$ sudo python2 -m pip install -r requirements.txt ... [!]: 安装pentestdb失败,原因:No module named appdirs

$ pentest 无法找到配置文件 '/home/root/.config/pentestdb/pentestdb.conf' 6996

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alpha1e0/pentestdb/issues/7?email_source=notifications&email_token=AC2WCRP4FDFV7JWIKRTC6UTRFRRTLA5CNFSM4H6UEPKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENRZSYI#issuecomment-593729889, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC2WCRJ7MMQ4ZFOWN6NUJA3RFRRTLANCNFSM4H6UEPKA.

verring commented 3 months ago

在kali2024安装,遇到了和上面相同的问题,而且无法通过之前的回答解决。能不能换一个类似的库,python2.7和py3真的差距大

python2 setup.py install /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points' warnings.warn(msg) /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'include_package_data' warnings.warn(msg) /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg) running install running build running build_py running install_lib running install_egg_info Removing /usr/local/lib/python2.7/dist-packages/pentestdb-1.1.0.egg-info Writing /usr/local/lib/python2.7/dist-packages/pentestdb-1.1.0.egg-info [!]: 安装pentestdb失败,原因:No module named appdirs

verring commented 3 months ago

pip install -r requirements.txt Requirement already satisfied: chardet>=2.3.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 4)) (5.2.0) Requirement already satisfied: colorama>=0.3.7 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 5)) (0.4.6) Requirement already satisfied: dnspython>=1.12.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 6)) (2.6.1) Requirement already satisfied: requests>=2.10.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 7)) (2.31.0) Requirement already satisfied: pyyaml>=3.11 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 8)) (6.0.1) Collecting appdirs>=1.4.0 (from -r requirements.txt (line 9)) Downloading appdirs-1.4.4-py2.py3-none-any.whl.metadata (9.0 kB) Requirement already satisfied: lxml>=3.4.2 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 10)) (5.1.0) Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB) Installing collected packages: appdirs Attempting uninstall: appdirs Found existing installation: appdirs 1.1.0 Uninstalling appdirs-1.1.0: Successfully uninstalled appdirs-1.1.0 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pyppeteer 1.0.1 requires pyee<9.0.0,>=8.1.0, but you have pyee 11.1.0 which is incompatible.
theharvester 4.5.1 requires aiohttp==3.9.3, but you have aiohttp 3.9.1 which is incompatible.
theharvester 4.5.1 requires aiosqlite==0.19.0, but you have aiosqlite 0.17.0 which is incompatible.
theharvester 4.5.1 requires certifi==2024.2.2, but you have certifi 2023.11.17 which is incompatible.
theharvester 4.5.1 requires dnspython==2.5.0, but you have dnspython 2.6.1 which is incompatible.
theharvester 4.5.1 requires fastapi==0.109.0, but you have fastapi 0.110.0 which is incompatible.
theharvester 4.5.1 requires pyppeteer==1.0.2, but you have pyppeteer 1.0.1 which is incompatible.
theharvester 4.5.1 requires retrying==1.3.4, but you have retrying 1.3.3 which is incompatible.
theharvester 4.5.1 requires setuptools==69.0.3, but you have setuptools 68.1.2 which is incompatible.
theharvester 4.5.1 requires shodan==1.31.0, but you have shodan 1.30.1 which is incompatible.
theharvester 4.5.1 requires slowapi==0.1.8, but you have slowapi 0.1.4 which is incompatible.
theharvester 4.5.1 requires uvicorn==0.27.0.post1, but you have uvicorn 0.27.0 which is incompatible.
Successfully installed appdirs-1.4.4
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
⚡ root💀ubuntu  /opt/pentestdb/pentest-tool   master  pip install -r requirements.txt ✘ ⚡ root💀ubuntu  /opt/pentestdb/pentest-tool   master  python2 setup.py install
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points' warnings.warn(msg) /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'include_package_data' warnings.warn(msg) /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg) running install running build running build_py running install_lib running install_egg_info Removing /usr/local/lib/python2.7/dist-packages/pentestdb-1.1.0.egg-info Writing /usr/local/lib/python2.7/dist-packages/pentestdb-1.1.0.egg-info [!]: 安装pentestdb失败,原因:No module named appdirs ✘ ⚡ root💀ubuntu  /opt/pentestdb/pentest-tool   master 