diff --git a/cowrie/commands/curl.py b/cowrie/commands/curl.py index b745aca..b20fd0c 100644 --- a/cowrie/commands/curl.py +++ b/cowrie/commands/curl.py @@ -209,11 +209,11 @@ class HTTPProgressDownloader(client.HTTPDownloader): def gotHeaders(self, headers): if self.status == '200': #self.curl.writeln('200 OK') - if headers.has_key('content-length'): + if 'content-length' in headers: self.totallength = int(headers['content-length'][0]) else: self.totallength = 0 - if headers.has_key('content-type'): + if 'content-type' in headers: self.contenttype = headers['content-type'][0] else: self.contenttype = 'text/whatever' diff --git a/cowrie/commands/wget.py b/cowrie/commands/wget.py index 1ae9044..6736297 100644 --- a/cowrie/commands/wget.py +++ b/cowrie/commands/wget.py @@ -215,11 +215,11 @@ class HTTPProgressDownloader(client.HTTPDownloader): if self.status == '200': if self.quiet == False: self.wget.writeln('200 OK') - if headers.has_key('content-length'): + if 'content-length' in headers: self.totallength = int(headers['content-length'][0]) else: self.totallength = 0 - if headers.has_key('content-type'): + if 'content-type' in headers: self.contenttype = headers['content-type'][0] else: self.contenttype = 'text/whatever'