Minor fix (for JSON values with :)

This commit is contained in:
Miroslav Stampar 2013-03-05 20:11:58 +01:00
parent 30cf933445
commit 8e6692d793

View File

@ -97,7 +97,7 @@ class Agent(object):
if kb.postHint in (POST_HINT.SOAP, POST_HINT.XML): if kb.postHint in (POST_HINT.SOAP, POST_HINT.XML):
origValue = origValue.split('>')[-1] origValue = origValue.split('>')[-1]
elif kb.postHint == POST_HINT.JSON: elif kb.postHint == POST_HINT.JSON:
origValue = extractRegexResult(r"(?s):\s*(?P<result>\d+\Z)", origValue) or extractRegexResult(r'(?s)(?P<result>[^"]+\Z)', origValue) origValue = extractRegexResult(r"(?s)\"\s*:\s*(?P<result>\d+\Z)", origValue) or extractRegexResult(r'(?s)(?P<result>[^"]+\Z)', origValue)
else: else:
origValue = extractRegexResult(r"(?s)(?P<result>[^\s<>{}();'\"]+\Z)", origValue) origValue = extractRegexResult(r"(?s)(?P<result>[^\s<>{}();'\"]+\Z)", origValue)
elif place == PLACE.CUSTOM_HEADER: elif place == PLACE.CUSTOM_HEADER: