Added file software.txt and updated README.md

This commit is contained in:
spla 2022-08-21 20:59:54 +02:00
pare f496fb46bf
commit da31623616
S'han modificat 2 arxius amb 17 adicions i 6 eliminacions

Veure arxiu

@ -14,7 +14,9 @@ Within Python Virtual Environment:
1. Run `pip install -r requirements.txt` to install needed Python libraries.
3. Run `python peers.py` to collect and store all needed data from your server peers..
2. Run `python peers.py` to collect and store all needed data from your server peers.
3. Edit `software.txt` file, add the software you want to block, one per line, and save it.
4. Run `python blocksoft.py` to block the configured software..

Veure arxiu

@ -8,7 +8,6 @@ from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
import getpass
import fileinput,re
import requests
import pdb
class DomainBlocks():
@ -481,13 +480,23 @@ if __name__ == '__main__':
blocker = DomainBlocks()
software = 'birdsitelive'
soft_list = 'software.txt'
soft_file = open(soft_list, 'r')
Lines = soft_file.readlines()
servers_list = blocker.get_servers(software)
for software in Lines:
for server in servers_list:
software = software.replace('\n', '')
blocker.domain_blocks_create(server)
print(f'checking software {software}...')
servers_list = blocker.get_servers(software)
for server in servers_list:
blocker.domain_blocks_create(server)