diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml old mode 100644 new mode 100755 diff --git a/docker-compose.yml b/docker-compose.yml index 06e06851..cea90d25 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -66,7 +66,8 @@ services: - ${DEV_LOCATION}/front/appEvents.php:/app/front/appEvents.php - ${DEV_LOCATION}/front/appEventsCore.php:/app/front/appEventsCore.php - ${DEV_LOCATION}/front/multiEditCore.php:/app/front/multiEditCore.php - - ${DEV_LOCATION}/front/plugins:/app/front/plugins + - ${DEV_LOCATION}/front/plugins:/app/front/plugins + # DELETE END anyone trying to use this file: comment out / delete ABOVE lines, they are only for development purposes # --------------------------------------------------------------------------- environment: diff --git a/docs/API.md b/docs/API.md index 192508e2..46da43ff 100755 --- a/docs/API.md +++ b/docs/API.md @@ -49,6 +49,8 @@ query GetDevices($options: PageQueryOptionsInput) { } ``` +See also: [Debugging GraphQL issues](./DEBUG_GRAPHQL.md) + ### `curl` Command You can use the following `curl` command to execute the query. diff --git a/docs/COMMUNITY_GUIDES.md b/docs/COMMUNITY_GUIDES.md index f93f0e54..c8243118 100755 --- a/docs/COMMUNITY_GUIDES.md +++ b/docs/COMMUNITY_GUIDES.md @@ -2,6 +2,7 @@ Use the official installation guides at first and use community content as supplementary material. Open an issue or PR if you'd like to add your link to the list 🙏 (Ordered by last update time) +- ▶ [Discover & Monitor Your Network with This Self-Hosted Open Source Tool - Lawrence Systems](https://www.youtube.com/watch?v=R3b5cxLZMpo) (June 2025) - ▶ [Home Lab Network Monitoring - Scotti-BYTE Enterprise Consulting Services](https://www.youtube.com/watch?v=0DryhzrQSJA) (July 2024) - 📄 [How to Install NetAlertX on Your Synology NAS - Marius hosting](https://mariushosting.com/how-to-install-pi-alert-on-your-synology-nas/) (Updated frequently) - 📄 [Using the PiAlert Network Security Scanner on a Raspberry Pi - PiMyLifeUp](https://pimylifeup.com/raspberry-pi-pialert/) diff --git a/front/plugins/avahi_scan/avahi_scan.py b/front/plugins/avahi_scan/avahi_scan.py index 5728a8ae..3f4528b4 100755 --- a/front/plugins/avahi_scan/avahi_scan.py +++ b/front/plugins/avahi_scan/avahi_scan.py @@ -58,9 +58,9 @@ def main(): # Retrieve devices if get_setting_value("REFRESH_FQDN"): - devices = device_handler.getUnknown() - else: devices = device_handler.getAll() + else: + devices = device_handler.getUnknown() mylog('verbose', [f'[{pluginName}] Devices count: {len(devices)}']) diff --git a/front/plugins/dig_scan/digscan.py b/front/plugins/dig_scan/digscan.py index 46266282..4ac67cf0 100755 --- a/front/plugins/dig_scan/digscan.py +++ b/front/plugins/dig_scan/digscan.py @@ -56,9 +56,9 @@ def main(): # Retrieve devices if get_setting_value("REFRESH_FQDN"): - devices = device_handler.getUnknown() - else: devices = device_handler.getAll() + else: + devices = device_handler.getUnknown() mylog('verbose', [f'[{pluginName}] Devices count: {len(devices)}']) diff --git a/front/plugins/nbtscan_scan/nbtscan.py b/front/plugins/nbtscan_scan/nbtscan.py index 003aad33..6a4e9fff 100755 --- a/front/plugins/nbtscan_scan/nbtscan.py +++ b/front/plugins/nbtscan_scan/nbtscan.py @@ -58,9 +58,9 @@ def main(): # Retrieve devices if get_setting_value("REFRESH_FQDN"): - devices = device_handler.getUnknown() - else: devices = device_handler.getAll() + else: + devices = device_handler.getUnknown() mylog('verbose', [f'[{pluginName}] Devices count: {len(devices)}']) diff --git a/front/plugins/nslookup_scan/nslookup.py b/front/plugins/nslookup_scan/nslookup.py index dc403250..d0d1c4d4 100755 --- a/front/plugins/nslookup_scan/nslookup.py +++ b/front/plugins/nslookup_scan/nslookup.py @@ -60,9 +60,9 @@ def main(): # Retrieve devices if get_setting_value("REFRESH_FQDN"): - devices = device_handler.getUnknown() - else: devices = device_handler.getAll() + else: + devices = device_handler.getUnknown() mylog('verbose', [f'[{pluginName}] Devices count: {len(devices)}']) diff --git a/front/plugins/unifi_import/script.py b/front/plugins/unifi_import/script.py index dbe2c044..7f7f75d8 100755 --- a/front/plugins/unifi_import/script.py +++ b/front/plugins/unifi_import/script.py @@ -52,7 +52,7 @@ def main(): # init global variables - global UNIFI_USERNAME, UNIFI_PASSWORD, UNIFI_HOST, UNIFI_SITES, PORT, VERIFYSSL, VERSION, FULL_IMPORT + global UNIFI_USERNAME, UNIFI_PASSWORD, UNIFI_HOST, UNIFI_SITES, PORT, VERIFYSSL, VERSION, FULL_IMPORT, API_KEY # parse output plugin_objects = Plugin_Objects(RESULT_FILE) @@ -65,6 +65,10 @@ def main(): VERIFYSSL = get_setting_value("UNFIMP_verifyssl") VERSION = get_setting_value("UNFIMP_version") FULL_IMPORT = get_setting_value("UNFIMP_fullimport") + API_KEY = get_setting_value("UNFIMP_api_key") + + if API_KEY == '': + API_KEY = None plugin_objects = get_entries(plugin_objects) @@ -96,7 +100,28 @@ def get_entries(plugin_objects: Plugin_Objects) -> Plugin_Objects: mylog('verbose', [f'[{pluginName}] site: {site}']) - c = Controller(UNIFI_HOST, UNIFI_USERNAME, UNIFI_PASSWORD, port=PORT, version=VERSION, ssl_verify=VERIFYSSL, site_id=site) + + # def __init__( + # self, + # host, + # username=None, + # password=None, + # port=8443, + # version="v5", + # site_id="default", + # ssl_verify=True, + # api_key=None + # ): + + c = Controller( + UNIFI_HOST, + UNIFI_USERNAME, + UNIFI_PASSWORD, + port=PORT, + version=VERSION, + ssl_verify=VERIFYSSL, + site_id=site, + api_key=API_KEY) online_macs = set() processed_macs = [] diff --git a/front/plugins/vendor_update/script.py b/front/plugins/vendor_update/script.py index 400dec28..996bcf6d 100755 --- a/front/plugins/vendor_update/script.py +++ b/front/plugins/vendor_update/script.py @@ -19,7 +19,7 @@ from plugin_helper import Plugin_Object, Plugin_Objects, decodeBase64, handleEmp from logger import mylog, Logger, append_line_to_file from helper import timeNowTZ, get_setting_value from const import logPath, applicationPath, fullDbPath -from device import query_MAC_vendor +from scan.device_handling import query_MAC_vendor import conf from pytz import timezone