Beispiel #1
0
def main():
    clear()
    Color.println('{?} Loading Script..')

    check_prereq()

    Color.println('{+} Loading Script..Done!')
    banner()

    if ask('install SecLists'):
        install_sec_list()

    Color.printlnnolog(
        '\n		{!} Sources Might Be Required to Install Meta Packages!')
    if ask('install Kali/Parrot Sources'):
        install_sources()

    if ask('install Kali Meta Packages'):
        kali_metas()

    if ask('install extra Tools?'):
        install_git_repo()
    print('\n\n')
Beispiel #2
0
def kali_metas():
    clear()
    banner()
    options = [('99', 'Continue')]

    from core.metapackages import packages

    count = 0
    for item in packages.items():
        count += 1
        options.append((str(count), str(item[0]).upper()))

    step = 1
    poptions = int(len(options))
    for package in range(1, poptions):
        if step == 1:
            option_str = ('         {G}{D}[{W}{G}%s{D}]{W} : %s' %
                          (options[package][0], options[package][1]))
            if len(option_str) < 66:
                Color.printlnnolog('\n		' + f'{option_str: <77}')
        if step == 2:
            Color.printlnnolog('{G}{D}[{W}{G}%s{D}]{W} : %s\n' %
                               (options[package][0], options[package][1]))
            step = 1
            continue
        step = 2

    Color.writenolog('\n							{G}{D}[{W}{G}%s{D}]{W}{G} :{W} %s {W}' %
                     (options[0]))
    Color.println('\n	{+} Please Choose an Option: ')

    try:
        choice = int(input(''))
        if choice == 99:
            return
        if choice not in range(1, poptions):
            Color.write('	{-} Not a viable option, try again')
            raise ValueError

        option = str(options[choice][1]).lower()
        for apt_package in packages.get(option):
            if apt_package in packages.keys():
                Color.log('Found Dependancy: ' + apt_package +
                          ' installing now..')
                Color.write(
                    '\n\n\n		{!} %s is required for this Meta Package \n\n\n' %
                    apt_package)
                for depend in packages.get(apt_package):
                    os.system('apt-get install -y %s' % depend)
                continue
            try:
                Color.log('Installing apt-package ' + apt_package)
                os.system('apt-get install %s -y' % apt_package)
            except:
                Color.println('')
    except ValueError:
        Color.write('	{-} Please Select an number from the options above')
        time.sleep(1)
        return kali_metas()
    Color.write('\n\n		{+} Cleaning up extra Packages')
    time.sleep(3)
    os.system('apt autoremove -y')

    Color.write('		\n\n{+} Completed installing: ' + option)
    time.sleep(5)
    return kali_metas()