getsploit icon indicating copy to clipboard operation
getsploit copied to clipboard

[Not critical] Escape spaces when the API key entering

Open linxon opened this issue 5 years ago • 0 comments

When you first launch latest version of getsploit and enter the API key you can by chance entering spaces and see this output:

linxon@cirno-chan ~/.getsploit $ getsploit 
To use getsploit you need to obtain Vulners API key at https://vulners.com
Please, enter API key:     asd    
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/getsploit", line 11, in <module>
    load_entry_point('getsploit==0.3.2', 'console_scripts', 'getsploit')()
  File "/usr/lib64/python3.6/site-packages/getsploit/getsploit.py", line 145, in main
    vulners_lib = sploitVulners(api_key=api_key)
  File "/usr/lib64/python3.6/site-packages/vulners/api.py", line 102, in __init__
    if api_key and not self.__validKey(api_key):
  File "/usr/lib64/python3.6/site-packages/vulners/api.py", line 199, in __validKey
    return self.vulners_post_request('apiKey', {'keyID':api_key}).get('valid')
AttributeError: 'bytes' object has no attribute 'get'

linxon avatar Mar 26 '19 20:03 linxon