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. 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.. 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 getpass
import fileinput,re import fileinput,re
import requests import requests
import pdb
class DomainBlocks(): class DomainBlocks():
@ -481,7 +480,17 @@ if __name__ == '__main__':
blocker = DomainBlocks() blocker = DomainBlocks()
software = 'birdsitelive' soft_list = 'software.txt'
soft_file = open(soft_list, 'r')
Lines = soft_file.readlines()
for software in Lines:
software = software.replace('\n', '')
print(f'checking software {software}...')
servers_list = blocker.get_servers(software) servers_list = blocker.get_servers(software)