fluxion/remove.py

24 lines
663 B
Python
Raw Normal View History

2016-06-12 09:41:09 -06:00
#!/usr/bin/python
2016-10-07 09:42:53 -06:00
from os import remove
2016-06-12 09:41:09 -06:00
infile = "/etc/apt/sources.list"
outfile = "/etc/apt/sources.list"
2016-10-07 09:42:53 -06:00
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"]
2016-08-06 11:10:15 -06:00
delete_list = ["deb http://ftp.de.debian.org/debian/ jessie main contrib"]
2016-06-12 09:41:09 -06:00
fin = open(infile)
2016-10-07 09:42:53 -06:00
remove("/etc/apt/sources.list")
2016-06-12 09:41:09 -06:00
fout = open(outfile, "w+")
for line in fin:
for word in delete_list:
line = line.replace(word, "")
fout.write(line)
fin.close()
fout.close()
2016-10-07 09:42:53 -06:00
print("\033[1;31mDONE! \033[1;m")