|
25 | 25 | GIT_REPOSITORY = "git://github.com/sqlmapproject/sqlmap.git"
|
26 | 26 | ML = "sqlmap-users@lists.sourceforge.net"
|
27 | 27 |
|
28 |
| -# minimum distance of ratio from kb.matchRatio to result in True |
| 28 | +# Minimum distance of ratio from kb.matchRatio to result in True |
29 | 29 | DIFF_TOLERANCE = 0.05
|
30 | 30 | CONSTANT_RATIO = 0.9
|
31 | 31 |
|
32 |
| -# lower and upper values for match ratio in case of stable page |
| 32 | +# Lower and upper values for match ratio in case of stable page |
33 | 33 | LOWER_RATIO_BOUND = 0.02
|
34 | 34 | UPPER_RATIO_BOUND = 0.98
|
35 | 35 |
|
36 |
| -# markers for special cases when parameter values contain html encoded characters |
| 36 | +# Markers for special cases when parameter values contain html encoded characters |
37 | 37 | PARAMETER_AMP_MARKER = "__AMP__"
|
38 | 38 | PARAMETER_SEMICOLON_MARKER = "__SEMICOLON__"
|
39 | 39 |
|
|
45 | 45 | CHAR_INFERENCE_MARK = "%c"
|
46 | 46 | PRINTABLE_CHAR_REGEX = r"[^\x00-\x1f\x7e-\xff]"
|
47 | 47 |
|
48 |
| -# regular expression used for recognition of generic permission messages |
| 48 | +# Regular expression used for recognition of generic permission messages |
49 | 49 | PERMISSION_DENIED_REGEX = r"(command|permission|access)\s*(was|is)?\s*denied"
|
50 | 50 |
|
51 |
| -# regular expression used for recognition of generic maximum connection messages |
| 51 | +# Regular expression used for recognition of generic maximum connection messages |
52 | 52 | MAX_CONNECTIONS_REGEX = r"max.+connections"
|
53 | 53 |
|
54 |
| -# regular expression used for extracting results from google search |
| 54 | +# Regular expression used for extracting results from google search |
55 | 55 | GOOGLE_REGEX = r"url\?\w+=(http[^>]+)&(sa=U|rct=j)"
|
56 | 56 |
|
57 |
| -# regular expression used for extracting content from "textual" tags |
| 57 | +# Regular expression used for extracting content from "textual" tags |
58 | 58 | TEXT_TAG_REGEX = r"(?si)<(abbr|acronym|b|blockquote|br|center|cite|code|dt|em|font|h\d|i|li|p|pre|q|strong|sub|sup|td|th|title|tt|u)(?!\w).*?>(?P<result>[^<]+)"
|
59 | 59 |
|
60 |
| -# dumping characters used in GROUP_CONCAT MySQL technique |
| 60 | +# Dumping characters used in GROUP_CONCAT MySQL technique |
61 | 61 | CONCAT_ROW_DELIMITER = ','
|
62 | 62 | CONCAT_VALUE_DELIMITER = '|'
|
63 | 63 |
|
64 |
| -# coefficient used for a time-based query delay checking (must be >= 7) |
| 64 | +# Coefficient used for a time-based query delay checking (must be >= 7) |
65 | 65 | TIME_STDEV_COEFF = 7
|
66 | 66 |
|
67 |
| -# standard deviation after which a warning message should be displayed about connection lags |
| 67 | +# Standard deviation after which a warning message should be displayed about connection lags |
68 | 68 | WARN_TIME_STDEV = 0.5
|
69 | 69 |
|
70 |
| -# minimum length of usable union injected response (quick defense against substr fields) |
| 70 | +# Minimum length of usable union injected response (quick defense against substr fields) |
71 | 71 | UNION_MIN_RESPONSE_CHARS = 10
|
72 | 72 |
|
73 |
| -# coefficient used for a union-based number of columns checking (must be >= 7) |
| 73 | +# Coefficient used for a union-based number of columns checking (must be >= 7) |
74 | 74 | UNION_STDEV_COEFF = 7
|
75 | 75 |
|
76 |
| -# length of queue for candidates for time delay adjustment |
| 76 | +# Length of queue for candidates for time delay adjustment |
77 | 77 | TIME_DELAY_CANDIDATES = 3
|
78 | 78 |
|
79 |
| -# default value for HTTP Accept header |
| 79 | +# Default value for HTTP Accept header |
80 | 80 | HTTP_ACCEPT_HEADER_VALUE = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
|
81 | 81 |
|
82 |
| -# default value for HTTP Accept-Encoding header |
| 82 | +# Default value for HTTP Accept-Encoding header |
83 | 83 | HTTP_ACCEPT_ENCODING_HEADER_VALUE = "gzip,deflate"
|
84 | 84 |
|
85 | 85 | # HTTP timeout in silent mode
|
86 | 86 | HTTP_SILENT_TIMEOUT = 3
|
87 | 87 |
|
88 |
| -# maximum number of techniques used in inject.py/getValue() per one value |
| 88 | +# Maximum number of techniques used in inject.py/getValue() per one value |
89 | 89 | MAX_TECHNIQUES_PER_VALUE = 2
|
90 | 90 |
|
91 |
| -# suffix used for naming meta databases in DBMS(es) without explicit database name |
| 91 | +# Suffix used for naming meta databases in DBMS(es) without explicit database name |
92 | 92 | METADB_SUFFIX = "_masterdb"
|
93 | 93 |
|
94 |
| -# minimum time response set needed for time-comparison based on standard deviation |
| 94 | +# Minimum time response set needed for time-comparison based on standard deviation |
95 | 95 | MIN_TIME_RESPONSES = 10
|
96 | 96 |
|
97 |
| -# minimum comparison ratio set needed for searching valid union column number based on standard deviation |
| 97 | +# Minimum comparison ratio set needed for searching valid union column number based on standard deviation |
98 | 98 | MIN_UNION_RESPONSES = 5
|
99 | 99 |
|
100 |
| -# after these number of blanks at the end inference should stop (just in case) |
| 100 | +# After these number of blanks at the end inference should stop (just in case) |
101 | 101 | INFERENCE_BLANK_BREAK = 10
|
102 | 102 |
|
103 |
| -# use this replacement character for cases when inference is not able to retrieve the proper character value |
| 103 | +# Use this replacement character for cases when inference is not able to retrieve the proper character value |
104 | 104 | INFERENCE_UNKNOWN_CHAR = '?'
|
105 | 105 |
|
106 |
| -# character used for operation "greater" in inference |
| 106 | +# Character used for operation "greater" in inference |
107 | 107 | INFERENCE_GREATER_CHAR = ">"
|
108 | 108 |
|
109 |
| -# character used for operation "equals" in inference |
| 109 | +# Character used for operation "equals" in inference |
110 | 110 | INFERENCE_EQUALS_CHAR = "="
|
111 | 111 |
|
112 |
| -# character used for operation "not-equals" in inference |
| 112 | +# Character used for operation "not-equals" in inference |
113 | 113 | INFERENCE_NOT_EQUALS_CHAR = "!="
|
114 | 114 |
|
115 |
| -# string used for representation of unknown dbms version |
| 115 | +# String used for representation of unknown dbms version |
116 | 116 | UNKNOWN_DBMS_VERSION = "Unknown"
|
117 | 117 |
|
118 |
| -# dynamicity mark length used in dynamicity removal engine |
| 118 | +# Dynamicity mark length used in dynamicity removal engine |
119 | 119 | DYNAMICITY_MARK_LENGTH = 32
|
120 | 120 |
|
121 |
| -# dummy user prefix used in dictionary attack |
| 121 | +# Dummy user prefix used in dictionary attack |
122 | 122 | DUMMY_USER_PREFIX = "__dummy__"
|
123 | 123 |
|
124 | 124 | # Reference: http://en.wikipedia.org/wiki/ISO/IEC_8859-1
|
125 | 125 | DEFAULT_PAGE_ENCODING = "iso-8859-1"
|
126 | 126 |
|
127 | 127 | # System variables
|
128 | 128 | IS_WIN = subprocess.mswindows
|
129 |
| -# The name of the operating system dependent module imported. The following |
130 |
| -# names have currently been registered: 'posix', 'nt', 'mac', 'os2', 'ce', |
131 |
| -# 'java', 'riscos' |
| 129 | + |
| 130 | +# The name of the operating system dependent module imported. The following names have currently been registered: 'posix', 'nt', 'mac', 'os2', 'ce', 'java', 'riscos' |
132 | 131 | PLATFORM = os.name
|
133 | 132 | PYVERSION = sys.version.split()[0]
|
134 | 133 |
|
|
171 | 170 | REFERER_ALIASES = ( "ref", "referer", "referrer" )
|
172 | 171 | HOST_ALIASES = ( "host", )
|
173 | 172 |
|
174 |
| -# items displayed in basic help (-h) output |
| 173 | +# Items displayed in basic help (-h) output |
175 | 174 | BASIC_HELP_ITEMS = (
|
176 | 175 | "url",
|
177 | 176 | "googleDork",
|
|
205 | 204 | "wizard"
|
206 | 205 | )
|
207 | 206 |
|
208 |
| -# string representation for NULL value |
| 207 | +# String representation for NULL value |
209 | 208 | NULL = "NULL"
|
210 | 209 |
|
211 |
| -# string representation for blank ('') value |
| 210 | +# String representation for blank ('') value |
212 | 211 | BLANK = "<blank>"
|
213 | 212 |
|
214 |
| -# string representation for current database |
| 213 | +# String representation for current database |
215 | 214 | CURRENT_DB = "CD"
|
216 | 215 |
|
217 | 216 | # Regular expressions used for parsing error messages (--parse-errors)
|
|
470 | 469 |
|
471 | 470 | # Number of rows to generate inside the full union test for limited output (mustn't be too large to prevent payload length problems)
|
472 | 471 | LIMITED_ROWS_TEST_NUMBER = 15
|
| 472 | + |
| 473 | +# Regular expressing used for detecting JSON-like POST data |
| 474 | +JSON_RECOGNITION_REGEX = r'(?s)\A\s*.*"[^"]+"\s*:\s*"[^"]+".+\}\s*\Z' |
0 commit comments