Check and set the HashDB SQLite file for query resume functionality.
()
| 434 | break |
| 435 | |
| 436 | def _setHashDB(): |
| 437 | """ |
| 438 | Check and set the HashDB SQLite file for query resume functionality. |
| 439 | """ |
| 440 | |
| 441 | if not conf.hashDBFile: |
| 442 | conf.hashDBFile = conf.sessionFile or os.path.join(conf.outputPath, SESSION_SQLITE_FILE) |
| 443 | |
| 444 | if conf.flushSession: |
| 445 | if os.path.exists(conf.hashDBFile): |
| 446 | if conf.hashDB: |
| 447 | conf.hashDB.closeAll() |
| 448 | |
| 449 | try: |
| 450 | os.remove(conf.hashDBFile) |
| 451 | logger.info("flushing session file") |
| 452 | except OSError as ex: |
| 453 | errMsg = "unable to flush the session file ('%s')" % getSafeExString(ex) |
| 454 | raise SqlmapFilePathException(errMsg) |
| 455 | |
| 456 | conf.hashDB = HashDB(conf.hashDBFile) |
| 457 | |
| 458 | def _resumeHashDBValues(): |
| 459 | """ |
no test coverage detected
searching dependent graphs…