Create the dump directory.
()
| 626 | conf.filePath = tempDir |
| 627 | |
| 628 | def _createDumpDir(): |
| 629 | """ |
| 630 | Create the dump directory. |
| 631 | """ |
| 632 | |
| 633 | if not conf.dumpTable and not conf.dumpAll and not conf.search: |
| 634 | return |
| 635 | |
| 636 | conf.dumpPath = safeStringFormat(paths.SQLMAP_DUMP_PATH, conf.hostname) |
| 637 | |
| 638 | if not os.path.isdir(conf.dumpPath): |
| 639 | try: |
| 640 | os.makedirs(conf.dumpPath) |
| 641 | except Exception as ex: |
| 642 | tempDir = tempfile.mkdtemp(prefix="sqlmapdump") |
| 643 | warnMsg = "unable to create dump directory " |
| 644 | warnMsg += "'%s' (%s). " % (conf.dumpPath, getUnicode(ex)) |
| 645 | warnMsg += "Using temporary directory '%s' instead" % getUnicode(tempDir) |
| 646 | logger.warning(warnMsg) |
| 647 | |
| 648 | conf.dumpPath = tempDir |
| 649 | |
| 650 | def _configureDumper(): |
| 651 | conf.dumper = dumper |
no test coverage detected
searching dependent graphs…