Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8405ef5

Browse files
committed
some estetic updates
1 parent f4e7bf1 commit 8405ef5

9 files changed

Lines changed: 47 additions & 47 deletions

File tree

lib/controller/checks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def genCmpPayload():
524524
if injection.place is not None and injection.parameter is not None:
525525
if not conf.dropSetCookie and PAYLOAD.TECHNIQUE.BOOLEAN in injection.data and injection.data[PAYLOAD.TECHNIQUE.BOOLEAN].vector.startswith('OR'):
526526
warnMsg = "in OR boolean-based injections, please consider usage "
527-
warnMsg += "of switch --drop-set-cookie if you experience any "
527+
warnMsg += "of switch '--drop-set-cookie' if you experience any "
528528
warnMsg += "problems during data retrieval"
529529
logger.warn(warnMsg)
530530

@@ -715,7 +715,7 @@ def checkDynamicContent(firstPage, secondPage):
715715

716716
if count > conf.retries:
717717
warnMsg = "target url is too dynamic. "
718-
warnMsg += "switching to --text-only. "
718+
warnMsg += "switching to '--text-only' "
719719
logger.warn(warnMsg)
720720

721721
conf.textOnly = True
@@ -905,7 +905,7 @@ def checkWaf():
905905

906906
if retVal:
907907
warnMsg = "it appears that the target is protected. Please "
908-
warnMsg += "consider usage of tamper scripts (--tamper switch)"
908+
warnMsg += "consider usage of tamper scripts (option '--tamper')"
909909
logger.warn(warnMsg)
910910
else:
911911
infoMsg = "it appears that the target is not protected"

lib/controller/controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def start():
494494
errMsg += "to perform more tests."
495495

496496
if isinstance(conf.tech, list) and len(conf.tech) < 5:
497-
errMsg += " Rerun without providing the --technique switch."
497+
errMsg += " Rerun without providing the option '--technique'."
498498

499499
if not conf.textOnly and kb.originalPage:
500500
percent = (100.0 * len(getFilteredPageContent(kb.originalPage)) / len(kb.originalPage))

lib/core/option.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ class _(unicode): pass
13191319

13201320
warnMsg = "increasing default value for "
13211321
warnMsg += "--time-sec to %d because " % conf.timeSec
1322-
warnMsg += "--tor switch was provided"
1322+
warnMsg += "switch '--tor' was provided"
13231323
logger.warn(warnMsg)
13241324
else:
13251325
kb.adjustTimeDelay = True
@@ -1714,7 +1714,7 @@ def __setTorHttpProxySettings():
17141714
errMsg = "can't establish connection with the Tor proxy. "
17151715
errMsg += "Please make sure that you have Vidalia, Privoxy or "
17161716
errMsg += "Polipo bundle installed for you to be able to "
1717-
errMsg += "successfully use --tor switch "
1717+
errMsg += "successfully use switch '--tor' "
17181718

17191719
if IS_WIN:
17201720
errMsg += "(e.g. https://www.torproject.org/projects/vidalia.html.en)"
@@ -1770,88 +1770,88 @@ def __basicOptionValidation():
17701770
raise sqlmapSyntaxException, errMsg
17711771

17721772
if conf.textOnly and conf.nullConnection:
1773-
errMsg = "switch --text-only is incompatible with switch --null-connection"
1773+
errMsg = "switch '--text-only' is incompatible with switch '--null-connection'"
17741774
raise sqlmapSyntaxException, errMsg
17751775

17761776
if conf.titles and conf.nullConnection:
1777-
errMsg = "switch --titles is incompatible with switch --null-connection"
1777+
errMsg = "switch '--titles' is incompatible with switch '--null-connection'"
17781778
raise sqlmapSyntaxException, errMsg
17791779

17801780
if conf.data and conf.nullConnection:
1781-
errMsg = "switch --data is incompatible with switch --null-connection"
1781+
errMsg = "option '--data' is incompatible with switch '--null-connection'"
17821782
raise sqlmapSyntaxException, errMsg
17831783

17841784
if conf.string and conf.nullConnection:
1785-
errMsg = "switch --string is incompatible with switch --null-connection"
1785+
errMsg = "option '--string' is incompatible with switch '--null-connection'"
17861786
raise sqlmapSyntaxException, errMsg
17871787

17881788
if conf.regexp and conf.nullConnection:
1789-
errMsg = "switch --regexp is incompatible with switch --null-connection"
1789+
errMsg = "option '--regexp' is incompatible with switch '--null-connection'"
17901790
raise sqlmapSyntaxException, errMsg
17911791

