Welcome to my scripting sandbox! 🧪 This repository currently contains the script I've created while working through the Google Cybersecurity Professional Certificate. I'm learning hands-on and loving every moment—expect this collection to grow fast!
update_file.py
The first script in this repo is a tool for managing access control through IP address filtering. It demonstrates how to:
-
Read a list of allowed IPs from a file (allow_list.txt)
-
Remove any IPs that match a predefined block list
-
Rewrite the file with the updated list
-
Confirm changes by printing the final contents of the file
This functionality is helpful for basic automation in systems where certain IP addresses need to be revoked or blocked from access—think of it like sweeping unwanted guests from the VIP list! 😎
Here’s a simplified breakdown of what the script does:
-
Takes a file of allowed IP addresses
-
Compares it to a list of disallowed IPs
-
Deletes any matches
-
Saves the cleaned list back into the original file
It's a great practice script for:
-
File handling with Python
-
List manipulation
-
Using conditionals and loops effectively
More scripts are on the way! I’ll be applying new concepts as I progress through my scripting journey! Stay tuned for scripts covering logging, automation, scanning, and more.