sqlmap/tamper/randomcase.py

21 lines
548 B
Python
Raw Normal View History

2010-10-13 23:51:10 +04:00
import re
import string
from lib.core.convert import urlencode
from lib.core.common import randomRange
from lib.core.exception import sqlmapUnsupportedFeatureException
"""
2010-10-14 00:54:18 +04:00
value -> chars from value with random case
2010-10-13 23:51:10 +04:00
"""
def tamper(place, value):
retVal = value
if value:
retVal = ""
for i in xrange(len(value)):
if value[i].isalpha():
retVal += value[i].upper() if randomRange(0,1) else value[i].lower()
else:
retVal += value[i]
return retVal