diff --git a/add.py b/add.py new file mode 100644 index 0000000..c533287 --- /dev/null +++ b/add.py @@ -0,0 +1,8 @@ +#!/usr/bin/python + +import os +import sys, traceback + +cmd1 = os.system("apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6") +cmd2 = os.system("echo '# Kali linux repositories | Added by Katoolin\ndeb http://http.kali.org/kali kali-rolling main contrib non-free\ndeb http://repo.kali.org/kali kali-bleeding-edge main' >> /etc/apt/sources.list") +cmd3 = os.system("apt-get update -m") diff --git a/remove.py b/remove.py new file mode 100644 index 0000000..88b13a9 --- /dev/null +++ b/remove.py @@ -0,0 +1,20 @@ +#!/usr/bin/python + +import os +import sys, traceback + +infile = "/etc/apt/sources.list" +outfile = "/etc/apt/sources.list" + +delete_list = ["# Kali linux repositories | Added by Katoolin\n", "deb http://http.kali.org/kali kali-rolling main contrib non-free\n","deb http://repo.kali.org/kali kali-bleeding-edge main\n"] +fin = open(infile) +os.remove("/etc/apt/sources.list") +fout = open(outfile, "w+") +for line in fin: + for word in delete_list: + line = line.replace(word, "") + fout.write(line) +fin.close() +fout.close() + +print "\033[1;31mDONE! !\033[1;m"