mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Minor update
This commit is contained in:
@@ -3484,6 +3484,23 @@ def flattenValue(value):
|
||||
else:
|
||||
yield i
|
||||
|
||||
def joinValue(value, delimiter=','):
|
||||
"""
|
||||
Returns a value consisting of joined parts of a given value
|
||||
|
||||
>>> joinValue(['1', '2'])
|
||||
'1,2'
|
||||
>>> joinValue('1')
|
||||
'1'
|
||||
"""
|
||||
|
||||
if isListLike(value):
|
||||
retVal = delimiter.join(value)
|
||||
else:
|
||||
retVal = value
|
||||
|
||||
return retVal
|
||||
|
||||
def isListLike(value):
|
||||
"""
|
||||
Returns True if the given value is a list-like instance
|
||||
|
||||
Reference in New Issue
Block a user