|
26 | 26 | import socket |
27 | 27 | import time |
28 | 28 |
|
| 29 | +from difflib import SequenceMatcher |
| 30 | + |
29 | 31 | from lib.core.agent import agent |
30 | 32 | from lib.core.common import getUnicode |
31 | 33 | from lib.core.common import preparePageForLineComparison |
32 | 34 | from lib.core.common import randomInt |
33 | 35 | from lib.core.common import randomStr |
34 | 36 | from lib.core.common import readInput |
| 37 | +from lib.core.common import showStaticWords |
35 | 38 | from lib.core.common import DynamicContentItem |
36 | 39 | from lib.core.convert import md5hash |
37 | 40 | from lib.core.data import conf |
|
41 | 44 | from lib.core.exception import sqlmapConnectionException |
42 | 45 | from lib.core.exception import sqlmapNoneDataException |
43 | 46 | from lib.core.exception import sqlmapUserQuitException |
| 47 | +from lib.core.exception import sqlmapSilentQuitException |
44 | 48 | from lib.core.session import setString |
45 | 49 | from lib.core.session import setRegexp |
46 | 50 | from lib.request.connect import Connect as Request |
@@ -251,13 +255,28 @@ def checkStability(): |
251 | 255 | warnMsg += "manual paragraph 'Page comparison' and provide a " |
252 | 256 | warnMsg += "string or regular expression to match on" |
253 | 257 | logger.warn(warnMsg) |
254 | | - |
255 | | - message = "do you still want to continue (possible BAD results)? [Y/n] " |
256 | | - test = readInput(message, default="Y") |
257 | | - if test and test[0] not in ("y", "Y"): |
258 | | - raise sqlmapUserQuitException |
259 | 258 |
|
260 | | - checkDynamicContent(firstPage, secondPage) |
| 259 | + message = "how do you want to proceed? [C(ontinue)/s(tring)/r(egex)/q(uit)] " |
| 260 | + test = readInput(message, default="C") |
| 261 | + if test and test[0] in ("q", "Q"): |
| 262 | + raise sqlmapUserQuitException |
| 263 | + elif test and test[0] in ("s", "S"): |
| 264 | + showStaticWords(firstPage, secondPage) |
| 265 | + message = "please enter value for parameter 'string': " |
| 266 | + test = readInput(message) |
| 267 | + if test: |
| 268 | + conf.string = test |
| 269 | + else: |
| 270 | + raise sqlmapSilentQuitException |
| 271 | + elif test and test[0] in ("r", "R"): |
| 272 | + message = "please enter value for parameter 'regex': " |
| 273 | + test = readInput(message) |
| 274 | + if test: |
| 275 | + conf.regex = test |
| 276 | + else: |
| 277 | + raise sqlmapSilentQuitException |
| 278 | + else: |
| 279 | + checkDynamicContent(firstPage, secondPage) |
261 | 280 |
|
262 | 281 | return condition |
263 | 282 |
|
|
0 commit comments