|
19 | 19 | from lib.core.enums import OS |
20 | 20 |
|
21 | 21 | # sqlmap version (<major>.<minor>.<month>.<monthly commit>) |
22 | | -VERSION = "1.0.10.51" |
| 22 | +VERSION = "1.0.10.52" |
23 | 23 | TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" |
24 | 24 | TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} |
25 | 25 | VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) |
|
103 | 103 | DISCONNECT_SEARCH_REGEX = r'<p class="url wrapword">([^<]+)</p>' |
104 | 104 |
|
105 | 105 | # Dummy user agent for search (if default one returns different results) |
106 | | -DUMMY_SEARCH_USER_AGENT = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0" |
| 106 | +DUMMY_SEARCH_USER_AGENT = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0" |
107 | 107 |
|
108 | 108 | # Regular expression used for extracting content from "textual" tags |
109 | 109 | 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>[^<]+)" |
|
251 | 251 |
|
252 | 252 | # Items displayed in basic help (-h) output |
253 | 253 | BASIC_HELP_ITEMS = ( |
254 | | - "url", |
255 | | - "googleDork", |
256 | | - "data", |
257 | | - "cookie", |
258 | | - "randomAgent", |
259 | | - "proxy", |
260 | | - "testParameter", |
261 | | - "dbms", |
262 | | - "level", |
263 | | - "risk", |
264 | | - "tech", |
265 | | - "getAll", |
266 | | - "getBanner", |
267 | | - "getCurrentUser", |
268 | | - "getCurrentDb", |
269 | | - "getPasswordHashes", |
270 | | - "getTables", |
271 | | - "getColumns", |
272 | | - "getSchema", |
273 | | - "dumpTable", |
274 | | - "dumpAll", |
275 | | - "db", |
276 | | - "tbl", |
277 | | - "col", |
278 | | - "osShell", |
279 | | - "osPwn", |
280 | | - "batch", |
281 | | - "checkTor", |
282 | | - "flushSession", |
283 | | - "tor", |
284 | | - "sqlmapShell", |
285 | | - "wizard", |
286 | | - ) |
| 254 | + "url", |
| 255 | + "googleDork", |
| 256 | + "data", |
| 257 | + "cookie", |
| 258 | + "randomAgent", |
| 259 | + "proxy", |
| 260 | + "testParameter", |
| 261 | + "dbms", |
| 262 | + "level", |
| 263 | + "risk", |
| 264 | + "tech", |
| 265 | + "getAll", |
| 266 | + "getBanner", |
| 267 | + "getCurrentUser", |
| 268 | + "getCurrentDb", |
| 269 | + "getPasswordHashes", |
| 270 | + "getTables", |
| 271 | + "getColumns", |
| 272 | + "getSchema", |
| 273 | + "dumpTable", |
| 274 | + "dumpAll", |
| 275 | + "db", |
| 276 | + "tbl", |
| 277 | + "col", |
| 278 | + "osShell", |
| 279 | + "osPwn", |
| 280 | + "batch", |
| 281 | + "checkTor", |
| 282 | + "flushSession", |
| 283 | + "tor", |
| 284 | + "sqlmapShell", |
| 285 | + "wizard", |
| 286 | +) |
287 | 287 |
|
288 | 288 | # String representation for NULL value |
289 | 289 | NULL = "NULL" |
|
299 | 299 |
|
300 | 300 | # Regular expressions used for parsing error messages (--parse-errors) |
301 | 301 | ERROR_PARSING_REGEXES = ( |
302 | | - r"<b>[^<]*(fatal|error|warning|exception)[^<]*</b>:?\s*(?P<result>.+?)<br\s*/?\s*>", |
303 | | - r"(?m)^(fatal|error|warning|exception):?\s*(?P<result>[^\n]+?)$", |
304 | | - r"(?P<result>[^\n>]*SQL Syntax[^\n<]+)", |
305 | | - r"<li>Error Type:<br>(?P<result>.+?)</li>", |
306 | | - r"error '[0-9a-f]{8}'((<[^>]+>)|\s)+(?P<result>[^<>]+)", |
307 | | - r"\[[^\n\]]+(ODBC|JDBC)[^\n\]]+\](\[[^\]]+\])?(?P<result>[^\n]+(in query expression|\(SQL| at /[^ ]+pdo)[^\n<]+)" |
308 | | - ) |
| 302 | + r"<b>[^<]*(fatal|error|warning|exception)[^<]*</b>:?\s*(?P<result>.+?)<br\s*/?\s*>", |
| 303 | + r"(?m)^(fatal|error|warning|exception):?\s*(?P<result>[^\n]+?)$", |
| 304 | + r"(?P<result>[^\n>]*SQL Syntax[^\n<]+)", |
| 305 | + r"<li>Error Type:<br>(?P<result>.+?)</li>", |
| 306 | + r"error '[0-9a-f]{8}'((<[^>]+>)|\s)+(?P<result>[^<>]+)", |
| 307 | + r"\[[^\n\]]+(ODBC|JDBC)[^\n\]]+\](\[[^\]]+\])?(?P<result>[^\n]+(in query expression|\(SQL| at /[^ ]+pdo)[^\n<]+)" |
| 308 | +) |
309 | 309 |
|
310 | 310 | # Regular expression used for parsing charset info from meta html headers |
311 | 311 | META_CHARSET_REGEX = r'(?si)<head>.*<meta[^>]+charset="?(?P<result>[^"> ]+).*</head>' |
|
482 | 482 |
|
483 | 483 | # Vectors used for provoking specific WAF/IPS/IDS behavior(s) |
484 | 484 | WAF_ATTACK_VECTORS = ( |
485 | | - "", # NIL |
486 | | - "search=<script>alert(1)</script>", |
487 | | - "file=../../../../etc/passwd", |
488 | | - "q=<invalid>foobar", |
489 | | - "id=1 %s" % IDS_WAF_CHECK_PAYLOAD |
490 | | - ) |
| 485 | + "", # NIL |
| 486 | + "search=<script>alert(1)</script>", |
| 487 | + "file=../../../../etc/passwd", |
| 488 | + "q=<invalid>foobar", |
| 489 | + "id=1 %s" % IDS_WAF_CHECK_PAYLOAD |
| 490 | +) |
491 | 491 |
|
492 | 492 | # Used for status representation in dictionary attack phase |
493 | 493 | ROTATING_CHARS = ('\\', '|', '|', '/', '-') |
|
0 commit comments