Skip to content

Commit bfe8785

Browse files
committed
Minor regrouping
1 parent 412301b commit bfe8785

File tree

4 files changed

+62
-62
lines changed

4 files changed

+62
-62
lines changed

lib/core/optiondict.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"loadCookies": "string",
3232
"dropSetCookie": "boolean",
3333
"agent": "string",
34+
"mobile": "boolean",
3435
"randomAgent": "boolean",
3536
"host": "string",
3637
"referer": "string",
@@ -100,6 +101,7 @@
100101
"notString": "string",
101102
"regexp": "string",
102103
"code": "integer",
104+
"smart": "boolean",
103105
"textOnly": "boolean",
104106
"titles": "boolean",
105107
},
@@ -197,10 +199,12 @@
197199

198200
"General": {
199201
"trafficFile": "string",
202+
"answers": "string",
200203
"batch": "boolean",
201204
"binaryFields": "string",
202205
"charset": "string",
203206
"checkInternet": "boolean",
207+
"cleanup": "boolean",
204208
"crawlDepth": "integer",
205209
"crawlExclude": "string",
206210
"csvDel": "string",
@@ -210,6 +214,7 @@
210214
"flushSession": "boolean",
211215
"forms": "boolean",
212216
"freshQueries": "boolean",
217+
"googlePage": "integer",
213218
"harFile": "string",
214219
"hexConvert": "boolean",
215220
"outputDir": "string",
@@ -218,28 +223,23 @@
218223
"repair": "boolean",
219224
"saveConfig": "string",
220225
"scope": "string",
226+
"skipWaf": "boolean",
221227
"testFilter": "string",
222228
"testSkip": "string",
223-
"updateAll": "boolean",
229+
"webRoot": "string",
224230
},
225231

226232
"Miscellaneous": {
227233
"alert": "string",
228-
"answers": "string",
229234
"beep": "boolean",
230-
"cleanup": "boolean",
231235
"dependencies": "boolean",
232236
"disableColoring": "boolean",
233-
"googlePage": "integer",
234237
"listTampers": "boolean",
235-
"mobile": "boolean",
236238
"offline": "boolean",
237239
"purge": "boolean",
238-
"skipWaf": "boolean",
239-
"smart": "boolean",
240240
"tmpDir": "string",
241-
"webRoot": "string",
242241
"wizard": "boolean",
242+
"updateAll": "boolean",
243243
"verbose": "integer",
244244
},
245245

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.8.9"
21+
VERSION = "1.3.8.10"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/parse/cmdline.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ def cmdLineParser(argv=None):
152152
request.add_argument("--user-agent", dest="agent",
153153
help="HTTP User-Agent header value")
154154

155+
request.add_argument("--mobile", dest="mobile", action="store_true",
156+
help="Imitate smartphone through HTTP User-Agent header")
157+
155158
request.add_argument("--random-agent", dest="randomAgent", action="store_true",
156159
help="Use randomly selected HTTP User-Agent header value")
157160

@@ -344,6 +347,9 @@ def cmdLineParser(argv=None):
344347
detection.add_argument("--code", dest="code", type=int,
345348
help="HTTP code to match when query is evaluated to True")
346349

350+
detection.add_argument("--smart", dest="smart", action="store_true",
351+
help="Perform thorough tests only if positive heuristic(s)")
352+
347353
detection.add_argument("--text-only", dest="textOnly", action="store_true",
348354
help="Compare pages based only on the textual content")
349355

@@ -585,6 +591,9 @@ def cmdLineParser(argv=None):
585591
general.add_argument("-t", dest="trafficFile",
586592
help="Log all HTTP traffic into a textual file")
587593

594+
general.add_argument("--answers", dest="answers",
595+
help="Set predefined answers (e.g. \"quit=N,follow=N\")")
596+
588597
general.add_argument("--batch", dest="batch", action="store_true",
589598
help="Never ask for user input, use the default behavior")
590599

@@ -594,6 +603,9 @@ def cmdLineParser(argv=None):
594603
general.add_argument("--check-internet", dest="checkInternet", action="store_true",
595604
help="Check Internet connection before assessing the target")
596605

606+
general.add_argument("--cleanup", dest="cleanup", action="store_true",
607+
help="Clean up the DBMS from sqlmap specific UDF and tables")
608+
597609
general.add_argument("--crawl", dest="crawlDepth", type=int,
598610
help="Crawl the website starting from the target URL")
599611

