This commit is contained in:
Miroslav Stampar
2019-07-19 12:17:07 +02:00
parent bd1ea4fd73
commit 0bc5069042
4 changed files with 25 additions and 6 deletions

View File

@@ -7,6 +7,7 @@ See the file 'LICENSE' for copying permission
import binascii
import logging
import random
import re
import socket
import string
@@ -1102,7 +1103,8 @@ class Connect(object):
match = re.search(r"(\A|\b)%s=(?P<value>[^&;]*)" % re.escape(randomParameter), paramString)
if match:
origValue = match.group("value")
retVal = re.sub(r"(\A|\b)%s=[^&;]*" % re.escape(randomParameter), "%s=%s" % (randomParameter, randomizeParameterValue(origValue)), paramString)
newValue = randomizeParameterValue(origValue) if randomParameter not in kb.randomPool else random.sample(kb.randomPool[randomParameter], 1)[0]
retVal = re.sub(r"(\A|\b)%s=[^&;]*" % re.escape(randomParameter), "%s=%s" % (randomParameter, newValue), paramString)
return retVal
for randomParameter in conf.rParam: