This commit is contained in:
Michel Oosterhof
2015-10-10 08:33:06 +00:00
4 changed files with 6 additions and 6 deletions

View File

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

View File

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

View File

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

View File

@@ -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"])