diff --git a/README.md b/README.md index 4df7afd..cca479b 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Additional functionality over standard kippo: Software required: * An operating system (tested on Debian, CentOS, FreeBSD and Windows 7) -* Python 2.5+ +* Python 2.7+ * Twisted 8.0+ * PyCrypto * pyasn1 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' diff --git a/twisted/plugins/cowrie_plugin.py b/twisted/plugins/cowrie_plugin.py index 7ab8729..206c3d8 100644 --- a/twisted/plugins/cowrie_plugin.py +++ b/twisted/plugins/cowrie_plugin.py @@ -32,7 +32,7 @@ class CowrieServiceMaker(object): """ if os.name == 'posix' and os.getuid() == 0: - print 'ERROR: You must not run cowrie as root!' + print('ERROR: You must not run cowrie as root!') sys.exit(1) cfg = readConfigFile(options["config"])