mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-02-23 15:24:30 +01:00
py3 compatible string
This commit is contained in:
@@ -96,7 +96,7 @@ class Output(cowrie.core.output.Output):
|
||||
failed = False
|
||||
response = resp.content
|
||||
if resp.status_code == requests.codes.ok:
|
||||
sha1_regex = re.compile(ur'<sha1checksum>([^<]+)<\/sha1checksum>')
|
||||
sha1_regex = re.compile(r'<sha1checksum>([^<]+)<\/sha1checksum>')
|
||||
sha1_match = sha1_regex.search(response)
|
||||
if sha1_match is None:
|
||||
log.err('dshield ERROR: Could not find sha1checksum in response')
|
||||
@@ -106,7 +106,7 @@ class Output(cowrie.core.output.Output):
|
||||
if sha1_match.group(1) != sha1_local.hexdigest():
|
||||
log.err('dshield ERROR: SHA1 Mismatch {0} {1} .'.format(sha1_match.group(1), sha1_local.hexdigest()))
|
||||
failed = True
|
||||
md5_regex = re.compile(ur'<md5checksum>([^<]+)<\/md5checksum>')
|
||||
md5_regex = re.compile(r'<md5checksum>([^<]+)<\/md5checksum>')
|
||||
md5_match = md5_regex.search(response)
|
||||
if md5_match is None:
|
||||
log.err('dshield ERROR: Could not find md5checksum in response')
|
||||
|
||||
Reference in New Issue
Block a user