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

Function isNumPosStrValue

lib/core/common.py:3186–3209  ·  view source on GitHub ↗

Returns True if value is a string (or integer) with a positive integer representation >>> isNumPosStrValue(1) True >>> isNumPosStrValue('1') True >>> isNumPosStrValue(0) False >>> isNumPosStrValue('-2') False >>> isNumPosStrValue('100000000000000000000')

(value)

Source from the content-addressed store, hash-verified

3184 return value
3185
3186def isNumPosStrValue(value):
3187 """
3188 Returns True if value is a string (or integer) with a positive integer representation
3189
3190 >>> isNumPosStrValue(1)
3191 True
3192 >>> isNumPosStrValue('1')
3193 True
3194 >>> isNumPosStrValue(0)
3195 False
3196 >>> isNumPosStrValue('-2')
3197 False
3198 >>> isNumPosStrValue('100000000000000000000')
3199 False
3200 """
3201
3202 retVal = False
3203
3204 try:
3205 retVal = ((hasattr(value, "isdigit") and value.isdigit() and int(value) > 0) or (isinstance(value, int) and value > 0)) and int(value) < MAX_INT
3206 except ValueError:
3207 pass
3208
3209 return retVal
3210
3211@cachedmethod
3212def aliasToDbmsEnum(dbms):

Callers 15

pivotDumpTableFunction · 0.90
_goInferenceProxyFunction · 0.90
_resumeHashDBValuesFunction · 0.90
xpCmdshellEvalCmdMethod · 0.90
unionUseFunction · 0.90
errorUseFunction · 0.90
getDbsMethod · 0.90
getTablesMethod · 0.90
getColumnsMethod · 0.90
_tableGetCountMethod · 0.90
getStatementsMethod · 0.90
_checkFileLengthMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…