17921792
if conf.dumpTable and conf.dumpAll:
1793-
errMsg = "switch --dump is incompatible with switch --dump-all"
1793+
errMsg = "switch '--dump' is incompatible with switch '--dump-all'"
17941794
raise sqlmapSyntaxException, errMsg
17951795

17961796
if conf.predictOutput and (conf.threads > 1 or conf.optimize):
1797-
errMsg = "switch --predict-output is incompatible with switch --threads and -o"
1797+
errMsg = "switch '--predict-output' is incompatible with option '--threads' and switch '-o'"
17981798
raise sqlmapSyntaxException, errMsg
17991799

18001800
if conf.threads > MAX_NUMBER_OF_THREADS:
18011801
errMsg = "maximum number of used threads is %d avoiding possible connection issues" % MAX_NUMBER_OF_THREADS
18021802
raise sqlmapSyntaxException, errMsg
18031803

18041804
if conf.forms and not conf.url:
1805-
errMsg = "switch --forms requires usage of -u (--url) switch"
1805+
errMsg = "switch '--forms' requires usage of option '-u' (--url)"
18061806
raise sqlmapSyntaxException, errMsg
18071807

18081808
if conf.tor and conf.ignoreProxy:
1809-
errMsg = "switch --tor is incompatible with switch --ignore-proxy"
1809+
errMsg = "switch '--tor' is incompatible with switch '--ignore-proxy'"
18101810
raise sqlmapSyntaxException, errMsg
18111811

18121812
if conf.tor and conf.proxy:
1813-
errMsg = "switch --tor is incompatible with switch --proxy"
1813+
errMsg = "switch '--tor' is incompatible with option '--proxy'"
18141814
raise sqlmapSyntaxException, errMsg
18151815

18161816
if conf.checkTor and not any([conf.tor, conf.proxy]):
1817-
errMsg = "switch --check-tor requires usage of switch --tor (or --proxy with HTTP proxy address using Tor)"
1817+
errMsg = "switch '--check-tor' requires usage of switch '--tor' (or option '--proxy' with HTTP proxy address using Tor)"
18181818
raise sqlmapSyntaxException, errMsg
18191819

18201820
if conf.torPort is not None and not (isinstance(conf.torPort, int) and conf.torPort > 0):
1821-
errMsg = "value for --tor-port (torPort) option must be an integer value greater than zero (>0)"
1821+
errMsg = "value for option '--tor-port' must be a positive integer"
18221822
raise sqlmapSyntaxException, errMsg
18231823

18241824
if conf.torType not in getPublicTypeMembers(PROXYTYPE, True):
1825-
errMsg = "switch --tor-type accepts one of following values: %s" % ", ".join(getPublicTypeMembers(PROXYTYPE, True))
1825+
errMsg = "option '--tor-type' accepts one of following values: %s" % ", ".join(getPublicTypeMembers(PROXYTYPE, True))
18261826
raise sqlmapSyntaxException, errMsg
18271827

18281828
if conf.skip and conf.testParameter:
1829-
errMsg = "switch --skip is incompatible with switch -p"
1829+
errMsg = "option '--skip' is incompatible with option '-p'"
18301830
raise sqlmapSyntaxException, errMsg
18311831

18321832
if conf.mobile and conf.agent:
1833-
errMsg = "switch --mobile is incompatible with switch --user-agent"
1833+
errMsg = "switch '--mobile' is incompatible with option '--user-agent'"
18341834
raise sqlmapSyntaxException, errMsg
18351835

18361836
if conf.proxy and conf.ignoreProxy:
1837-
errMsg = "switch --proxy is incompatible with switch --ignore-proxy"
1837+
errMsg = "option '--proxy' is incompatible with switch '--ignore-proxy'"
18381838
raise sqlmapSyntaxException, errMsg
18391839

18401840
if conf.forms and any([conf.logFile, conf.bulkFile, conf.direct, conf.requestFile, conf.googleDork]):
1841-
errMsg = "switch --forms is compatible only with -u (--url) target switch"
1841+
errMsg = "switch '--forms' is compatible only with option '-u' (--url)"
18421842
raise sqlmapSyntaxException, errMsg
18431843

18441844
if conf.timeSec < 1:
1845-
errMsg = "value for --time-sec option must be an integer greater than 0"
1845+
errMsg = "value for option '--time-sec' must be a positive integer"
18461846
raise sqlmapSyntaxException, errMsg
18471847

18481848
if conf.uChar and not re.match(UNION_CHAR_REGEX, conf.uChar):
1849-
errMsg = "value for --union-char option must be an alpha-numeric value (e.g. 1)"
1849+
errMsg = "value for option '--union-char' must be an alpha-numeric value (e.g. 1)"
18501850
raise sqlmapSyntaxException, errMsg
18511851

