Skip to content

Commit c5138d4

Browse files
committed
Minor refactoring
1 parent 349dfbf commit c5138d4

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

lib/core/option.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,16 +1140,16 @@ def _setSafeUrl():
11401140
"""
11411141
Check and set the safe URL options.
11421142
"""
1143-
if not conf.safUrl:
1143+
if not conf.safeUrl:
11441144
return
11451145

1146-
if not re.search("^http[s]*://", conf.safUrl):
1147-
if ":443/" in conf.safUrl:
1148-
conf.safUrl = "https://" + conf.safUrl
1146+
if not re.search("^http[s]*://", conf.safeUrl):
1147+
if ":443/" in conf.safeUrl:
1148+
conf.safeUrl = "https://" + conf.safeUrl
11491149
else:
1150-
conf.safUrl = "http://" + conf.safUrl
1150+
conf.safeUrl = "http://" + conf.safeUrl
11511151

1152-
if conf.saFreq <= 0:
1152+
if conf.safeFreq <= 0:
11531153
errMsg = "please provide a valid value (>0) for safe frequency (--safe-freq) while using safe URL feature"
11541154
raise SqlmapSyntaxException(errMsg)
11551155

lib/core/optiondict.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
"timeout": "float",
5151
"retries": "integer",
5252
"rParam": "string",
53-
"safUrl": "string",
54-
"safPost": "string",
55-
"saFreq": "integer",
53+
"safeUrl": "string",
54+
"safePost": "string",
55+
"safeFreq": "integer",
5656
"skipUrlEncode": "boolean",
5757
"csrfToken": "string",
5858
"csrfUrl": "string",

lib/parse/cmdline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ def cmdLineParser():
185185
request.add_option("--randomize", dest="rParam",
186186
help="Randomly change value for given parameter(s)")
187187

188-
request.add_option("--safe-url", dest="safUrl",
188+
request.add_option("--safe-url", dest="safeUrl",
189189
help="URL address to visit frequently during testing")
190190

191-
request.add_option("--safe-post", dest="safPost",
191+
request.add_option("--safe-post", dest="safePost",
192192
help="POST data to send to a safe URL")
193193

194-
request.add_option("--safe-freq", dest="saFreq", type="int",
194+
request.add_option("--safe-freq", dest="safeFreq", type="int",
195195
help="Test requests between two visits to a given safe URL")
196196

197197
request.add_option("--skip-urlencode", dest="skipUrlEncode",

lib/request/connect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -971,10 +971,10 @@ def _randomizeParameter(paramString, randomParameter):
971971
warnMsg += "10 or more)"
972972
logger.critical(warnMsg)
973973

974-
if conf.safUrl and conf.saFreq > 0:
974+
if conf.safeUrl and conf.safeFreq > 0:
975975
kb.queryCounter += 1
976-
if kb.queryCounter % conf.saFreq == 0:
977-
Connect.getPage(url=conf.safUrl, post=conf.safPost, cookie=cookie, direct=True, silent=True, ua=ua, referer=referer, host=host)
976+
if kb.queryCounter % conf.safeFreq == 0:
977+
Connect.getPage(url=conf.safeUrl, post=conf.safePost, cookie=cookie, direct=True, silent=True, ua=ua, referer=referer, host=host)
978978

979979
start = time.time()
980980

sqlmap.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,16 @@ rParam =
150150

151151
# URL address to visit frequently during testing.
152152
# Example: http://192.168.1.121/index.html
153-
safUrl =
153+
safeUrl =
154154

155155
# POST data to send to a safe URL.
156156
# Example: username=admin&password=passw0rd!
157-
safPost =
157+
safePost =
158158

159159
# Test requests between two visits to a given safe URL (default 0).
160160
# Valid: integer
161161
# Default: 0
162-
saFreq = 0
162+
safeFreq = 0
163163

164164
# Skip URL encoding of payload data
165165
# Valid: True or False

0 commit comments

Comments
 (0)