Debian Codegraph @

dirsearch.py

raw
1 #!/usr/bin/env python3
2 #
3 # -*- coding: utf-8 -*-
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 # MA 02110-1301, USA.
18 #
19 # Author: Mauro Soria
20
21 import sys
22
23 from lib.core.data import options
24 from lib.core.options import parse_options
25
26 if sys.version_info < (3, 9):
27 sys.stderr.write("Sorry, dirsearch requires Python 3.9 or higher\n")
28 sys.exit(1)
29
30
31 def main():
32 options.update(parse_options())
33
34 if options["session_file"]:
35 print("Loading a session file will override current options.")
36 if input("[c]ontinue / [q]uit: ") != "c":
37 exit(1)
38
39 from lib.controller.controller import Controller
40
41 Controller()
42
43
44 if __name__ == "__main__":
45 try:
46 main()
47 except KeyboardInterrupt:
48 pass