cescobarresi / ciscoreputation

Get the Cisco's talosintelligence.com reputation for an ip address
MIT License
28 stars 13 forks source link

JSON #3

Closed mkondratev closed 6 years ago

mkondratev commented 6 years ago
root@kondratev:~# pip install ciscoreputation
Collecting ciscoreputation
  Using cached ciscoreputation-2.0.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-bhx8gpm1/ciscoreputation/setup.py", line 36
        raise AssertionError, "Can't set 'version' when using 'release'"
                            ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-bhx8gpm1/ciscoreputation/

okay, install another way:

root@kondratev:~# easy_install -U ciscoreputation-2.0.0
Processing ciscoreputation-2.0.0
Writing /root/ciscoreputation-2.0.0/setup.cfg
Running setup.py -q bdist_egg --dist-dir /root/ciscoreputation-2.0.0/egg-dist-tmp-waDprh
zip_safe flag not set; analyzing archive contents...
ciscoreputation.__about__: module references __file__
removing '/usr/local/lib/python2.7/dist-packages/ciscoreputation-2.0.0-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/ciscoreputation-2.0.0-py2.7.egg
Extracting ciscoreputation-2.0.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
ciscoreputation 2.0.0 is already the active version in easy-install.pth
Installing ciscoreputation script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/ciscoreputation-2.0.0-py2.7.egg
Processing dependencies for ciscoreputation==2.0.0
Finished processing dependencies for ciscoreputation==2.0.0

and check

root@kondratev:~# ciscoreputation 8.8.8.8 --tos
ciscoreputation 2.0.0
Traceback (most recent call last):
  File "/usr/local/bin/ciscoreputation", line 9, in <module>
    load_entry_point('ciscoreputation==2.0.0', 'console_scripts', 'ciscoreputation')()
  File "/usr/local/lib/python2.7/dist-packages/ciscoreputation-2.0.0-py2.7.egg/ciscoreputation/__init__.py", line 4, in main
    do_main()
  File "/usr/local/lib/python2.7/dist-packages/ciscoreputation-2.0.0-py2.7.egg/ciscoreputation/ciscoreputation.py", line 93, in do_main
    data = get_data(arguments['<query>'])
  File "/usr/local/lib/python2.7/dist-packages/ciscoreputation-2.0.0-py2.7.egg/ciscoreputation/ciscoreputation.py", line 42, in get_data
    'query_entry':search_string
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 808, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
mkondratev commented 6 years ago

solved:

matvey@kondratev:~$ git clone https://github.com/cescobarresi/ciscoreputation
matvey@kondratev:~$ cd ciscoreputation/
matvey@kondratev:~/ciscoreputation$ sudo python setup.py install