Ejemplo n.º 1
0
    parser.add_option_group(engines)
    parser.add_option_group(misc)

    opt, _ = parser.parse_args()

    if opt.showCurrentVersion:
        print(VERSION_STRING)
        exit(0)

    # run the setup on the program
    setup(verbose=opt.runInVerbose)

    if not opt.hideBanner:
        print(BANNER)

    start_up()

    if opt.showSqlmapArguments:
        logger.info(set_color(
            "there are a total of {} arguments understood by sqlmap API, "
            "they include:".format(len(SQLMAP_API_OPTIONS))
        ))
        print("\n")
        for arg in SQLMAP_API_OPTIONS:
            print(
                "[*] {}".format(arg)
            )
        print("\n")
        logger.info(set_color(
            "for more information about sqlmap arguments, see here '{}'...".format(
                SQLMAP_MAN_PAGE_URL
Ejemplo n.º 2
0
                        .format(CLONE))
                else:
                    LOGGER.info(
                        "Dagon has successfully updated to the latest version."
                    )
                exit(0)

            # 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:

                start_up(verbose=opt.runInVerbose)

                # Show the options being used at the time of the run if verbose is True
                if opt.runInVerbose:
                    opts_being_used = []
                    for o, v in opt.__dict__.items():
                        if v is not None:
                            opts_being_used.append((o, v))
                    LOGGER.debug("Options being used: {}..".format(
                        dict(opts_being_used)))

                # Benchmark testing
                if opt.runBenchMarkTest:
                    start_time = time.time()

                # Creating random salts and random placements