How gargar3/eggipblocker works
EggIpBlocker is a local SQL Server login-monitoring and Windows Firewall auto-blocker. Its workflow starts a background worker, polls SQL Server error-log rows, filters usernames and IPs against exemptions and prior blocks, then blocks eligible addresses and records them. The README also documents manual firewall-rule removal. The source is a single script, so several components share its path; relationships are based on that excerpt and the documented unblock procedure.
Main entry points: EggsqlIPBlocker.py Polling worker
Components 9
Runtime
- Script startup
EggsqlIPBlocker.py
Detection
- Polling worker
EggsqlIPBlocker.py - DB connection
EggsqlIPBlocker.py
Enforcement
- Login policy
EggsqlIPBlocker.py - Windows Firewall
- Blocked-IP history
EggsqlIPBlocker.py - Block log
EggsqlIPBlocker.py
Other components
- Operator
- SQL Server
Connections 11
- Operator → Script startup: starts
README.md - Script startup → Blocked-IP history: loads history
EggsqlIPBlocker.py - Script startup → Polling worker: starts thread
EggsqlIPBlocker.py - Polling worker → DB connection: opens connection
EggsqlIPBlocker.py - DB connection → SQL Server: connects
EggsqlIPBlocker.py - Polling worker → SQL Server: queries error log
EggsqlIPBlocker.py - Polling worker → Login policy: passes rows
EggsqlIPBlocker.py - Login policy → Windows Firewall: adds block rule
EggsqlIPBlocker.py - Login policy → Blocked-IP history: updates history
EggsqlIPBlocker.py - Login policy → Block log: writes entry
EggsqlIPBlocker.py - Operator → Windows Firewall: removes rule
README.md