mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
fix wget url parsing, Fixes #91
This commit is contained in:
@ -79,8 +79,12 @@ class command_wget(HoneyPotCommand):
|
|||||||
|
|
||||||
def download(self, url, fakeoutfile, outputfile, *args, **kwargs):
|
def download(self, url, fakeoutfile, outputfile, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
scheme, host, port, path = client._parse(url)
|
parsed = urlparse.urlparse(url)
|
||||||
if scheme == 'https':
|
scheme = parsed.scheme
|
||||||
|
host = parsed.hostname
|
||||||
|
port = parsed.port or (443 if scheme == 'https' else 80)
|
||||||
|
path = parsed.path or '/'
|
||||||
|
if scheme == 'https' or port != 80:
|
||||||
self.writeln('Sorry, SSL not supported in this release')
|
self.writeln('Sorry, SSL not supported in this release')
|
||||||
self.exit()
|
self.exit()
|
||||||
return None
|
return None
|
||||||
|
Reference in New Issue
Block a user