def install(cmd_arguments):
    args = parser.parse_args(cmd_arguments)
    # User asked to select distro (in case it can't be automatically detected) and distro related stuff is installed
    cp = ConfigParser.ConfigParser({"RootDir": root_dir, "Pid": pid})
    cp.read(distros_cfg)

    # Try get the distro automatically
    distro, version, arch = platform.linux_distribution()
    distro_num = 0
    if "kali" in distro.lower():
        distro_num = 1
    elif "samurai" in distro.lower():
        distro_num = 2
    elif is_compatible():
    	distro_num = 3

    # Loop until proper input is received
    while True:
        if distro_num != 0:
            Colorizer.info("[*] %s has been automatically detected... " % distro)
            Colorizer.normal("[*] Continuing in auto-mode")
            break

        if args.no_user_input:
            distro_num = 0
            break

        print("")
        for i, item in enumerate(cp.sections()):
            Colorizer.warning("(%d) %s" % (i + 1, item))
        Colorizer.warning("(0) My distro is not listed :( %s" % distro)

        distro_num = raw_input("Select a number based on your distribution : ")
        try:
            # Checking if valid input is received
            distro_num = int(distro_num)
            break
        except ValueError:
            print('')
            Colorizer.warning("[!] Invalid Number specified")
            continue

    # First all distro independent stuff is installed
    install_restricted_from_cfg(restricted_cfg)
    if distro_num != 0:
        run_command(cp.get(cp.sections()[int(distro_num)-1], "install"))
    else:
        Colorizer.normal("[*] Skipping distro related installation :(")

    # Return if option to install only owtf dependencies is given, as there are optional tools further
    if args.core_only:
        return

    Colorizer.normal("[*] Upgrading pip to the latest version ...")
    # Upgrade pip before install required libraries
    run_command("sudo pip2 install --upgrade pip")
    Colorizer.normal("Upgrading setuptools to the latest version ...")
    # Upgrade setuptools
    run_command("sudo pip2 install --upgrade setuptools")
    Colorizer.normal("Upgrading cffi to the latest version ...")
    # Mitigate cffi errors by upgrading it first
    run_command("sudo pip2 install --upgrade cffi")

    if distro_num == '1':
        # check kali major release number 0.x, 1.x, 2.x
        kali_version = os.popen("cat /etc/issue", "r").read().split(" ")[2][0]
        if kali_version == '1':
            if args.no_user_input:
                fixsetuptools = 'n'
            else:
                fixsetuptools = raw_input("Delete /usr/lib/python2.7/dist-packages/setuptools.egg-info? (y/n)\n(recommended, solves some issues in Kali 1.xx)")

            if fixsetuptools == 'y':
                Colorizer.normal("[*] Backing up the original symlink...")
                ts = time.time()
                human_timestamp = datetime.fromtimestamp(ts).strftime('%Y-%m-%d-%H:%M:%S')

                symlink_orig_path = "/usr/lib/python2.7/dist-packages/setuptools.egg-info"
                run_command("mv %s %s-BACKUP-%s" % (symlink_orig_path, symlink_orig_path, human_timestamp))
                Colorizer.info("[*] The original symlink exists at %s-BACKUP-%s" % (symlink_orig_path, human_timestamp))

                install_using_pip(owtf_pip)
        else:
            Colorizer.warning("[!] Moving on with the installation but you were warned: there may be some errors!")

    install_using_pip(owtf_pip)

    run_command("sudo sh %s init" % (os.path.join(scripts_path, "db_setup.sh")))
    run_command("sudo sh %s" % (os.path.join(scripts_path, "db_run.sh")))
Perform installation of OWTF Framework. Wraps around all helper methods made in this module.
dataset/ETHPy150Open owtf/owtf/install/install.py/install