fix wget url parsing, Fixes #91

This commit is contained in:
Upi Tamminen
2014-06-13 18:25:55 +03:00
parent 36f2bc43b6
commit e8e33cd03f

View File

@ -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