mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-23 11:24:27 +03:00
Minor cosmetics
This commit is contained in:
parent
617edf7fc2
commit
c7b374534b
|
@ -1008,8 +1008,10 @@ def searchEnvPath(fileName):
|
||||||
def urlEncodeCookieValues(cookieStr):
|
def urlEncodeCookieValues(cookieStr):
|
||||||
if cookieStr:
|
if cookieStr:
|
||||||
result = ""
|
result = ""
|
||||||
|
|
||||||
for part in cookieStr.split(';'):
|
for part in cookieStr.split(';'):
|
||||||
index = part.find('=') + 1
|
index = part.find('=') + 1
|
||||||
|
|
||||||
if index > 0:
|
if index > 0:
|
||||||
name = part[:index - 1].strip()
|
name = part[:index - 1].strip()
|
||||||
value = urlencode(part[index:], convall=True)
|
value = urlencode(part[index:], convall=True)
|
||||||
|
@ -1018,10 +1020,12 @@ def urlEncodeCookieValues(cookieStr):
|
||||||
result += "%s%s" % ("%3B", urlencode(part, convall=True))
|
result += "%s%s" % ("%3B", urlencode(part, convall=True))
|
||||||
else:
|
else:
|
||||||
result += "; secure"
|
result += "; secure"
|
||||||
|
|
||||||
if result.startswith('; '):
|
if result.startswith('; '):
|
||||||
result = result[2:]
|
result = result[2:]
|
||||||
elif result.startswith('%3B'):
|
elif result.startswith('%3B'):
|
||||||
result = result[3:]
|
result = result[3:]
|
||||||
|
|
||||||
return result
|
return result
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user