This project automates the process of updating an allow_list.txt
by removing IP addresses listed in remove_list.txt
.
-
Place the
allow_list.txt
andremove_list.txt
files in the same directory as the Python script.allow_list.txt
: Contains the list of allowed IP addresses (one per line).remove_list.txt
: Contains the list of IP addresses to be removed.
-
Run the script by executing the following command in your terminal:
python update_allow_list.py
-
The script will update the
allow_list.txt
by removing the IP addresses listed inremove_list.txt
.
- Python 3.x
allow_list.txt:
192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.4
192.168.1.5
remove_list.txt:
192.168.1.2
192.168.1.4
allow_list.txt:
192.168.1.1
192.168.1.3
192.168.1.5
By following the steps above, you can easily maintain your allow list by removing unwanted IP addresses.