Te-k / harpoon

CLI tool for open source and threat intelligence
https://www.randhome.io/blog/2018/02/23/harpoon-an-osint-/-threat-intelligence-tool/
GNU General Public License v3.0
1.15k stars 185 forks source link

Missing CommonMark module #101

Closed vmsv closed 5 years ago

vmsv commented 5 years ago

Harpoon never finds the CommonMark module even though its installed.

import CommonMark ModuleNotFoundError: No module named 'CommonMark'

:~$ python --version Python 3.6.6

:~$ pip3 list Package Version


archiveis 0.0.6
beautifulsoup4 4.6.3
censys 0.0.8
certifi 2018.8.24 chardet 3.0.4
Click 7.0
click-plugins 1.0.4
colorama 0.3.9
commonmark 0.8.1
configparser 3.5.0
consolemd 0.4.3
Deprecated 1.2.3
dnspython 1.15.0
ez-setup 0.9
FullContact.py 0.0.6
future 0.16.0
geoip2 2.9.0
harpoon 0.1.1
idna 2.7
IPy 0.83
lxml 4.2.5
maxminddb 1.4.1
mispy 0.2
netaddr 0.7.19
oauthlib 2.1.0
OTXv2 1.2
passivetotal 1.0.30
pip 18.0
pkg-resources 0.0.0
pyaes 1.6.1
pyasn 1.6.0b1
pyasn1 0.4.4
pycrtsh 0.1
PyGithub 1.43.2
Pygments 2.2.0
pygreynoise 0.1
pyhunter 0.3
PyJWT 1.6.4
pypermacc 0.1.1
pysafe 0.1
PySocks 1.6.8
python-dateutil 2.7.3
pythreatgrid 0.1.1
requests 2.19.1
requests-oauthlib 1.0.0
rsa 4.0
selenium 3.14.1
setproctitle 1.1.10
setuptools 40.4.3
shodan 1.10.3
simplejson 3.16.0
six 1.11.0
spyonweb 0.1
Telethon 0.18.3
tweepy 3.6.0
urllib3 1.23
virustotal-api 1.1.10
wheel 0.31.1
wrapt 1.10.11
XlsxWriter 1.1.1

Te-k commented 5 years ago

I don't think commonmark is used by Harpoon. Could you paste the full error logs when you launch Harpoon ?

vmsv commented 5 years ago

It seems like consolemd is the one importing CommonMark.

~/harpoon >harpoon
Traceback (most recent call last):
  File "/home/XXXXX/harpoon/bin/harpoon", line 11, in <module>
    sys.exit(main())
  File "/home/XXXXX/harpoon/lib/python3.6/site-packages/harpoon/main.py", line 33, in main
    plugins = init_plugins()
  File "/home/XXXXX/harpoon/lib/python3.6/site-packages/harpoon/main.py", line 20, in init_plugins
    mod = __import__(plugin)
  File "/home/XXXXX/harpoon/lib/python3.6/site-packages/harpoon/commands/help.py", line 5, in <module>
    import consolemd
  File "/home/XXXXX/harpoon/lib/python3.6/site-packages/consolemd/__init__.py", line 11, in <module>
    from .renderer import Renderer
  File "/home/XXXXX/harpoon/lib/python3.6/site-packages/consolemd/renderer.py", line 5, in <module>
    import CommonMark
ModuleNotFoundError: No module named 'CommonMark'
yam23 commented 5 years ago

i received the same error message while trying to install it....

yam23 commented 5 years ago

it seems there is name change and maybe that is why it is breaking harpoon. The issue detail as below.

Hi!

In commonmark 0.8.0 the module name has been changed from CommonMark to commonmark (rtfd/CommonMark-py#131), which is a breaking change. I've filed rtfd/CommonMark-py#137 upstream about this, however even if they re-release an 0.8.x with the change reverted, and than make the breaking in 1.0 instead, recommonmark will still need to either:

adjust the setup.py version range from commonmark>=0.7.3 to commonmark>=0.7.3,<1 adjust the import name used, here:

The link to issue is here : https://github.com/rtfd/recommonmark/issues/116

Te-k commented 5 years ago

I have packaged all this through pypi, so it should have solved this issue. Feel free to reopen it if the problem persists.