py3 compatible string

This commit is contained in:
Michel Oosterhof
2016-01-03 13:03:02 +04:00
parent 3f66e248e0
commit 819b3c65e0

View File

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