@@ -624,6 +636,9 @@ def cmdLineParser(argv=None):
624636
general.add_argument("--fresh-queries", dest="freshQueries", action="store_true",
625637
help="Ignore query results stored in session file")
626638

639+
general.add_argument("--gpage", dest="googlePage", type=int,
640+
help="Use Google dork results from specified page number")
641+
627642
general.add_argument("--har", dest="harFile",
628643
help="Log all HTTP traffic into a HAR file")
629644

@@ -648,68 +663,53 @@ def cmdLineParser(argv=None):
648663
general.add_argument("--scope", dest="scope",
649664
help="Regexp to filter targets from provided proxy log")
650665

666+
general.add_argument("--skip-waf", dest="skipWaf", action="store_true",
667+
help="Skip heuristic detection of WAF/IPS protection")
668+
651669
general.add_argument("--test-filter", dest="testFilter",
652670
help="Select tests by payloads and/or titles (e.g. ROW)")
653671

654672
general.add_argument("--test-skip", dest="testSkip",
655673
help="Skip tests by payloads and/or titles (e.g. BENCHMARK)")
656674

657-
general.add_argument("--update", dest="updateAll", action="store_true",
658-
help="Update sqlmap")
675+
general.add_argument("--web-root", dest="webRoot",
676+
help="Web server document root directory (e.g. \"/var/www\")")
659677

660678
# Miscellaneous options
661-
miscellaneous = parser.add_argument_group("Miscellaneous")
679+
miscellaneous = parser.add_argument_group("Miscellaneous", "These options do not fit into any other category")
662680

663681
miscellaneous.add_argument("-z", dest="mnemonics",
664682
help="Use short mnemonics (e.g. \"flu,bat,ban,tec=EU\")")
665683

666684
miscellaneous.add_argument("--alert", dest="alert",
667685
help="Run host OS command(s) when SQL injection is found")
668686

669-
miscellaneous.add_argument("--answers", dest="answers",
670-
help="Set predefined answers (e.g. \"quit=N,follow=N\")")
671-
672687
miscellaneous.add_argument("--beep", dest="beep", action="store_true",
673688
help="Beep on question and/or when SQL injection is found")
674689

675-
miscellaneous.add_argument("--cleanup", dest="cleanup", action="store_true",
676-
help="Clean up the DBMS from sqlmap specific UDF and tables")
677-
678690
miscellaneous.add_argument("--dependencies", dest="dependencies", action="store_true",
679691
help="Check for missing (optional) sqlmap dependencies")
680692

681693
miscellaneous.add_argument("--disable-coloring", dest="disableColoring", action="store_true",
682694
help="Disable console output coloring")
683695

684-
miscellaneous.add_argument("--gpage", dest="googlePage", type=int,
685-
help="Use Google dork results from specified page number")
686-
687696
miscellaneous.add_argument("--list-tampers", dest="listTampers", action="store_true",
688697
help="Display list of available tamper scripts")
689698

690-
miscellaneous.add_argument("--mobile", dest="mobile", action="store_true",
691-
help="Imitate smartphone through HTTP User-Agent header")
692-
693699
miscellaneous.add_argument("--offline", dest="offline", action="store_true",
694700
help="Work in offline mode (only use session data)")
695701

696702
miscellaneous.add_argument("--purge", dest="purge", action="store_true",
697703
help="Safely remove all content from sqlmap data directory")
698704

699-
miscellaneous.add_argument("--skip-waf", dest="skipWaf", action="store_true",
700-
help="Skip heuristic detection of WAF/IPS protection")
701-
702-
miscellaneous.add_argument("--smart", dest="smart", action="store_true",
703-
help="Conduct thorough tests only if positive heuristic(s)")
704-
705705
miscellaneous.add_argument("--sqlmap-shell", dest="sqlmapShell", action="store_true",
706706
help="Prompt for an interactive sqlmap shell")
707707

708708
miscellaneous.add_argument("--tmp-dir", dest="tmpDir",
709709
help="Local directory for storing temporary files")
710710

711-
miscellaneous.add_argument("--web-root", dest="webRoot",
712-
help="Web server document root directory (e.g. \"/var/www\")")
711+
miscellaneous.add_argument("--update", dest="updateAll", action="store_true",
712+
help="Update sqlmap")
713713

714714
miscellaneous.add_argument("--wizard", dest="wizard", action="store_true",
715715
help="Simple wizard interface for beginner users")

