Closed redfodex closed 4 years ago
you can do it via python using this quick script
# opening the black list file
blackList = open('black.list','r')
newList = open('newblack.list','w+')
dnsList = blackList.split("\n")
# adding 127.0.0.1 before each line from the black.list to newblack.list
for d in dnsList :
newList.write("127.0.0.1 "+ d +"\n")
# closing both old and new files
blackList.close()
newList.close()
good luck
Hi. Can you please create a black.list file with 127.0.0.1 at the beginning of each line? I know that this can be done with scripts, but I'm not familiar with linux. I want to add this file to my router's openwrt hosts file. Thank you!