18521852
if isinstance(conf.uCols, basestring):
18531853
if not conf.uCols.isdigit() and ("-" not in conf.uCols or len(conf.uCols.split("-")) != 2):
1854-
errMsg = "value for --union-cols must be a range with hyphon "
1854+
errMsg = "value for option '--union-cols' must be a range with hyphon "
18551855
errMsg += "(e.g. 1-10) or integer value (e.g. 5)"
18561856
raise sqlmapSyntaxException, errMsg
18571857

lib/core/replication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(self, dbpath):
2222
try:
2323
import sqlite3
2424
except ImportError, _:
25-
errMsg = "missing module 'sqlite3' needed by --replicate switch"
25+
errMsg = "missing module 'sqlite3' needed by switch '--replicate'"
2626
raise sqlmapMissingDependence, errMsg
2727

2828
self.dbpath = dbpath

lib/parse/cmdline.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def cmdLineParser():
3939
# Target options
4040
target = OptionGroup(parser, "Target", "At least one of these "
4141
"options has to be specified to set the source "
42-
"to get target urls from.")
42+
"to get target urls from")
4343

4444
target.add_option("-d", dest="direct", help="Direct "
4545
"connection to the database")
@@ -63,7 +63,7 @@ def cmdLineParser():
6363

6464
# Request options
6565
request = OptionGroup(parser, "Request", "These options can be used "
66-
"to specify how to connect to the target url.")
66+
"to specify how to connect to the target url")
6767

6868
request.add_option("--data", dest="data",
6969
help="Data string to be sent through POST")
@@ -149,7 +149,7 @@ def cmdLineParser():
149149
# Optimization options
150150
optimization = OptionGroup(parser, "Optimization", "These "
151151
"options can be used to optimize the "
152-
"performance of sqlmap.")
152+
"performance of sqlmap")
153153

154154
optimization.add_option("-o", dest="optimize",
155155
action="store_true",
@@ -172,7 +172,7 @@ def cmdLineParser():
172172
injection = OptionGroup(parser, "Injection", "These options can be "
173173
"used to specify which parameters to test "
174174
"for, provide custom injection payloads and "
175-
"optional tampering scripts.")
175+
"optional tampering scripts")
176176

177177
injection.add_option("-p", dest="testParameter",
178178
help="Testable parameter(s)")
@@ -205,7 +205,7 @@ def cmdLineParser():
205205
"used to specify how to parse "
206206
"and compare page content from "
207207
"HTTP responses when using blind SQL "
208-
"injection technique.")
208+
"injection technique")
209209

210210
detection.add_option("--level", dest="level", type="int",
211211
help="Level of tests to perform (1-5, "
@@ -237,7 +237,7 @@ def cmdLineParser():
237237
# Techniques options
238238
techniques = OptionGroup(parser, "Techniques", "These options can be "
239239
"used to tweak testing of specific SQL "
240-
"injection techniques.")
240+
"injection techniques")
241241

242242
techniques.add_option("--technique", dest="tech",
243243
help="SQL injection techniques to test for "
@@ -266,7 +266,7 @@ def cmdLineParser():
266266
"be used to enumerate the back-end database "
267267
"management system information, structure "
268268
"and data contained in the tables. Moreover "
269-
"you can run your own SQL statements.")
269+
"you can run your own SQL statements")
270270

271271
enumeration.add_option("-b", "--banner", dest="getBanner",
272272
action="store_true", help="Retrieve DBMS banner")
@@ -361,7 +361,7 @@ def cmdLineParser():
361361
# User-defined function options
362362
brute = OptionGroup(parser, "Brute force", "These "
363363
"options can be used to run brute force "
364-
"checks.")
364+
"checks")
365365

366366
brute.add_option("--common-tables", dest="commonTables", action="store_true",
367367
help="Check existence of common tables")
@@ -372,7 +372,7 @@ def cmdLineParser():
372372
# User-defined function options
373373
udf = OptionGroup(parser, "User-defined function injection", "These "
374374
"options can be used to create custom user-defined "
375-
"functions.")
375+
"functions")
376376

377377
udf.add_option("--udf-inject", dest="udfInject", action="store_true",
378378
help="Inject custom user-defined functions")
@@ -383,7 +383,7 @@ def cmdLineParser():
383383
# File system options
384384
filesystem = OptionGroup(parser, "File system access", "These options "
385385
"can be used to access the back-end database "
386-
"management system underlying file system.")
386+
"management system underlying file system")
387387