sqlmap.conf

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ dropSetCookie = False
6767
# sqlmap will also test for SQL injection on the HTTP User-Agent value.
6868
agent =
6969

70+
# Imitate smartphone through HTTP User-Agent header.
71+
# Valid: True or False
72+
mobile = False
73+
7074
# Use randomly selected HTTP User-Agent header value.
7175
# Valid: True or False
7276
randomAgent = False
@@ -343,6 +347,10 @@ regexp =
343347
# code)
344348
# code =
345349

350+
# Conduct thorough tests only if positive heuristic(s).
351+
# Valid: True or False
352+
smart = False
353+
346354
# Compare pages based only on the textual content.
347355
# Valid: True or False
348356
textOnly = False
@@ -683,6 +691,9 @@ sessionFile =
683691
# Log all HTTP traffic into a textual file.
684692
trafficFile =
685693

694+
# Set predefined answers (e.g. "quit=N,follow=N").
695+
answers =
696+
686697
# Never ask for user input, use the default behaviour.
687698
# Valid: True or False
688699
batch = False
@@ -693,6 +704,10 @@ binaryFields =
693704
# Check Internet connection before assessing the target.
694705
checkInternet = False
695706

707+
# Clean up the DBMS from sqlmap specific UDF and tables.
708+
# Valid: True or False
709+
cleanup = False
710+
696711
# Crawl the website starting from the target URL.
697712
# Valid: integer
698713
# Default: 0
@@ -729,6 +744,11 @@ forms = False
729744
# Valid: True or False
730745
freshQueries = False
731746

747+
# Use Google dork results from specified page number.
748+
# Valid: integer
749+
# Default: 1
750+
googlePage = 1
751+
732752
# Use hex conversion during data retrieval.
733753
# Valid: True or False
734754
hexConvert = False
@@ -752,25 +772,25 @@ repair = False
752772
# Example: (google|yahoo)
753773
scope =
754774

775+
# Skip heuristic detection of WAF/IPS protection.
776+
# Valid: True or False
777+
skipWaf = False
778+
755779
# Select tests by payloads and/or titles (e.g. ROW)
756780
testFilter =
757781

758782
# Skip tests by payloads and/or titles (e.g. BENCHMARK)
759783
testSkip =
760784

761-
# Update sqlmap.
762-
# Valid: True or False
763-
updateAll = False
785+
# Web server document root directory (e.g. "/var/www").
786+
webRoot =
764787

765788

766789
[Miscellaneous]
767790

768791
# Run host OS command(s) when SQL injection is found.
769792
alert =
770793

771-
# Set predefined answers (e.g. "quit=N,follow=N").
772-
answers =
773-
774794
# Beep on question and/or when SQL injection is found.
775795
# Valid: True or False
776796
beep = False
@@ -779,10 +799,6 @@ beep = False
779799
# Valid: True or False
780800
checkPayload = False
781801

782-
# Clean up the DBMS from sqlmap specific UDF and tables.
783-
# Valid: True or False
784-
cleanup = False
785-
786802
# Check for missing (optional) sqlmap dependencies.
787803
# Valid: True or False
788804
dependencies = False
@@ -791,41 +807,25 @@ dependencies = False
791807
# Valid: True or False
792808
disableColoring = False
793809

794-
# Use Google dork results from specified page number.
795-
# Valid: integer
796-
# Default: 1
797-
googlePage = 1
798-
799810
# Display list of available tamper scripts
800811
# Valid: True or False
801812
listTampers = False
802813

803-
# Imitate smartphone through HTTP User-Agent header.
804-
# Valid: True or False
805-
mobile = False
806-
807814
# Work in offline mode (only use session data)
808815
# Valid: True or False
809816
offline = False
810817

811-
# Skip heuristic detection of WAF/IPS protection.
812-
# Valid: True or False
813-
skipWaf = False
814-
815-
# Conduct thorough tests only if positive heuristic(s).
816-
# Valid: True or False
817-
smart = False
818-
819818
# Local directory for storing temporary files.
820819
tmpDir =
821820

822-
# Web server document root directory (e.g. "/var/www").
823-
webRoot =
824-
825821
# Simple wizard interface for beginner users.
826822
# Valid: True or False
827823
wizard = False
828824

825+
# Update sqlmap.
826+
# Valid: True or False
827+
updateAll = False
828+
829829
# Verbosity level.
830830
# Valid: integer between 0 and 6
831831
# 0: Show only error and critical messages

0 commit comments

Comments
 (0)