MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / randomRange

Function randomRange

lib/core/common.py:1232–1248  ·  view source on GitHub ↗

Returns random integer value in given range >>> random.seed(0) >>> randomRange(1, 500) 152

(start=0, stop=1000, seed=None)

Source from the content-addressed store, hash-verified

1230 return getCurrentThreadData().technique or kb.get("technique")
1231
1232def randomRange(start=0, stop=1000, seed=None):
1233 """
1234 Returns random integer value in given range
1235
1236 >>> random.seed(0)
1237 >>> randomRange(1, 500)
1238 152
1239 """
1240
1241 if seed is not None:
1242 _ = getCurrentThreadData().random
1243 _.seed(seed)
1244 randint = _.randint
1245 else:
1246 randint = random.randint
1247
1248 return int(randint(start, stop))
1249
1250def randomInt(length=4, seed=None):
1251 """

Callers 4

_selectPortMethod · 0.90
_sysTablesCheckMethod · 0.90
tamperFunction · 0.90
tamperFunction · 0.90

Calls 2

getCurrentThreadDataFunction · 0.90
seedMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…