| 8 | print "Sorry. This script requires sudo privledges" |
| 9 | sys.exit() |
| 10 | def main(): |
| 11 | try: |
| 12 | print (''' |
| 13 | |
| 14 | $$\ $$\ $$\ $$\ $$\ |
| 15 | $$ | $$ | $$ | $$ |\__| |
| 16 | $$ |$$ / $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$ |$$\ $$$$$$$\ |
| 17 | $$$$$ / \____$$\ \_$$ _| $$ __$$\ $$ __$$\ $$ |$$ |$$ __$$\ |
| 18 | $$ $$< $$$$$$$ | \033[1;36mKali linux tools installer\033[1;m |$$ |$$ |$$ | $$ | |
| 19 | \033[1;36m$$ |\$$\ $$ __$$ | $$ |$$\ $$ | $$ |$$ | $$ |$$ |$$ |$$ | $$ | |
| 20 | $$ | \$$\ \$$$$$$$ | \$$$$ |\$$$$$$ |\$$$$$$ |$$ |$$ |$$ | $$ | |
| 21 | \__| \__| \_______| \____/ \______/ \______/ \__|\__|\__| \__| V2.0 \033[1;m |
| 22 | |
| 23 | |
| 24 | \033[1;32m+ -- -- +=[ Author: LionSec | Homepage: www.neodrix.com\033[1;m |
| 25 | \033[1;32m+ -- -- +=[ 331 Tools \033[1;m |
| 26 | |
| 27 | |
| 28 | \033[1;91m[W] Before updating your system , please remove all Kali-linux repositories to avoid any kind of problem .\033[1;m |
| 29 | ''') |
| 30 | def inicio1(): |
| 31 | while True: |
| 32 | print (''' |
| 33 | 1) Add Kali repositories & Update |
| 34 | 2) View Categories |
| 35 | 3) Install classicmenu indicator |
| 36 | 4) Install Kali menu |
| 37 | 5) Help |
| 38 | |
| 39 | ''') |
| 40 | |
| 41 | opcion0 = raw_input("\033[1;36mkat > \033[1;m") |
| 42 | |
| 43 | while opcion0 == "1": |
| 44 | print (''' |
| 45 | 1) Add kali linux repositories |
| 46 | 2) Update |
| 47 | 3) Remove all kali linux repositories |
| 48 | 4) View the contents of sources.list file |
| 49 | |
| 50 | ''') |
| 51 | repo = raw_input("\033[1;32mWhat do you want to do ?> \033[1;m") |
| 52 | if repo == "1": |
| 53 | cmd1 = os.system("apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ED444FF07D8D0BF6") |
| 54 | cmd2 = os.system("echo '# Kali linux repositories | Added by Katoolin\ndeb http://http.kali.org/kali kali-rolling main contrib non-free' >> /etc/apt/sources.list") |
| 55 | elif repo == "2": |
| 56 | cmd3 = os.system("apt-get update -m") |
| 57 | elif repo == "3": |
| 58 | infile = "/etc/apt/sources.list" |
| 59 | outfile = "/etc/apt/sources.list" |
| 60 | |
| 61 | delete_list = ["# Kali linux repositories | Added by Katoolin\n", "deb http://http.kali.org/kali kali-rolling main contrib non-free\n"] |
| 62 | fin = open(infile) |
| 63 | os.remove("/etc/apt/sources.list") |
| 64 | fout = open(outfile, "w+") |
| 65 | for line in fin: |
| 66 | for word in delete_list: |
| 67 | line = line.replace(word, "") |