(dbms)
| 350 | class Backend(object): |
| 351 | @staticmethod |
| 352 | def setDbms(dbms): |
| 353 | dbms = aliasToDbmsEnum(dbms) |
| 354 | |
| 355 | if dbms is None: |
| 356 | return None |
| 357 | |
| 358 | # Little precaution, in theory this condition should always be false |
| 359 | elif kb.dbms is not None and kb.dbms != dbms: |
| 360 | warnMsg = "there appears to be a high probability that " |
| 361 | warnMsg += "this could be a false positive case" |
| 362 | logger.warning(warnMsg) |
| 363 | |
| 364 | msg = "sqlmap previously fingerprinted back-end DBMS as " |
| 365 | msg += "%s. However now it has been fingerprinted " % kb.dbms |
| 366 | msg += "as %s. " % dbms |
| 367 | msg += "Please, specify which DBMS should be " |
| 368 | msg += "correct [%s (default)/%s] " % (kb.dbms, dbms) |
| 369 | |
| 370 | while True: |
| 371 | choice = readInput(msg, default=kb.dbms) |
| 372 | |
| 373 | if aliasToDbmsEnum(choice) == kb.dbms: |
| 374 | kb.dbmsVersion = [] |
| 375 | kb.resolutionDbms = kb.dbms |
| 376 | break |
| 377 | elif aliasToDbmsEnum(choice) == dbms: |
| 378 | kb.dbms = aliasToDbmsEnum(choice) |
| 379 | break |
| 380 | else: |
| 381 | warnMsg = "invalid value" |
| 382 | logger.warning(warnMsg) |
| 383 | |
| 384 | elif kb.dbms is None: |
| 385 | kb.dbms = aliasToDbmsEnum(dbms) |
| 386 | |
| 387 | return kb.dbms |
| 388 | |
| 389 | @staticmethod |
| 390 | def setVersion(version): |
no test coverage detected