| 7 | |
| 8 | @with_default_category('Import Category') |
| 9 | class ImportCommand(CommandSet): |
| 10 | def __init__(self) -> None: |
| 11 | super().__init__() |
| 12 | self._core = DataImporter() |
| 13 | if hasattr(cmd2.Cmd,'do_set'): |
| 14 | delattr(cmd2.Cmd, 'do_set') |
| 15 | |
| 16 | if SqlMapSetting().file_input == '': |
| 17 | AnsiPrint.print_locale("import.input_required") |
| 18 | |
| 19 | |
| 20 | def do_run(self, arg): |
| 21 | if SqlMapSetting().file_input is None: |
| 22 | AnsiPrint.print_error("You must specify the directory where the data downloaded by sqlmap is located.") |
| 23 | else: |
| 24 | self._core.start() |
| 25 | |
| 26 | def do_options(self, arg): |
| 27 | AnsiPrint.printSetting(SqlMapSetting().key_name) |
| 28 | |