388388
filesystem.add_option("--file-read", dest="rFile",
389389
help="Read a file from the back-end DBMS "
@@ -401,7 +401,7 @@ def cmdLineParser():
401401
takeover = OptionGroup(parser, "Operating system access", "These "
402402
"options can be used to access the back-end "
403403
"database management system underlying "
404-
"operating system.")
404+
"operating system")
405405

406406
takeover.add_option("--os-cmd", dest="osCmd",
407407
help="Execute an operating system command")
@@ -442,7 +442,7 @@ def cmdLineParser():
442442
windows = OptionGroup(parser, "Windows registry access", "These "
443443
"options can be used to access the back-end "
444444
"database management system Windows "
445-
"registry.")
445+
"registry")
446446

447447
windows.add_option("--reg-read", dest="regRead",
448448
action="store_true",
@@ -470,7 +470,7 @@ def cmdLineParser():
470470

471471
# General options
472472
general = OptionGroup(parser, "General", "These options can be used "
473-
"to set some general working parameters. " )
473+
"to set some general working parameters" )
474474

475475
#general.add_option("-x", dest="xmlFile",
476476
# help="Dump the data into an XML file")
@@ -648,7 +648,7 @@ def cmdLineParser():
648648

649649
if not any((args.direct, args.url, args.logFile, args.bulkFile, args.googleDork, args.configFile, \
650650
args.requestFile, args.updateAll, args.smokeTest, args.liveTest, args.realTest, args.wizard, args.dependencies)):
651-
errMsg = "missing a mandatory parameter (-d, -u, -l, -m, -r, -g, -c, --wizard, --update or --dependencies), "
651+
errMsg = "missing a mandatory option (-d, -u, -l, -m, -r, -g, -c, --wizard, --update or --dependencies), "
652652
errMsg += "-h for help"
653653
parser.error(errMsg)
654654

lib/request/connect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ def __retryProxy(**kwargs):
100100
warnMsg = "please make sure that you have "
101101
warnMsg += "Tor installed and running so "
102102
warnMsg += "you could successfully use "
103-
warnMsg += "--tor switch "
103+
warnMsg += "switch '--tor' "
104104
if IS_WIN:
105105
warnMsg += "(e.g. https://www.torproject.org/download/download.html.en)"
106106
else:
107107
warnMsg += "(e.g. https://help.ubuntu.com/community/Tor)"
108108
else:
109109
warnMsg = "if the problem persists please check that the provided "
110110
warnMsg += "target url is valid. If it is, you can try to rerun "
111-
warnMsg += "with the --random-agent switch turned on "
111+
warnMsg += "with the switch '--random-agent' turned on "
112112
warnMsg += "and/or proxy switches (--ignore-proxy, --proxy,...)"
113113
singleTimeWarnMessage(warnMsg)
114114
elif conf.threads > 1:
@@ -665,7 +665,7 @@ def _randomizeParameter(paramString, randomParameter):
665665
clearConsoleLine()
666666

667667
if conf.tor:
668-
warnMsg = "it's highly recommended to avoid usage of --tor switch for "
668+
warnMsg = "it's highly recommended to avoid usage of switch '--tor' for "
669669
warnMsg += "time-based injections because of it's high latency time"
670670
singleTimeWarnMessage(warnMsg)
671671

lib/techniques/blind/inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
120120

121121
if conf.threads == 1 and not timeBasedCompare:
122122
warnMsg = "running in a single-thread mode. Please consider "
123-
warnMsg += "usage of --threads switch for faster data retrieval"
123+
warnMsg += "usage of option '--threads' for faster data retrieval"
124124
singleTimeWarnMessage(warnMsg)
125125

126126
if conf.verbose in (1, 2) and not showEta:

lib/techniques/union/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def __unionTestByCharBruteforce(comment, place, parameter, value, prefix, suffix
272272
warnMsg = "if UNION based SQL injection is not detected, "
273273
warnMsg += "please consider "
274274
if not conf.uChar:
275-
warnMsg += "using --union-char switch "
275+
warnMsg += "usage of option '--union-char' "
276276
warnMsg += "(e.g. --union-char=1) "
277277
if not conf.dbms:
278278
if not conf.uChar:

lib/techniques/union/use.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __oneShotUnionUse(expression, unpack=True, limited=False):
9191
logger.warn(warnMsg)
9292
elif Backend.isDbms(DBMS.MYSQL) and not kb.multiThreadMode:
9393
warnMsg = "if the problem persists with 'None' values please try to use "
94-
warnMsg += "hidden switch --no-cast (fixing problems with some collation "
94+
warnMsg += "hidden switch '--no-cast' (fixing problems with some collation "
9595
warnMsg += "issues)"
9696
singleTimeWarnMessage(warnMsg)
9797

0 commit comments

Comments
 (0)