mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-03-25 02:43:23 -04:00
- Updated test cases to reflect new column names (eve_MAC -> eveMac, eve_DateTime -> eveDateTime, etc.) across various test files. - Modified SQL table definitions in the database cleanup and migration tests to use camelCase naming conventions. - Implemented migration tests to ensure legacy column names are correctly renamed to camelCase equivalents. - Ensured that existing data is preserved during the migration process and that views referencing old column names are dropped before renaming. - Verified that the migration function is idempotent, allowing for safe re-execution without data loss.
Usage
- Run the Script
python ./db_cleanup.py
- Menu Options
- 1. Check/Clean by MAC address
- Enter a MAC address in the format
xx:xx:xx:xx:xx:xx. - The script will query the database and display any matching entries.
- Confirm to delete the entries if desired.
- Enter a MAC address in the format
- 2. Check/Clean by IP address
- Enter an IP address in the format
xxx.xxx.xxx.xxx. - The script will query the database and display any matching entries.
- Confirm to delete the entries if desired.
- Enter an IP address in the format
- 3. Exit
- Quit the script.
Database Queries
The script checks the following tables:
EventsDevicesCurrentScanNotificationsAppEventsPlugins_Objects
For each MAC or IP address provided, the script:
- Queries the tables for matching entries.
- Prompts to delete the entries if any are found.
Other info
- Version: 1.0
- Release Date: 23-Dec-2024
- Author: laxduke
Note
This is a community supplied script and not maintained.