示例#1
0
        LOGGER.fatal(
            "You have failed to provide a flag for to the application and have been "
            "redirected to the help menu.")
        time.sleep(1.7)
        subprocess.call("python dagon.py --help")
    else:
        try:
            # Check that you provided a mandatory argument
            for i, _ in enumerate(sys.argv):
                if sys.argv[i] in required_args:
                    args_in_params += 1
            # If you provided an argument continue..
            if args_in_params > 0:

                if opt.downloadWordList is True:
                    download_rand_wordlist()

                # Benchmark testing
                if opt.runBenchMarkTest is True:
                    start_time = time.time()
                    LOGGER.info("Benchmark test start: {}".format(start_time))

                # Creating random salts and random placements
                if opt.randomSaltAndPlacement is True:
                    salt, placement = random_salt_generator(
                        opt.useCharsAsSalt, opt.useIntAsSalt,
                        opt.saltSizeToUse)
                    LOGGER.info(
                        "Using random salt: '{}' and random placement: '{}'..."
                        .format(salt, placement))
示例#2
0
文件: dagon.py 项目: naylamp6/Dagon
    show_banner() if opt.hideBanner else show_hidden_banner()

    integrity_check()

    if len(sys.argv) <= 1:
        LOGGER.fatal(
            "You have failed to provide a flag to the application and have been redirected to the help menu."
        )
        time.sleep(1.7)
        subprocess.call("python dagon.py --help", shell=True)
    else:
        try:
            # Download a random wordlist
            if opt.downloadWordList or opt.downloadMultiple:
                download_rand_wordlist(verbose=opt.runInVerbose,
                                       multi=opt.downloadMultiple if
                                       opt.downloadMultiple is not None else 1)
                exit(0)

            # Output all supported algorithms
            if opt.showAvailableAlgorithms:
                show_available_algs(show_all=opt.showAllAlgorithms)
                exit(0)

            # Display the version and exit
            if opt.displayVersionInfo:
                LOGGER.info(VERSION_STRING)
                exit(0)

            # Update Dagon
            if opt.updateDagon: