Docker-Remote-API-Exploit
Docker-Remote-API-Exploit copied to clipboard
'NoneType' object has no attribute 'find'
问题出现在爬取结果的时候,这里不确定是不是python版本的问题。
Traceback (most recent call last):
File "dockerAPI_Exploit.py", line 209, in <module>
TmpUrl = urlparse.urlparse(args.url)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urlparse.py", line 143, in urlparse
tuple = urlsplit(url, scheme, allow_fragments)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urlparse.py", line 182, in urlsplit
i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'
另外在对爬取的结果-c 进行check的时候,这里的判断条件也会出问题。
if 'server' in TestRe.headers.keys():
if 'Docker' in TestRe.headers['server'] and 'Command' in TestRe.text:
print "\33[31m%s :vulnerability\33[0m" %url
self.VulnerabilityIp.append(url)
else:
print '%s :not vulnerable' %url
else:
print '%s :not vulnerable' %url
在同Python版本(Python 2.7.6)的其他系统下运行,正常
应该是你输入IP的时候没有加端口号吧。 检测一个url:dockerAPI_Exploit.py -u http://111.222.333.444:2375/ -c