Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: must be str, not NoneType #9

Open
eskuai opened this issue Dec 28, 2020 · 0 comments
Open

TypeError: must be str, not NoneType #9

eskuai opened this issue Dec 28, 2020 · 0 comments

Comments

@eskuai
Copy link

eskuai commented Dec 28, 2020

Hi,

I am trying to test vulners-scanner, and i got the following erro:

[root@k8s-master vulners-scanner]# ./linuxScanner.py 

             _
__   ___   _| |_ __   ___ _ __ ___
\ \ / / | | | | '_ \ / _ \ '__/ __|
 \ V /| |_| | | | | |  __/ |  \__ \
  \_/  \__,_|_|_| |_|\___|_|  |___/

Traceback (most recent call last):
  File "./linuxScanner.py", line 125, in <module>
    scannerInstance.scan(checkDocker=False)
  File "./linuxScanner.py", line 110, in scan
    hostInstance = self.auditSystem(sshPrefix=None,systemInfo="Host machine")
  File "./linuxScanner.py", line 65, in auditSystem
    installedPackages = instance.getPkg()
  File "/root/vulners-scanner/scanModules/centosDetect.py", line 40, in getPkg
    pkgList += self.sshCommand("rpm -qa |grep '^kernel.*" + uname + "'")
TypeError: must be str, not NoneType

my python is

root@k8s-master vulners-scanner]# python
Python 3.6.8 (default, Aug 24 2020, 17:57:11) 
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux

maybe kernel version?

Linux k8s-master 5.10.3 #2 SMP PREEMPT Mon Dec 28 23:41:24 CET 2020 x86_64 x86_64 x86_64 GNU/Linux

and testing

[root@k8s-master vulners-scanner]# ./lazyScanner.py
OS Name - rhel, OS Version - 8
Total provided packages: 986
Traceback (most recent call last):
  File "./lazyScanner.py", line 95, in <module>
    scanner.auditSystem()
  File "./lazyScanner.py", line 80, in auditSystem
    response = urllib2.urlopen(req, json.dumps(payload).encode('utf-8'))
  File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 402: Payment Required

What am i doing wrong?

Tx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant