Add files via upload

This commit is contained in:
deltax 2016-06-12 16:41:09 +01:00 committed by GitHub
parent 41b7ab9337
commit ae0da3f9c8
2 changed files with 28 additions and 0 deletions

8
add.py Normal file
View File

@ -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")

20
remove.py Normal file
View File

@ -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"