Prevent cowrie from crashing on invalid host for wget (#429)

Thanks for submitting this!
This commit is contained in:
fe7ch
2017-01-27 09:40:55 +03:00
committed by Michel Oosterhof
parent ce6b996de0
commit 0757e057ae

View File

@@ -142,6 +142,9 @@ class command_wget(HoneyPotCommand):
path = parsed.path or '/'
if scheme != 'http' and scheme != 'https':
raise NotImplementedError
if not host:
self.exit()
return None
except:
self.write('%s: Unsupported scheme.\n' % (url,))
self.exit()