Beispiel #1
0
    def parse_config(self):
        config = DefaultConfigParser()
        config_path = FileUtils.build_path(self.script_path, "default.conf")
        config.read(config_path)

        # General
        self.threads_count = config.safe_getint("general", "threads", 10,
                                                list(range(1, 50)))
        self.redirect = config.safe_getboolean("general", "follow-redirects",
                                               False)

        # Credentials
        self.wordlist = config.safe_get(
            "credentials", "userpass-wordlist",
            FileUtils.build_path(self.script_path, "db", "default.txt"))

        # Connection
        self.use_random_agents = config.safe_get("connection",
                                                 "random-user-agents", False)
        self.useragent = config.safe_get("connection", "user-agent", None)
        self.delay = config.safe_get("connection", "delay", 0)
        self.timeout = config.safe_getint("connection", "timeout", 30)
        self.max_retries = config.safe_getint("connection", "max-retries", 5)
        self.proxy = config.safe_get("connection", "http-proxy", None)
        self.dns_cache = config.safe_get("connection", "dns-cache", False)
Beispiel #2
0
    def __init__(self, script_path):

        global VERSION
        self.script_path = script_path
        self.arguments = self.parse_arguments()
        self.scanners = [HttpAuthScanner, FormDataScanner]
        self.running = False
        self.setup_logger()
        PROGRAM_BANNER = open(
            FileUtils.build_path(script_path, "lib", "controller",
                                 "commandline",
                                 "banner.txt")).read().format(**VERSION)
        print(PROGRAM_BANNER)
        self.exit = False
        self.dictionary = Dictionary()
        self.parse_settings()
        self.print_lock = threading.Lock()
        for wordlist in self.get_wordlists():
            self.dictionary.append_from_wordlist(wordlist)
        self.start_loop()
        self.logger.info("Finished")