mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-11 02:04:28 +01:00
Merge branch 'master' of https://github.com/micheloosterhof/cowrie
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user