pax_global_header00006660000000000000000000000064151721614330014515gustar00rootroot0000000000000052 comment=fc5699ab2f1a831939f573459845671e683c57b7 foxey-py-netgear-plus-fec1337/000077500000000000000000000000001517216143300163165ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/.devcontainer.json000066400000000000000000000023221517216143300217470ustar00rootroot00000000000000{ "name": "foxey/py-netgear-plus", "image": "mcr.microsoft.com/devcontainers/python:3.12", "postCreateCommand": "scripts/setup", "customizations": { "vscode": { "extensions": [ "charliermarsh.ruff", "github.vscode-pull-request-github", "ms-python.python", "ms-python.vscode-pylance", "ryanluker.vscode-coverage-gutters", "esbenp.prettier-vscode", "visualstudioexptteam.vscodeintellicode", ], "settings": { "files.eol": "\n", "editor.tabSize": 4, "editor.formatOnPaste": true, "editor.formatOnSave": true, "editor.formatOnType": false, "files.trimTrailingWhitespace": true, "python.analysis.typeCheckingMode": "basic", "python.analysis.autoImportCompletions": true, "python.defaultInterpreterPath": "/usr/local/bin/python", "[python]": { "editor.defaultFormatter": "charliermarsh.ruff" } } } }, "remoteUser": "vscode", "features": {} }foxey-py-netgear-plus-fec1337/.gitattributes000066400000000000000000000000221517216143300212030ustar00rootroot00000000000000* text=auto eol=lffoxey-py-netgear-plus-fec1337/.github/000077500000000000000000000000001517216143300176565ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/.github/ISSUE_TEMPLATE/000077500000000000000000000000001517216143300220415ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/.github/ISSUE_TEMPLATE/bug.yml000066400000000000000000000030571517216143300233460ustar00rootroot00000000000000--- name: "Bug report" description: "Report a bug with the integration" labels: "Bug" body: - type: markdown attributes: value: Before you open a new issue, search through the existing issues to see if others have had the same problem. - type: checkboxes attributes: label: Checklist options: - label: I have enabled debug logging for my installation. required: true - label: I have filled out the issue template to the best of my ability. required: true - label: This issue only contains 1 issue (if you have multiple issues, open one issue for each issue). required: true - label: This issue is not a duplicate issue of any [previous issues](https://github.com/foxey/py-netgear-plus/issues?q=is%3Aissue+label%3A%22Bug%22+). required: true - type: textarea attributes: label: "Describe the issue" description: "A clear and concise description of what the issue is." validations: required: true - type: textarea attributes: label: Reproduction steps description: "Without steps to reproduce, it will be hard to fix. It is very important that you fill out this part. Issues without it will be closed." value: | 1. 2. 3. ... validations: required: true - type: textarea attributes: label: "Debug logs" description: "To enable debug logs add ```python import logging; logging.basicConfig(level=logging.DEBUG)``` to your python code." validations: required: true foxey-py-netgear-plus-fec1337/.github/ISSUE_TEMPLATE/config.yml000066400000000000000000000000331517216143300240250ustar00rootroot00000000000000blank_issues_enabled: falsefoxey-py-netgear-plus-fec1337/.github/ISSUE_TEMPLATE/feature_request.yml000066400000000000000000000033501517216143300257700ustar00rootroot00000000000000--- name: "Feature request" description: "Suggest an idea for this project" labels: "Feature+Request" body: - type: markdown attributes: value: Before you open a new feature request, search through the existing feature requests to see if others have had the same idea. - type: checkboxes attributes: label: Checklist options: - label: I have filled out the template to the best of my ability. required: true - label: This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request). required: true - label: This issue is not a duplicate feature request of [previous feature requests](https://github.com/ckarrie/ha-netgear-plus/issues?q=is%3Aissue+label%3A%22Feature+Request%22+). required: true - type: textarea attributes: label: "Is your feature request related to a problem? Please describe." description: "A clear and concise description of what the problem is." placeholder: "I'm always frustrated when [...]" validations: required: true - type: textarea attributes: label: "Describe the solution you'd like" description: "A clear and concise description of what you want to happen." validations: required: true - type: textarea attributes: label: "Describe alternatives you've considered" description: "A clear and concise description of any alternative solutions or features you've considered." validations: required: true - type: textarea attributes: label: "Additional context" description: "Add any other context or screenshots about the feature request here." validations: required: true foxey-py-netgear-plus-fec1337/.github/ISSUE_TEMPLATE/task.yml000066400000000000000000000011711517216143300235260ustar00rootroot00000000000000--- name: "Task" description: "Define a (sub)task to solve an issue (internal only)" labels: "Task+Internal" body: - type: markdown attributes: value: This issue type is only to be used as a developer to create sub-issues. Newly reported issues of this type will be closed. - type: textarea attributes: label: "Outcome" description: "A detailed description of the desired outcome." validations: required: true - type: textarea attributes: label: "Solution description" description: "Description of the planned solution implementation." validations: required: false foxey-py-netgear-plus-fec1337/.github/dependabot.yml000066400000000000000000000005211517216143300225040ustar00rootroot00000000000000# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" - package-ecosystem: "pip" directory: "/" schedule: interval: "weekly" foxey-py-netgear-plus-fec1337/.github/workflows/000077500000000000000000000000001517216143300217135ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/.github/workflows/ci.yml000066400000000000000000000020001517216143300230210ustar00rootroot00000000000000name: "CI" on: push: branches: - "main" pull_request: branches: - "main" jobs: ci: name: "Ruff and Pytest QA" runs-on: "ubuntu-latest" permissions: id-token: write strategy: matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - name: "Checkout the repository" uses: "actions/checkout@v6.0.2" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6.2.0 with: python-version: ${{ matrix.python-version }} cache: "pip" - name: "Install requirements" run: python3 -m pip install -r requirements.txt - name: "Lint with Ruff" run: python3 -m ruff check . - name: "Check format with Ruff" run: python3 -m ruff format . --check - name: "Install package" run: | python -m pip install -e . - name: "Test package" run: | python -m pytest --cov=src/py_netgear_plus tests foxey-py-netgear-plus-fec1337/.github/workflows/release.yml000066400000000000000000000036611517216143300240640ustar00rootroot00000000000000name: "Release on PyPi and GitHub" on: push: tags: - "v*" jobs: release: name: "Release pushed tag" runs-on: "ubuntu-latest" permissions: id-token: write contents: write steps: - name: "Checkout the repository" uses: "actions/checkout@v6.0.2" - name: "Set up Python" uses: actions/setup-python@v6.2.0 with: python-version: "3.12" cache: "pip" - name: "Install requirements" run: python3 -m pip install -r requirements.txt - name: "Lint with Ruff" run: python3 -m ruff check . - name: "Check format with Ruff" run: python3 -m ruff format . --check - name: "Install package" run: | python -m pip install -e . - name: "Test package" run: | python -m pytest --cov=src/py_netgear_plus tests - name: "Build packages" run: | python -m build if: contains(github.ref, 'refs/tags') - name: "Publish package on PyPi" uses: pypa/gh-action-pypi-publish@v1.14.0 if: contains(github.ref, 'refs/tags') - name: "Create GitHub release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.ref_name }} run: | if [[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "Create release $tag" gh release create "$tag" \ --repo="$GITHUB_REPOSITORY" \ --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ --generate-notes elif [[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(pre|rc)[0-9]+$ ]]; then echo "Create prerelease $tag" gh release create "$tag" \ --repo="$GITHUB_REPOSITORY" \ --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ --prerelease \ --generate-notes else echo "Not releasing $tag" fi foxey-py-netgear-plus-fec1337/.gitignore000066400000000000000000000001731517216143300203070ustar00rootroot00000000000000# artifacts __pycache__ *.pyc *.egg-info build/* dist/* src/secrets.py # misc .coverage coverage.xml .ruff_cache .pypirc foxey-py-netgear-plus-fec1337/.ruff.toml000066400000000000000000000011511517216143300202310ustar00rootroot00000000000000# The contents of this file is based on https://github.com/home-assistant/core/blob/dev/pyproject.toml target-version = "py312" [lint] select = [ "ALL", ] ignore = [ "ANN401", # Dynamically typed expressions (typing.Any) are disallowed "D203", # no-blank-line-before-class (incompatible with formatter) "D212", # multi-line-summary-first-line (incompatible with formatter) "COM812", # incompatible with formatter "ISC001", # incompatible with formatter ] [lint.flake8-pytest-style] fixture-parentheses = false [lint.pyupgrade] keep-runtime-typing = true [lint.mccabe] max-complexity = 25foxey-py-netgear-plus-fec1337/.vscode/000077500000000000000000000000001517216143300176575ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/.vscode/settings.json000066400000000000000000000004421517216143300224120ustar00rootroot00000000000000{ "python.analysis.autoImportCompletions": true, "cSpell.words": [ "netgear", "Netgear" ], "python.testing.pytestArgs": [ "--cov=src/py_netgear_plus tests" ], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true }foxey-py-netgear-plus-fec1337/CONTRIBUTING.md000066400000000000000000000050541517216143300205530ustar00rootroot00000000000000# Contribution guidelines Contributing to this project should be as easy and transparent as possible, whether it's: - Reporting a bug - Discussing the current state of the code - Submitting a fix - Proposing new features ## Project Maintenance The project owner [@foxey](https://github.com/foxey) currently lacks the time to actively review and support this project on a day-to-day basis. To keep the project moving, review duties have been delegated to **Ada**, an AI assistant powered by [NanoClaw](https://github.com/foxey/nanoclaw). Ada will handle: - Reviewing pull requests and posting feedback - Triaging issues - Merging approved contributions Ada acts on behalf of @foxey. Final decisions on architectural changes or significant new features may still be escalated to @foxey directly. If you're unsure whether your question needs a human, just open an issue or PR as usual — Ada will respond. ## Github is used for everything Github is used to host code, to track issues and feature requests, as well as accept pull requests. Pull requests are the best way to propose changes to the codebase. 1. Fork the repo and create your branch from `main`. 2. If you've changed something, update the documentation. 3. Make sure your code lints (using `scripts/lint`). 4. Test you contribution. 5. Issue that pull request! ## Any contributions you make will be under the Apache License In short, when you submit code changes, your submissions are understood to be under the same [Apache License](https://www.apache.org/licenses/LICENSE-2.0) that covers the project. Feel free to contact the maintainers if that's a concern. ## Report bugs using Github's [issues](../../issues) GitHub issues are used to track public bugs. Report a bug by [opening a new issue](../../issues/new/choose); it's that easy! ## Write bug reports with detail, background, and sample code **Great Bug Reports** tend to have: - A quick summary and/or background - Steps to reproduce - Be specific! - Give sample code if you can. - What you expected would happen - What actually happens - Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) People *love* thorough bug reports. I'm not even kidding. ## Use a Consistent Coding Style Use [black](https://github.com/ambv/black) to make sure the code follows the style. ## Test your code modification It comes with development environment in a container, easy to launch if you use Visual Studio Code. ## License By contributing, you agree that your contributions will be licensed under its Apache License. foxey-py-netgear-plus-fec1337/HOWTO_Add_New_Models.md000066400000000000000000000137471517216143300224400ustar00rootroot00000000000000# How to Add Additional Switch Models to py-netgear-plus This guide provides step-by-step instructions on how to add support for additional Netgear Plus switch models to the **py-netgear-plus** Python library. The process involves defining a new switch model class, implementing the necessary attributes and methods, and registering the model in the library. To add a new switch model, you need to update two files: - **models.py**: This file defines various Netgear Plus switch models. Each model is implemented as a class inheriting from `AutodetectedSwitchModel`, with attributes specifying model-specific details. - **parsers.py**: This file contains parsing functions used to extract and interpret data from switch responses. If a new model requires unique parsing logic, it should be added here. --- ## 1. Create a New Class for the Switch Model Each switch model should inherit from `AutodetectedSwitchModel` or from the most similar existing model. Inheriting from a similar model reduces duplication and ensures compatibility with the library's structure. Ensure that `MODEL_NAME` is identical to the class name. Intermediate classes that define logic shared by multiple models should not have a defined `MODEL_NAME` to prevend that `py_netgear_plus.autodetect_model()` finds multiple matching classes. You can create a new switch model class by following the structure below: ```python from typing import ClassVar class GSXYZ(AutodetectedSwitchModel): # Replace GSXYZ with the actual model name """Definition for Netgear GSXYZ model.""" MODEL_NAME = "GSXYZ" # Set the actual model name PORTS = 8 # Define the number of ports on the switch POE_PORTS: ClassVar = [1, 2, 3, 4] # Define PoE ports (if applicable) POE_MAX_POWER_ALL_PORTS = 60 # Define maximum PoE power (if applicable) ALLOWED_COOKIE_TYPES: ClassVar = ["SID"] # Define allowed cookie types CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), # Detection methods ("parse_login_title_tag", ["GSXYZ"]), ] # Mandatory request templates for interacting with the switch LOGIN_TEMPLATE: ClassVar = { "method": "post", "url": "http://{ip}/login.cgi", "params": {"password": "_password_hash"}, } SWITCH_INFO_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/switch_info.cgi"}, ] PORT_STATUS_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/status.cgi"}, ] PORT_STATISTICS_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/portStatistics.cgi"}, ] LOGOUT_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/logout.cgi"}, ] ``` The `LOGIN_TEMPLATE`, `SWITCH_INFO_TEMPLATES`, `PORT_STATUS_TEMPLATES`, and `PORT_STATISTICS_TEMPLATES` are mandatory to implement for proper communication with the switch. Modify the class attributes according to the specific switch model. --- ## 2. Implement Any Additional Model-Specific Methods If the switch model supports additional functionality (such as PoE settings, LED control, etc.), implement the corresponding methods. For example: ```python def get_switch_poe_port_data(self, poe_port: int, state: str) -> dict: """Returns data for enabling/disabling a PoE port.""" return { "ACTION": "Apply", "portID": poe_port - 1, "ADMIN_MODE": 1 if state == "on" else 0, "PORT_PRIO": 0, } ``` Refer to existing switch models in `models.py` for additional examples. ## 3. Create a Parser Class and Register It in `parsers.py` Each switch model has its own parser class. If the new model introduces unique parsing logic, create a new parser class in `parsers.py`. Ensure that this parser class inherits from the most similar existing parser class to maintain consistency. The name of the parser class should be identical to the name of the model in `models.py`. ## 4. Add pages responses to the `pages/` folder The repository contains a collection of page responses used by `pytest` to ensure that no regression problems are introduced during future updates. The structure of the collection is as follows: `pages/MODEL_NAME/0` and `pages/MODE_NAME/1`. Add a copy of each first successful retrieval from these templates: `AUTODETECT_TEMPLATES', `LOGIN_TEMPLATE`, `SWITCH_INFO_TEMPLATES`, `PORT_STATUS_TEMPLATES`, and `PORT_STATISTICS_TEMPLATES`to both directories. Ensure that the response of the login page is the first one sent (most switches redirect to a dashboard page after the initial response) and that the latter three pages are saved using a valid login session (otherwise the only contain a redirect to the login page). Also ensure that for the page retrieved by`PORT_STATISTICS_TEMPLATES`the copy in the`/1`folder is taken 10-60 seconds after the one in the`/0`. The test suite tests if the calculations for the `traffic_rx`and`traffic_tx` speeds are performed correctly. ## 5. Test the New Model and Update Unit Tests 1. Connect the switch to your network. 2. Run the auto-detection feature to verify if the switch is correctly identified. 3. Ensure that all required API endpoints work correctly. 4. If PoE or LED controls are implemented, test them thoroughly. 5. Add unit tests for the new model in the test suite: - Locate the unit test file in `tests/test__init__.py` that contains tests for existing switch models. - Add the new model to the `MODEL_PARAMETERS` list with appropriate test values (rand, crypted password, and response content). - If the model lacks complete test data, add it to `MODELS_FOR_GET_SWITCH_INFOS` with an appropriate `pytest.mark.xfail` annotation. - Run the test suite with `pytest` to confirm all tests pass, and fix any issues as needed. ## 6. Submit a Pull Request Please share the new model code by creating a pull request in the `py-netgear-plus` repository: 1. Fork the repository. 2. Commit your changes with a descriptive message. 3. Push the changes to your forked repository. 4. Submit a pull request with details about the new model. foxey-py-netgear-plus-fec1337/LICENSE.md000066400000000000000000000261351517216143300177310ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. foxey-py-netgear-plus-fec1337/README.md000066400000000000000000000141101517216143300175720ustar00rootroot00000000000000# Python Library for NETGEAR Plus Switches ## What it does Grabs statistical network data from [supported NETGEAR Switches](#supported-and-tested-netgear-modelsproducts-and-firmwares) from the [Plus Managed Network Switch](https://www.netgear.com/business/wired/switches/plus/) line. These switches can only be managed using a Web interface and not through SNMP or cli. This library uses web scraping to collect the switch configuration, statistics and some basic configuration updates. ## How it works 1. Detecting Switch Model/Product in login.cgi 2. Connects to the Switch and asks for a cookie (`http://IP_OF_SWITCH/login.cgi`) 3. HTTP-Request send to the Switch twice (`http://IP_OF_SWITCH/portStatistics.cgi`) and compared with previous data ("in response time") ### List of port statistics | Name | key from `get_switch_infos()` | Unit | | ----------------------------- | ---------------------------------- | ----------------------------------- | | Port {port} Traffic Received | `port_{port}_traffic_rx_mbytes` | MB (in response time) | | Port {port} Traffic Sent | `port_{port}_traffic_tx_mbytes` | MB (in response time) | | Port {port} Receiving | `port_{port}_speed_rx_mbytes` | MB/s | | Port {port} Transferring | `port_{port}_speed_tx_mbytes` | MB/s | | Port {port} IO | `port_{port}_speed_io_mbytes` | MB/s | | Port {port} Total Received | `port_{port}_sum_rx_mbytes` | MB (since last switch reboot/reset) | | Port {port} Total Transferred | `port_{port}_sum_tx_mbytes` | MB (since last switch reboot/reset) | | Port {port} Connection Speed | `port_{port}_connection_speed` | MB/s | | Port {port} Status | `port_{port}_status` | "on"/"off" | | Port {poe_port} POE Power | `port_{poe_port}_poe_power_active` | "on"/"off" | ### List of aggregated statistics | Sensor Name | key from `get_switch_infos()` | Unit | | ----------------------- | ----------------------------- | --------------------- | | Switch IO | `sum_port_speed_bps_io` | MB/s | | Switch Traffic Received | `sum_port_traffic_rx` | MB (in response time) | | Switch Traffic Sent | `sum_port_traffic_tx` | MB (in response time) | ## Supported and tested NETGEAR Models/Products and firmware versions | Model | Ports | Firmware versions | Bootloader versions | | --------- | ----- | -------------------------------------- | ------------------- | | GS105E | 5 | ? | | | GS105Ev2 | 5 | V1.6.0.15 | V1.4.0.5-VB | | GS105PE | 5 | V1.6.0.17 | V1.6.0.2-VB | | GS108E | 8 | V1.00.11 | V1.00.03 | | GS105Ev3 | 5 | ? | | | GS108Ev3 | 8 | V2.00.05, V2.06.10, V2.06.17, V2.06.24 | V2.06.01 - V2.06.03 | | GS108Ev4 | 8 | V1.0.1.3 | | | GS108PEv3 | 8 | V2.06.24 | V0.00.00 | | GS110EMX | 10 | V1.0.2.8 | | | GS116Ev2 | 16 | V2.6.0.48, V2.6.0.50 | | | GS305E | 5 | V1.0.0.16 | V1.0.0.2 | | GS305EP | 5 | V1.0.1.1 | | | GS305EPP | 5 | V1.0.1.4 | | | GS308E | 8 | V1.00.11 | V1.00.03 | | GS308EP | 8 | V1.0.0.10, V1.0.1.4, V2.0.0.5 | | | GS308EPP | 8 | V1.0.1.4 | | | GS308Ev4 | 8 | V1.0.1.3 | | | GS316EP | 16 | V1.0.4.4 | | | GS316EPP | 16 | V1.0.4.4 | | | JGS516PE | 16 | V2.6.0.48 | | | JGS24Ev2 | 24 | V2.6.0.48 | | | MS305E | 5 | v1.0.0.9 | | | MS308E | 8 | v1.0.0.9 | | | XS512EM | 12 | V1.0.2.8 | | Supported firmware languages: GR (German), EN (English) ## Unsupported models | Model | Support status | | -------- | --------------------------------------------------------------- | | JGS524PE | See [#93](https://github.com/ckarrie/ha-netgear-plus/issues/93) | | MS108EUP | See [#91](https://github.com/ckarrie/ha-netgear-plus/issues/91) | `HOWTO_Add_New_Models.md` contains instructions to add unsupported models. ## CLI usage ```shell export NETGEAR_PLUS_PASSWORD=s3cr3t # replace with your password ngp-cli login 192.168.178.68 # replace with IP address of your switch ngp-cli status ngp-cli logout ngp-cli -h ``` ## Library Usage ### Create a python virtual environment ```shell python3 -m venv .venv source .venv/bin/activate pip install py-netgear-plus ``` Using this VENV go to your local source folder ### Example calls ```shell cd src python3 ``` ```python ip = '192.168.178.68' # replace with IP address of your switch p = 'fyce4gKZemkqjDY' # replace with your password import py_netgear_plus sw = py_netgear_plus.NetgearSwitchConnector(ip, p) sw.autodetect_model() sw.get_login_cookie() data = sw.get_switch_infos() print(sw.switch_model.MODEL_NAME) print(data["port_1_sum_rx_mbytes"]) print(data) sw.turn_off_poe_port(1) # Supported only on PoE capable models sw.turn_on_poe_port(1) ``` foxey-py-netgear-plus-fec1337/pages/000077500000000000000000000000001517216143300174155ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS105Ev2/000077500000000000000000000000001517216143300205315ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS105Ev2/0/000077500000000000000000000000001517216143300206705ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS105Ev2/0/device_reboot.cgi000066400000000000000000000030261517216143300241660ustar00rootroot00000000000000 Device Reboot
Check box and click Apply button to reboot switch.
foxey-py-netgear-plus-fec1337/pages/GS105Ev2/0/login.cgi000066400000000000000000000060471517216143300224730ustar00rootroot00000000000000 NETGEAR GS105Ev2
GS105Ev2 – 5-Port Gigabit Ethernet Smart Managed Plus Switch
Password
Login
© NETGEAR, Inc. All rights reserved.
foxey-py-netgear-plus-fec1337/pages/GS105Ev2/0/portStatistics.cgi000066400000000000000000000066701517216143300244240ustar00rootroot00000000000000 Port Statistics
foxey-py-netgear-plus-fec1337/pages/GS105Ev2/0/status.cgi000066400000000000000000000151501517216143300227010ustar00rootroot00000000000000Port Status
Port Bytes Received Bytes Sent CRC Error Packets
1 2941794766 2935721308
2 3790266192 197679212
3 2892169043 3592320234
4 681249536 774263004
5 3488637005 2326198154
Port Port Description Port Status Speed Linked Speed Flow ControlMax MTU
1 Up Auto 1000M Disable 16349
2 Up Auto 1000M Disable 16349
3 Up Auto 1000M Disable 16349
4 Down Auto No Speed Disable 16349
5 Up Auto 1000M Disable 16349
foxey-py-netgear-plus-fec1337/pages/GS105Ev2/0/switch_info.cgi000066400000000000000000000116721517216143300236770ustar00rootroot00000000000000 Switch Information
Product Name GS105Ev2
Switch Name
Serial Number 3MX8785Y02A60
MAC Address B0:39:56:8F:47:4A
Bootloader Version V1.4.0.5-VB
Firmware Version V1.6.0.15
DHCP Mode Refresh
IP Address
Subnet Mask
Gateway Address
foxey-py-netgear-plus-fec1337/pages/GS105Ev2/0/switch_infos.json000066400000000000000000000047151517216143300242710ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "Switch01", "switch_serial_number": "3MX8785Y02A60", "switch_bootloader": "V1.4.0.5-VB", "switch_firmware": "V1.6.0.15", "port_1_description": "", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_1_flow_control": "Disable", "port_2_description": "", "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_2_flow_control": "Disable", "port_3_description": "", "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_3_flow_control": "Disable", "port_4_description": "", "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_4_flow_control": "Disable", "port_5_description": "", "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_5_flow_control": "Disable", "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 33006.57, "port_1_sum_tx_mbytes": 33000.49, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 16675.17, "port_2_sum_tx_mbytes": 8787.61, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 2892.17, "port_3_sum_tx_mbytes": 3592.32, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 681.25, "port_4_sum_tx_mbytes": 9364.2, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 16373.54, "port_5_sum_tx_mbytes": 15211.1, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_5_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS105Ev2/1/000077500000000000000000000000001517216143300206715ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS105Ev2/1/login.cgi000066400000000000000000000060501517216143300224660ustar00rootroot00000000000000 NETGEAR GS105Ev2
GS105Ev2 – 5-Port Gigabit Ethernet Smart Managed Plus Switch
Password
Login
© NETGEAR, Inc. All rights reserved.
foxey-py-netgear-plus-fec1337/pages/GS105Ev2/1/portStatistics.cgi000066400000000000000000000066701517216143300244250ustar00rootroot00000000000000 Port Statistics
foxey-py-netgear-plus-fec1337/pages/GS105Ev2/1/status.cgi000066400000000000000000000151501517216143300227020ustar00rootroot00000000000000Port Status
Port Bytes Received Bytes Sent CRC Error Packets
1 2941988845 2935885862
2 3790433613 197863268
3 2892277147 3592457596
4 681249536 774263004
5 3488657569 2326229860
Port Port Description Port Status Speed Linked Speed Flow ControlMax MTU
1 Up Auto 1000M Disable 16349
2 Up Auto 1000M Disable 16349
3 Up Auto 1000M Disable 16349
4 Down Auto No Speed Disable 16349
5 Up Auto 1000M Disable 16349
foxey-py-netgear-plus-fec1337/pages/GS105Ev2/1/switch_info.cgi000066400000000000000000000116721517216143300237000ustar00rootroot00000000000000 Switch Information
Product Name GS105Ev2
Switch Name
Serial Number 3MX8785Y02A60
MAC Address B0:39:56:8F:47:4A
Bootloader Version V1.4.0.5-VB
Firmware Version V1.6.0.15
DHCP Mode Refresh
IP Address
Subnet Mask
Gateway Address
foxey-py-netgear-plus-fec1337/pages/GS105Ev2/1/switch_infos.json000066400000000000000000000047461517216143300242760ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "Switch01", "switch_serial_number": "3MX8785Y02A60", "switch_bootloader": "V1.4.0.5-VB", "switch_firmware": "V1.6.0.15", "port_1_description": "", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_1_flow_control": "Disable", "port_2_description": "", "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_2_flow_control": "Disable", "port_3_description": "", "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_3_flow_control": "Disable", "port_4_description": "", "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_4_flow_control": "Disable", "port_5_description": "", "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_5_flow_control": "Disable", "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.19, "port_1_traffic_tx_mbytes": 0.16, "port_1_speed_rx_mbytes": 0.19, "port_1_speed_tx_mbytes": 0.16, "port_1_speed_io_mbytes": 0.36, "port_1_sum_rx_mbytes": 33006.76, "port_1_sum_tx_mbytes": 33000.66, "port_2_traffic_rx_mbytes": 0.17, "port_2_traffic_tx_mbytes": 0.18, "port_2_speed_rx_mbytes": 0.17, "port_2_speed_tx_mbytes": 0.18, "port_2_speed_io_mbytes": 0.35, "port_2_sum_rx_mbytes": 16675.34, "port_2_sum_tx_mbytes": 8787.8, "port_3_traffic_rx_mbytes": 0.11, "port_3_traffic_tx_mbytes": 0.14, "port_3_speed_rx_mbytes": 0.11, "port_3_speed_tx_mbytes": 0.14, "port_3_speed_io_mbytes": 0.25, "port_3_sum_rx_mbytes": 2892.28, "port_3_sum_tx_mbytes": 3592.46, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 681.25, "port_4_sum_tx_mbytes": 9364.2, "port_5_traffic_rx_mbytes": 0.02, "port_5_traffic_tx_mbytes": 0.03, "port_5_speed_rx_mbytes": 0.02, "port_5_speed_tx_mbytes": 0.03, "port_5_speed_io_mbytes": 0.05, "port_5_sum_rx_mbytes": 16373.56, "port_5_sum_tx_mbytes": 15211.13, "sum_port_traffic_rx": 0.49, "sum_port_traffic_tx": 0.52, "sum_port_speed_rx": 0.49, "sum_port_speed_tx": 0.52, "sum_port_speed_io": 1.01, "port_5_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS105PE/000077500000000000000000000000001517216143300204015ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS105PE/0/000077500000000000000000000000001517216143300205405ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS105PE/0/login.cgi000066400000000000000000000060661517216143300223440ustar00rootroot00000000000000 NETGEAR GS105PE
GS105PE – 5-Port Gigabit Ethernet Smart Managed Plus Switch (PoE Pass-Thru)
Password
Login
© NETGEAR, Inc. All rights reserved.
foxey-py-netgear-plus-fec1337/pages/GS105PE/0/portStatistics.cgi000066400000000000000000000066571517216143300243010ustar00rootroot00000000000000 Port Statistics
foxey-py-netgear-plus-fec1337/pages/GS105PE/0/status.cgi000066400000000000000000000152171517216143300225550ustar00rootroot00000000000000 Port Status
Port Bytes Received Bytes Sent CRC Error Packets
1 4015730058 3595230089
2 4214080008 744086718
3 0 0
4 1413899239 852542720
5 2828228358 2291979244
Port Port Description Port Status Speed Linked Speed Flow ControlMax MTU
1 LDLHome-Mansarda Up Auto 1000M Disable 16349
2 BalconePiano Up Auto 100M Disable 16349
3 SPARE Down Auto No Speed Disable 16349
4 TV Up Auto 1000M Disable 16349
5 TRUNK Up Auto 1000M Disable 16349
foxey-py-netgear-plus-fec1337/pages/GS105PE/0/switch_info.cgi000066400000000000000000000116131517216143300235420ustar00rootroot00000000000000 Switch Information
Product Name GS105PE
Switch Name
Serial Number FFFFFFFFFFFFF
MAC Address FF:FF:FF:FF:FF:FF
Bootloader Version V1.6.0.2-VB
Firmware Version V1.6.0.17
DHCP Mode Refresh
IP Address
Subnet Mask
Gateway Address
foxey-py-netgear-plus-fec1337/pages/GS105PE/0/switch_infos.json000066400000000000000000000047731517216143300241450ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "", "switch_serial_number": "FFFFFFFFFFFFF", "switch_bootloader": "V1.6.0.2-VB", "switch_firmware": "V1.6.0.17", "port_1_description": "LDLHome-Mansarda", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_1_flow_control": "Disable", "port_2_description": "BalconePiano", "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 100, "port_2_flow_control": "Disable", "port_3_description": "SPARE", "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_3_flow_control": "Disable", "port_4_description": "TV", "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_4_flow_control": "Disable", "port_5_description": "TRUNK", "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_5_flow_control": "Disable", "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 5772156.81, "port_1_sum_tx_mbytes": 5080246.57, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 1236869.69, "port_2_sum_tx_mbytes": 121003.17, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 4038683.16, "port_4_sum_tx_mbytes": 2028077.11, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 6977855.12, "port_5_sum_tx_mbytes": 11053242.83, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_5_crc_errors": 0, "sum_port_crc_errors": 0 } foxey-py-netgear-plus-fec1337/pages/GS105PE/1/000077500000000000000000000000001517216143300205415ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS105PE/1/login.cgi000066400000000000000000000060661517216143300223450ustar00rootroot00000000000000 NETGEAR GS105PE
GS105PE – 5-Port Gigabit Ethernet Smart Managed Plus Switch (PoE Pass-Thru)
Password
Login
© NETGEAR, Inc. All rights reserved.
foxey-py-netgear-plus-fec1337/pages/GS105PE/1/portStatistics.cgi000066400000000000000000000066571517216143300243020ustar00rootroot00000000000000 Port Statistics
foxey-py-netgear-plus-fec1337/pages/GS105PE/1/status.cgi000066400000000000000000000152171517216143300225560ustar00rootroot00000000000000 Port Status
Port Bytes Received Bytes Sent CRC Error Packets
1 4015830058 3595430089
2 4214380008 744686718
3 0 0
4 1413899839 852572720
5 2828328358 2295979244
Port Port Description Port Status Speed Linked Speed Flow ControlMax MTU
1 LDLHome-Mansarda Up Auto 1000M Disable 16349
2 BalconePiano Up Auto 100M Disable 16349
3 SPARE Down Auto No Speed Disable 16349
4 TV Up Auto 1000M Disable 16349
5 TRUNK Up Auto 1000M Disable 16349
foxey-py-netgear-plus-fec1337/pages/GS105PE/1/switch_info.cgi000066400000000000000000000116131517216143300235430ustar00rootroot00000000000000 Switch Information
Product Name GS105PE
Switch Name
Serial Number FFFFFFFFFFFFF
MAC Address FF:FF:FF:FF:FF:FF
Bootloader Version V1.6.0.2-VB
Firmware Version V1.6.0.17
DHCP Mode Refresh
IP Address
Subnet Mask
Gateway Address
foxey-py-netgear-plus-fec1337/pages/GS105PE/1/switch_infos.json000066400000000000000000000050031517216143300241310ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "", "switch_serial_number": "FFFFFFFFFFFFF", "switch_bootloader": "V1.6.0.2-VB", "switch_firmware": "V1.6.0.17", "port_1_description": "LDLHome-Mansarda", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_1_flow_control": "Disable", "port_2_description": "BalconePiano", "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 100, "port_2_flow_control": "Disable", "port_3_description": "SPARE", "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_3_flow_control": "Disable", "port_4_description": "TV", "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_4_flow_control": "Disable", "port_5_description": "TRUNK", "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_5_flow_control": "Disable", "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.1, "port_1_traffic_tx_mbytes": 0.2, "port_1_speed_rx_mbytes": 0.1, "port_1_speed_tx_mbytes": 0.2, "port_1_speed_io_mbytes": 0.3, "port_1_sum_rx_mbytes": 5772156.91, "port_1_sum_tx_mbytes": 5080246.77, "port_2_traffic_rx_mbytes": 0.3, "port_2_traffic_tx_mbytes": 0.6, "port_2_speed_rx_mbytes": 0.3, "port_2_speed_tx_mbytes": 0.6, "port_2_speed_io_mbytes": 0.9, "port_2_sum_rx_mbytes": 1236869.99, "port_2_sum_tx_mbytes": 121003.77, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.03, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.03, "port_4_speed_io_mbytes": 0.03, "port_4_sum_rx_mbytes": 4038683.16, "port_4_sum_tx_mbytes": 2028077.14, "port_5_traffic_rx_mbytes": 0.1, "port_5_traffic_tx_mbytes": 4.0, "port_5_speed_rx_mbytes": 0.1, "port_5_speed_tx_mbytes": 4.0, "port_5_speed_io_mbytes": 4.1, "port_5_sum_rx_mbytes": 6977855.22, "port_5_sum_tx_mbytes": 11053246.83, "sum_port_traffic_rx": 0.5, "sum_port_traffic_tx": 4.83, "sum_port_speed_rx": 0.5, "sum_port_speed_tx": 4.83, "sum_port_speed_io": 5.33, "port_5_crc_errors": 10, "sum_port_crc_errors": 11 } foxey-py-netgear-plus-fec1337/pages/GS108Ev3/000077500000000000000000000000001517216143300205355ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS108Ev3/0/000077500000000000000000000000001517216143300206745ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS108Ev3/0/device_reboot.cgi000066400000000000000000000030261517216143300241720ustar00rootroot00000000000000 Device Reboot
Check box and click Apply button to reboot switch.
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/0/index.htm000066400000000000000000000062421517216143300225210ustar00rootroot00000000000000 NETGEAR GS108Ev3
GS108Ev3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/0/login.cgi000066400000000000000000000062751517216143300225020ustar00rootroot00000000000000 NETGEAR GS108Ev3
GS108Ev3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/0/login.htm000066400000000000000000000062421517216143300225220ustar00rootroot00000000000000 NETGEAR GS108Ev3
GS108Ev3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/0/portStatistics.cgi000066400000000000000000000102171517216143300244200ustar00rootroot00000000000000 Port Statistics
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/0/status.htm000066400000000000000000000166171517216143300227440ustar00rootroot00000000000000Port Status
Port Empfangene Bytes Gesendete Bytes Pakete mit CRC-Fehlern
1
2
3
4
5
6
7
8
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/0/switch_info.cgi000066400000000000000000000004671517216143300237030ustar00rootroot00000000000000NETGEAR GS108Ev3 foxey-py-netgear-plus-fec1337/pages/GS108Ev3/0/switch_info.htm000066400000000000000000000155501517216143300237300ustar00rootroot00000000000000Switch Information
Port Portstatus Geschwindigkeit Verbindungsgeschwindigkeit Flusssteuerung Max. MTU
1 Inaktiv Auto Nicht verbunden Deaktiviert 9702
2 Aktiv Auto 1000M Deaktiviert 9702
3 Aktiv Auto 1000M Deaktiviert 9702
4 Inaktiv Auto Nicht verbunden Deaktiviert 9702
5 Aktiv Auto 1000M Deaktiviert 9702
6 Aktiv Auto 1000M Deaktiviert 9702
7 Aktiv Auto 1000M Deaktiviert 9702
8 Inaktiv Auto Nicht verbunden Deaktiviert 9702
Produktname GS108Ev3
Switch-Name
Seriennummer 3UH1535V029F0
MAC-Adresse A0:63:91:6E:0D:82
Bootloader-Version V0.00.00
Firmwareversion V2.06.24GR
DHCP-Modus Aktualisieren
IP-Adresse
Subnetzmaske
Gateway-Adresse
Energiesparmodus Deaktiviert Aktiviert
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/0/switch_infos.json000066400000000000000000000061771517216143300243010ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS108Ev3-safe", "switch_serial_number": "3UH1535V029F0", "switch_bootloader": "V0.00.00", "switch_firmware": "V2.06.24GR", "port_1_status": "off", "port_1_modus_speed": true, "port_1_connection_speed": 0, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 1000, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 1000, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 0.0, "port_1_sum_tx_mbytes": 0.0, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 66229.7, "port_2_sum_tx_mbytes": 849396.7, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 103921.68, "port_3_sum_tx_mbytes": 560347.41, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 1221.26, "port_5_sum_tx_mbytes": 75781.64, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 207.62, "port_6_sum_tx_mbytes": 4293.33, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 1474598.86, "port_7_sum_tx_mbytes": 169552.51, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 0.0, "port_8_sum_tx_mbytes": 0.0, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS108Ev3/1/000077500000000000000000000000001517216143300206755ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS108Ev3/1/index.htm000066400000000000000000000062421517216143300225220ustar00rootroot00000000000000 NETGEAR GS108Ev3
GS108Ev3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/1/login.cgi000066400000000000000000000062751517216143300225030ustar00rootroot00000000000000 NETGEAR GS108Ev3
GS108Ev3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/1/login.htm000066400000000000000000000062421517216143300225230ustar00rootroot00000000000000 NETGEAR GS108Ev3
GS108Ev3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/1/portStatistics.cgi000066400000000000000000000102171517216143300244210ustar00rootroot00000000000000 Port Statistics
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/1/status.htm000066400000000000000000000166171517216143300227450ustar00rootroot00000000000000Port Status
Port Empfangene Bytes Gesendete Bytes Pakete mit CRC-Fehlern
1
2
3
4
5
6
7
8
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/1/switch_info.cgi000066400000000000000000000004671517216143300237040ustar00rootroot00000000000000NETGEAR GS108Ev3 foxey-py-netgear-plus-fec1337/pages/GS108Ev3/1/switch_info.htm000066400000000000000000000155501517216143300237310ustar00rootroot00000000000000Switch Information
Port Portstatus Geschwindigkeit Verbindungsgeschwindigkeit Flusssteuerung Max. MTU
1 Inaktiv Auto Nicht verbunden Deaktiviert 9702
2 Aktiv Auto 1000M Deaktiviert 9702
3 Aktiv Auto 1000M Deaktiviert 9702
4 Inaktiv Auto Nicht verbunden Deaktiviert 9702
5 Aktiv Auto 1000M Deaktiviert 9702
6 Aktiv Auto 1000M Deaktiviert 9702
7 Aktiv Auto 1000M Deaktiviert 9702
8 Inaktiv Auto Nicht verbunden Deaktiviert 9702
Produktname GS108Ev3
Switch-Name
Seriennummer 3UH1535V029F0
MAC-Adresse A0:63:91:6E:0D:82
Bootloader-Version V0.00.00
Firmwareversion V2.06.24GR
DHCP-Modus Aktualisieren
IP-Adresse
Subnetzmaske
Gateway-Adresse
Energiesparmodus Deaktiviert Aktiviert
foxey-py-netgear-plus-fec1337/pages/GS108Ev3/1/switch_infos.json000066400000000000000000000062361517216143300242760ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS108Ev3-safe", "switch_serial_number": "3UH1535V029F0", "switch_bootloader": "V0.00.00", "switch_firmware": "V2.06.24GR", "port_1_status": "off", "port_1_modus_speed": true, "port_1_connection_speed": 0, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 1000, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 1000, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 0.0, "port_1_sum_tx_mbytes": 0.0, "port_2_traffic_rx_mbytes": 0.07, "port_2_traffic_tx_mbytes": 0.02, "port_2_speed_rx_mbytes": 0.07, "port_2_speed_tx_mbytes": 0.02, "port_2_speed_io_mbytes": 0.08, "port_2_sum_rx_mbytes": 66229.76, "port_2_sum_tx_mbytes": 849396.71, "port_3_traffic_rx_mbytes": 0.01, "port_3_traffic_tx_mbytes": 0.04, "port_3_speed_rx_mbytes": 0.01, "port_3_speed_tx_mbytes": 0.04, "port_3_speed_io_mbytes": 0.05, "port_3_sum_rx_mbytes": 103921.69, "port_3_sum_tx_mbytes": 560347.45, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.05, "port_5_traffic_tx_mbytes": 0.02, "port_5_speed_rx_mbytes": 0.05, "port_5_speed_tx_mbytes": 0.02, "port_5_speed_io_mbytes": 0.07, "port_5_sum_rx_mbytes": 1221.31, "port_5_sum_tx_mbytes": 75781.66, "port_6_traffic_rx_mbytes": 0.06, "port_6_traffic_tx_mbytes": 0.04, "port_6_speed_rx_mbytes": 0.06, "port_6_speed_tx_mbytes": 0.04, "port_6_speed_io_mbytes": 0.1, "port_6_sum_rx_mbytes": 207.67, "port_6_sum_tx_mbytes": 4293.37, "port_7_traffic_rx_mbytes": 0.05, "port_7_traffic_tx_mbytes": 0.03, "port_7_speed_rx_mbytes": 0.05, "port_7_speed_tx_mbytes": 0.03, "port_7_speed_io_mbytes": 0.08, "port_7_sum_rx_mbytes": 1474598.91, "port_7_sum_tx_mbytes": 169552.55, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 0.0, "port_8_sum_tx_mbytes": 0.0, "sum_port_traffic_rx": 0.23, "sum_port_traffic_tx": 0.15, "sum_port_speed_rx": 0.23, "sum_port_speed_tx": 0.15, "sum_port_speed_io": 0.38, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS108Ev4/000077500000000000000000000000001517216143300205365ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS108Ev4/0/000077500000000000000000000000001517216143300206755ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS108Ev4/0/dashboard.cgi000066400000000000000000000713251517216143300233200ustar00rootroot00000000000000
ml396
GS108Ev4_Buero_Ib
#
ml180
ml035
ml565
ml089
V1.0.1.3
ml550
ml791
ml656
ml678
54:07:7D:2A:8F:A4
ml198
7H814A5FA0146
ml040
GS108Ev4
Language
ON ml389
OFFml293
ONml351
ml257 ml067 192.168.50.237
LAG 1: (ml394 )
LAG 2: (ml394 )
LAG
ml495
  • UP 1
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 2
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 3
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 4
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 5
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 6
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 7
    ml510
    Auto
    ml382
    10M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 8
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
foxey-py-netgear-plus-fec1337/pages/GS108Ev4/0/login.cgi000066400000000000000000000041671517216143300225010ustar00rootroot00000000000000 NETGEAR GS108Ev4
GS108Ev4
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.


foxey-py-netgear-plus-fec1337/pages/GS108Ev4/0/portStatistics.cgi000066400000000000000000000063441517216143300244270ustar00rootroot00000000000000
ml446
  • ml578ml711ml466ml563
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
foxey-py-netgear-plus-fec1337/pages/GS108Ev4/0/switch_infos.json000066400000000000000000000061601517216143300242720ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS108Ev4_Buero_Ib", "switch_serial_number": "7H814A5FA0146", "switch_bootloader": "unknown", "switch_firmware": "V1.0.1.3", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "off", "port_2_modus_speed": true, "port_2_connection_speed": 0, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 1000, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 10, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 3209.36, "port_1_sum_tx_mbytes": 643.13, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 0.0, "port_2_sum_tx_mbytes": 0.0, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 3612.06, "port_3_sum_tx_mbytes": 4231.79, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.34, "port_5_sum_tx_mbytes": 46.76, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 4256.54, "port_6_sum_tx_mbytes": 1422.91, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 1058.47, "port_7_sum_tx_mbytes": 1735.27, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 3.65, "port_8_sum_tx_mbytes": 3.78, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS108Ev4/1/000077500000000000000000000000001517216143300206765ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS108Ev4/1/dashboard.cgi000066400000000000000000000713251517216143300233210ustar00rootroot00000000000000
ml396
GS108Ev4_Buero_Ib
#
ml180
ml035
ml565
ml089
V1.0.1.3
ml550
ml791
ml656
ml678
54:07:7D:2A:8F:A4
ml198
7H814A5FA0146
ml040
GS108Ev4
Language
ON ml389
OFFml293
ONml351
ml257 ml067 192.168.50.237
LAG 1: (ml394 )
LAG 2: (ml394 )
LAG
ml495
  • UP 1
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 2
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 3
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 4
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 5
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 6
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 7
    ml510
    Auto
    ml382
    10M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 8
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
foxey-py-netgear-plus-fec1337/pages/GS108Ev4/1/portStatistics.cgi000066400000000000000000000063441517216143300244300ustar00rootroot00000000000000
ml446
  • ml578ml711ml466ml563
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
foxey-py-netgear-plus-fec1337/pages/GS108Ev4/1/switch_infos.json000066400000000000000000000062161517216143300242750ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS108Ev4_Buero_Ib", "switch_serial_number": "7H814A5FA0146", "switch_bootloader": "unknown", "switch_firmware": "V1.0.1.3", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "off", "port_2_modus_speed": true, "port_2_connection_speed": 0, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 1000, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 10, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.66, "port_1_traffic_tx_mbytes": 16.23, "port_1_speed_rx_mbytes": 0.66, "port_1_speed_tx_mbytes": 16.23, "port_1_speed_io_mbytes": 16.88, "port_1_sum_rx_mbytes": 3210.02, "port_1_sum_tx_mbytes": 659.36, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 0.0, "port_2_sum_tx_mbytes": 0.0, "port_3_traffic_rx_mbytes": 16.21, "port_3_traffic_tx_mbytes": 0.79, "port_3_speed_rx_mbytes": 16.21, "port_3_speed_tx_mbytes": 0.79, "port_3_speed_io_mbytes": 17.0, "port_3_sum_rx_mbytes": 3628.27, "port_3_sum_tx_mbytes": 4232.58, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.34, "port_5_sum_tx_mbytes": 46.76, "port_6_traffic_rx_mbytes": 0.07, "port_6_traffic_tx_mbytes": 0.08, "port_6_speed_rx_mbytes": 0.07, "port_6_speed_tx_mbytes": 0.08, "port_6_speed_io_mbytes": 0.15, "port_6_sum_rx_mbytes": 4256.61, "port_6_sum_tx_mbytes": 1422.99, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 1058.47, "port_7_sum_tx_mbytes": 1735.27, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 3.65, "port_8_sum_tx_mbytes": 3.78, "sum_port_traffic_rx": 16.94, "sum_port_traffic_tx": 17.11, "sum_port_speed_rx": 16.94, "sum_port_speed_tx": 17.11, "sum_port_speed_io": 34.05, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS108PEv3/000077500000000000000000000000001517216143300206555ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS108PEv3/0/000077500000000000000000000000001517216143300210145ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS108PEv3/0/login.cgi000066400000000000000000000062431517216143300226150ustar00rootroot00000000000000 NETGEAR GS108PEv3
GS108PEv3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS108PEv3/0/login.htm000066400000000000000000000062431517216143300226430ustar00rootroot00000000000000 NETGEAR GS108PEv3
GS108PEv3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS108PEv3/0/port_statistics.htm000066400000000000000000000101241517216143300247620ustar00rootroot00000000000000 Port Statistics
foxey-py-netgear-plus-fec1337/pages/GS108PEv3/0/status.htm000066400000000000000000000166411517216143300230610ustar00rootroot00000000000000Port Status
Port Empfangene Bytes Gesendete Bytes Pakete mit CRC-Fehlern
1
2
3
4
5
6
7
8
foxey-py-netgear-plus-fec1337/pages/GS108PEv3/0/switch_info.htm000066400000000000000000000155511517216143300240510ustar00rootroot00000000000000Switch Information
Port Portstatus Geschwindigkeit Verbindungsgeschwindigkeit Flusssteuerung Max. MTU
1 Inaktiv Auto Nicht verbunden Deaktiviert 9702
2 Inaktiv Auto Nicht verbunden Deaktiviert 9702
3 Inaktiv Auto Nicht verbunden Deaktiviert 9702
4 Inaktiv Auto Nicht verbunden Deaktiviert 9702
5 Aktiv Auto 100M Deaktiviert 9702
6 Aktiv Auto 10M Deaktiviert 9702
7 Aktiv Auto 1000M Deaktiviert 9702
8 Aktiv Auto 1000M Deaktiviert 9702
Produktname GS108PEv3
Switch-Name
Seriennummer 3UH1234V000A0
MAC-Adresse A0:63:01:02:03:04
Bootloader-Version V0.00.00
Firmwareversion V2.06.24GR
DHCP-Modus Aktualisieren
IP-Adresse
Subnetzmaske
Gateway-Adresse
Energiesparmodus Deaktiviert Aktiviert
foxey-py-netgear-plus-fec1337/pages/GS108PEv3/0/switch_infos.json000066400000000000000000000061171517216143300244130ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS108PEv3-safe", "switch_serial_number": "3UH1234V000A0", "switch_bootloader": "V0.00.00", "switch_firmware": "V2.06.24GR", "port_1_status": "off", "port_1_modus_speed": true, "port_1_connection_speed": 0, "port_2_status": "off", "port_2_modus_speed": true, "port_2_connection_speed": 0, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 100, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 10, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 1000, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 0.0, "port_1_sum_tx_mbytes": 0.0, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 0.0, "port_2_sum_tx_mbytes": 0.0, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.0, "port_5_sum_tx_mbytes": 2.21, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 2.21, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 1.48, "port_7_sum_tx_mbytes": 6.97, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 7.04, "port_8_sum_tx_mbytes": 1.69, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS108PEv3/1/000077500000000000000000000000001517216143300210155ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS108PEv3/1/login.cgi000066400000000000000000000062431517216143300226160ustar00rootroot00000000000000 NETGEAR GS108PEv3
GS108PEv3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS108PEv3/1/login.htm000066400000000000000000000062431517216143300226440ustar00rootroot00000000000000 NETGEAR GS108PEv3
GS108PEv3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS108PEv3/1/port_statistics.htm000066400000000000000000000101241517216143300247630ustar00rootroot00000000000000 Port Statistics
foxey-py-netgear-plus-fec1337/pages/GS108PEv3/1/status.htm000066400000000000000000000166411517216143300230620ustar00rootroot00000000000000Port Status
Port Empfangene Bytes Gesendete Bytes Pakete mit CRC-Fehlern
1
2
3
4
5
6
7
8
foxey-py-netgear-plus-fec1337/pages/GS108PEv3/1/switch_info.htm000066400000000000000000000155511517216143300240520ustar00rootroot00000000000000Switch Information
Port Portstatus Geschwindigkeit Verbindungsgeschwindigkeit Flusssteuerung Max. MTU
1 Inaktiv Auto Nicht verbunden Deaktiviert 9702
2 Inaktiv Auto Nicht verbunden Deaktiviert 9702
3 Inaktiv Auto Nicht verbunden Deaktiviert 9702
4 Inaktiv Auto Nicht verbunden Deaktiviert 9702
5 Aktiv Auto 100M Deaktiviert 9702
6 Aktiv Auto 10M Deaktiviert 9702
7 Aktiv Auto 1000M Deaktiviert 9702
8 Aktiv Auto 1000M Deaktiviert 9702
Produktname GS108PEv3
Switch-Name
Seriennummer 3UH1234V000A0
MAC-Adresse A0:63:01:02:03:04
Bootloader-Version V0.00.00
Firmwareversion V2.06.24GR
DHCP-Modus Aktualisieren
IP-Adresse
Subnetzmaske
Gateway-Adresse
Energiesparmodus Deaktiviert Aktiviert
foxey-py-netgear-plus-fec1337/pages/GS108PEv3/1/switch_infos.json000066400000000000000000000061371517216143300244160ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS108PEv3-safe", "switch_serial_number": "3UH1234V000A0", "switch_bootloader": "V0.00.00", "switch_firmware": "V2.06.24GR", "port_1_status": "off", "port_1_modus_speed": true, "port_1_connection_speed": 0, "port_2_status": "off", "port_2_modus_speed": true, "port_2_connection_speed": 0, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 100, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 10, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 1000, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 0.0, "port_1_sum_tx_mbytes": 0.0, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 0.0, "port_2_sum_tx_mbytes": 0.0, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.07, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.07, "port_5_speed_io_mbytes": 0.07, "port_5_sum_rx_mbytes": 2.21, "port_5_sum_tx_mbytes": 2.28, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.13, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.13, "port_6_speed_io_mbytes": 0.13, "port_6_sum_rx_mbytes": 2.21, "port_6_sum_tx_mbytes": 2.35, "port_7_traffic_rx_mbytes": 0.2, "port_7_traffic_tx_mbytes": 0.33, "port_7_speed_rx_mbytes": 0.2, "port_7_speed_tx_mbytes": 0.33, "port_7_speed_io_mbytes": 0.52, "port_7_sum_rx_mbytes": 1.68, "port_7_sum_tx_mbytes": 7.3, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 1.05, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 1.05, "port_8_speed_io_mbytes": 1.05, "port_8_sum_rx_mbytes": 7.04, "port_8_sum_tx_mbytes": 2.74, "sum_port_traffic_rx": 0.2, "sum_port_traffic_tx": 1.57, "sum_port_speed_rx": 0.2, "sum_port_speed_tx": 1.57, "sum_port_speed_io": 1.77, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS110EMX/000077500000000000000000000000001517216143300205225ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS110EMX/0/000077500000000000000000000000001517216143300206615ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS110EMX/0/homepage.html000066400000000000000000000000751517216143300233360ustar00rootroot00000000000000 foxey-py-netgear-plus-fec1337/pages/GS110EMX/0/interface_stats.html000066400000000000000000000100401517216143300247200ustar00rootroot00000000000000 Port Statistics
Port Bytes Received Bytes Sent CRC Error Packets
1 0 0 0
2 0 0 0
3 554000 299600000 0
4 277240826 7149758405 0
5 17476953 406116633 0
6 0 0 0
7 4786761 297420168 0
8 1505721191 998676543 0
9 7535987654 2596695809 0
10 10236221545 9347285586 0
foxey-py-netgear-plus-fec1337/pages/GS110EMX/0/login.htm000066400000000000000000000076521517216143300225150ustar00rootroot00000000000000 NETGEAR GS110EMX
GS110EMX - 8-Port Gigabit Ethernet Smart Managed Plus Switch with 2-Port 10G/Multi-Gig Uplinks
Password

foxey-py-netgear-plus-fec1337/pages/GS110EMX/0/port_settings.html000066400000000000000000000400041517216143300244510ustar00rootroot00000000000000 Port Status
Port Port Description Port Status Speed Linked Speed Flow Control Max MTU
1 Down Auto No Speed Disable 10240
2 Down Auto No Speed Disable 10240
3 Ceiling Projector Up Auto 100M Full Disable 10240
4 Work Laptop Up Auto 1000M Full Disable 10240
5 Mediaserver Backup Up Auto 1000M Full Disable 10240
6 Down Auto No Speed Disable 10240
7 APC Smart UPS Up Auto 100M Half Disable 10240
8 S. SHOP Uplink Up Auto 1000M Full Disable 10240
9 WHITEHOT Up Auto 2.5G Full Disable 10240
10 HOUSE Uplink Up Auto 5G Full Disable 10240
foxey-py-netgear-plus-fec1337/pages/GS110EMX/0/switch_infos.json000066400000000000000000000074351517216143300242640ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "SHOP", "switch_serial_number": "53H7235000000", "switch_bootloader": "unknown", "switch_firmware": "1.0.2.8", "port_1_status": "off", "port_1_modus_speed": true, "port_1_connection_speed": 0, "port_2_status": "off", "port_2_modus_speed": true, "port_2_connection_speed": 0, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 100, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 100, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "port_9_status": "on", "port_9_modus_speed": true, "port_9_connection_speed": 2500, "port_10_status": "on", "port_10_modus_speed": true, "port_10_connection_speed": 5000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 0.0, "port_1_sum_tx_mbytes": 0.0, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 0.0, "port_2_sum_tx_mbytes": 0.0, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.55, "port_3_sum_tx_mbytes": 299.6, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 277.24, "port_4_sum_tx_mbytes": 7149.76, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 17.48, "port_5_sum_tx_mbytes": 406.12, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 4.79, "port_7_sum_tx_mbytes": 297.42, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 1505.72, "port_8_sum_tx_mbytes": 998.68, "port_9_traffic_rx_mbytes": 0.0, "port_9_traffic_tx_mbytes": 0.0, "port_9_speed_rx_mbytes": 0.0, "port_9_speed_tx_mbytes": 0.0, "port_9_speed_io_mbytes": 0.0, "port_9_sum_rx_mbytes": 7535.99, "port_9_sum_tx_mbytes": 2596.7, "port_10_traffic_rx_mbytes": 0.0, "port_10_traffic_tx_mbytes": 0.0, "port_10_speed_rx_mbytes": 0.0, "port_10_speed_tx_mbytes": 0.0, "port_10_speed_io_mbytes": 0.0, "port_10_sum_rx_mbytes": 10236.22, "port_10_sum_tx_mbytes": 9347.29, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_10_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS110EMX/0/sysInfo.html000066400000000000000000000133011517216143300231770ustar00rootroot00000000000000 Switch Information
Product Name GS110EMX
Switch Name
Serial Number 53H7235000000
MAC Address 34:98:01:02:03:04
Firmware Version 1.0.2.8
DHCP Mode Refresh
IP Address
Subnet Mask
Gateway Address
foxey-py-netgear-plus-fec1337/pages/GS110EMX/1/000077500000000000000000000000001517216143300206625ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS110EMX/1/homepage.html000066400000000000000000000000751517216143300233370ustar00rootroot00000000000000 foxey-py-netgear-plus-fec1337/pages/GS110EMX/1/interface_stats.html000066400000000000000000000104211517216143300247240ustar00rootroot00000000000000 Port Statistics
Port Bytes Received Bytes Sent CRC Error Packets
1 0 0 0
2 0 0 0
3 552768 299518876 0
4 277240826 7149758405 0
5 17476953 406116633 0
6 0 0 0
7 4766761 297020168 0
8 1505481191 998654381 0
9 7535483095 2596695807 0
10 10236221045 9347282586 0
foxey-py-netgear-plus-fec1337/pages/GS110EMX/1/login.htm000066400000000000000000000076521517216143300225160ustar00rootroot00000000000000 NETGEAR GS110EMX
GS110EMX - 8-Port Gigabit Ethernet Smart Managed Plus Switch with 2-Port 10G/Multi-Gig Uplinks
Password

foxey-py-netgear-plus-fec1337/pages/GS110EMX/1/port_settings.html000066400000000000000000000400041517216143300244520ustar00rootroot00000000000000 Port Status
Port Port Description Port Status Speed Linked Speed Flow Control Max MTU
1 Down Auto No Speed Disable 10240
2 Down Auto No Speed Disable 10240
3 Ceiling Projector Up Auto 100M Full Disable 10240
4 Work Laptop Up Auto 1000M Full Disable 10240
5 Mediaserver Backup Up Auto 1000M Full Disable 10240
6 Down Auto No Speed Disable 10240
7 APC Smart UPS Up Auto 100M Half Disable 10240
8 S. SHOP Uplink Up Auto 1000M Full Disable 10240
9 WHITEHOT Up Auto 2.5G Full Disable 10240
10 HOUSE Uplink Up Auto 5G Full Disable 10240
foxey-py-netgear-plus-fec1337/pages/GS110EMX/1/switch_infos.json000066400000000000000000000074361517216143300242660ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "SHOP", "switch_serial_number": "53H7235000000", "switch_bootloader": "unknown", "switch_firmware": "1.0.2.8", "port_1_status": "off", "port_1_modus_speed": true, "port_1_connection_speed": 0, "port_2_status": "off", "port_2_modus_speed": true, "port_2_connection_speed": 0, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 100, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 100, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "port_9_status": "on", "port_9_modus_speed": true, "port_9_connection_speed": 2500, "port_10_status": "on", "port_10_modus_speed": true, "port_10_connection_speed": 5000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 0.0, "port_1_sum_tx_mbytes": 0.0, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 0.0, "port_2_sum_tx_mbytes": 0.0, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.55, "port_3_sum_tx_mbytes": 299.52, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 277.24, "port_4_sum_tx_mbytes": 7149.76, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 17.48, "port_5_sum_tx_mbytes": 406.12, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 4.77, "port_7_sum_tx_mbytes": 297.02, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 1505.48, "port_8_sum_tx_mbytes": 998.65, "port_9_traffic_rx_mbytes": 0.0, "port_9_traffic_tx_mbytes": 0.0, "port_9_speed_rx_mbytes": 0.0, "port_9_speed_tx_mbytes": 0.0, "port_9_speed_io_mbytes": 0.0, "port_9_sum_rx_mbytes": 7535.48, "port_9_sum_tx_mbytes": 2596.7, "port_10_traffic_rx_mbytes": 0.0, "port_10_traffic_tx_mbytes": 0.0, "port_10_speed_rx_mbytes": 0.0, "port_10_speed_tx_mbytes": 0.0, "port_10_speed_io_mbytes": 0.0, "port_10_sum_rx_mbytes": 10236.22, "port_10_sum_tx_mbytes": 9347.28, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_10_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS110EMX/1/sysInfo.html000066400000000000000000000133011517216143300232000ustar00rootroot00000000000000 Switch Information
Product Name GS110EMX
Switch Name
Serial Number 53H7235000000
MAC Address 34:98:01:02:03:04
Firmware Version 1.0.2.8
DHCP Mode Refresh
IP Address
Subnet Mask
Gateway Address
foxey-py-netgear-plus-fec1337/pages/GS305E/000077500000000000000000000000001517216143300202635ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS305E/0/000077500000000000000000000000001517216143300204225ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS305E/0/login.cgi000066400000000000000000000060221517216143300222160ustar00rootroot00000000000000 NETGEAR GS305E
GS305E – 5-Port Gigabit Ethernet Smart Managed Plus Switch
Password
Login
© NETGEAR, Inc. All rights reserved.
foxey-py-netgear-plus-fec1337/pages/GS305E/0/portStatistics.cgi000066400000000000000000000066041517216143300241530ustar00rootroot00000000000000 Port Statistics
foxey-py-netgear-plus-fec1337/pages/GS305E/0/status.cgi000066400000000000000000000151721517216143300224370ustar00rootroot00000000000000Port Status
Port Bytes Received Bytes Sent CRC Error Packets
1 821983574 899182860
2 2039151360 3311060993
3 72174199 3537884982
4 0 0
5 2498212033 2270434777
Port Port Description Port Status Speed Linked Speed Flow ControlMax MTU
1 hypervisor Up Auto 1000M Disable 16349
2 wifi Up Auto 1000M Disable 16349
3 laptop Up Auto 1000M Disable 16349
4 lan Down Auto No Speed Disable 16349
5 wan/schneider Up Auto 1000M Disable 16349
foxey-py-netgear-plus-fec1337/pages/GS305E/0/switch_info.cgi000066400000000000000000000115611517216143300234260ustar00rootroot00000000000000 Switch Information
Product Name GS305E
Switch Name
Serial Number 5W164658A0D0C
MAC Address 54:07:7D:1B:18:2F
Bootloader Version V1.0.0.2
Firmware Version V1.0.0.16
DHCP Mode Refresh
IP Address
Subnet Mask
Gateway Address
foxey-py-netgear-plus-fec1337/pages/GS305E/0/switch_infos.json000066400000000000000000000047451517216143300240260ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "", "switch_serial_number": "5W164658A0D0C", "switch_bootloader": "V1.0.0.2", "switch_firmware": "V1.0.0.16", "port_1_description": "hypervisor", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_1_flow_control": "Disable", "port_2_description": "wifi", "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_2_flow_control": "Disable", "port_3_description": "laptop", "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_3_flow_control": "Disable", "port_4_description": "lan", "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_4_flow_control": "Disable", "port_5_description": "wan/schneider", "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_5_flow_control": "Disable", "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 288584.79, "port_1_sum_tx_mbytes": 219942.51, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 14924.05, "port_2_sum_tx_mbytes": 37670.8, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 8662.11, "port_3_sum_tx_mbytes": 7832.85, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 195771.74, "port_5_sum_tx_mbytes": 242788.6, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_5_crc_errors": 0, "sum_port_crc_errors": 0 } foxey-py-netgear-plus-fec1337/pages/GS305E/1/000077500000000000000000000000001517216143300204235ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS305E/1/login.cgi000066400000000000000000000060221517216143300222170ustar00rootroot00000000000000 NETGEAR GS305E
GS305E – 5-Port Gigabit Ethernet Smart Managed Plus Switch
Password
Login
© NETGEAR, Inc. All rights reserved.
foxey-py-netgear-plus-fec1337/pages/GS305E/1/portStatistics.cgi000066400000000000000000000066021517216143300241520ustar00rootroot00000000000000 Port Statistics
foxey-py-netgear-plus-fec1337/pages/GS305E/1/status.cgi000066400000000000000000000151701517216143300224360ustar00rootroot00000000000000Port Status
Port Bytes Received Bytes Sent CRC Error Packets
1 824881825 902781770
2 2040182132 3313549586
3 72234717 3537973499
4 0 0
5 2500715010 2270916050
Port Port Description Port Status Speed Linked Speed Flow ControlMax MTU
1 hypervisor Up Auto 1000M Disable 16349
2 wifi Up Auto 1000M Disable 16349
3 laptop Up Auto 1000M Disable 16349
4 lan Down Auto No Speed Disable 16349
5 wan/schneider Up Auto 1000M Disable 16349
foxey-py-netgear-plus-fec1337/pages/GS305E/1/switch_info.cgi000066400000000000000000000115571517216143300234340ustar00rootroot00000000000000 Switch Information
Product Name GS305E
Switch Name
Serial Number 5W164658A0D0C
MAC Address 54:07:7D:1B:18:2F
Bootloader Version V1.0.0.2
Firmware Version V1.0.0.16
DHCP Mode Refresh
IP Address
Subnet Mask
Gateway Address
foxey-py-netgear-plus-fec1337/pages/GS305E/1/switch_infos.json000066400000000000000000000047721517216143300240270ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "", "switch_serial_number": "5W164658A0D0C", "switch_bootloader": "V1.0.0.2", "switch_firmware": "V1.0.0.16", "port_1_description": "hypervisor", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_1_flow_control": "Disable", "port_2_description": "wifi", "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_2_flow_control": "Disable", "port_3_description": "laptop", "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_3_flow_control": "Disable", "port_4_description": "lan", "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_4_flow_control": "Disable", "port_5_description": "wan/schneider", "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_5_flow_control": "Disable", "response_time_s": 0, "port_1_traffic_rx_mbytes": 2.9, "port_1_traffic_tx_mbytes": 3.6, "port_1_speed_rx_mbytes": 2.9, "port_1_speed_tx_mbytes": 3.6, "port_1_speed_io_mbytes": 6.5, "port_1_sum_rx_mbytes": 288587.69, "port_1_sum_tx_mbytes": 219946.11, "port_2_traffic_rx_mbytes": 1.03, "port_2_traffic_tx_mbytes": 2.49, "port_2_speed_rx_mbytes": 1.03, "port_2_speed_tx_mbytes": 2.49, "port_2_speed_io_mbytes": 3.52, "port_2_sum_rx_mbytes": 14925.08, "port_2_sum_tx_mbytes": 37673.29, "port_3_traffic_rx_mbytes": 0.06, "port_3_traffic_tx_mbytes": 0.09, "port_3_speed_rx_mbytes": 0.06, "port_3_speed_tx_mbytes": 0.09, "port_3_speed_io_mbytes": 0.15, "port_3_sum_rx_mbytes": 8662.17, "port_3_sum_tx_mbytes": 7832.94, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 2.5, "port_5_traffic_tx_mbytes": 0.48, "port_5_speed_rx_mbytes": 2.5, "port_5_speed_tx_mbytes": 0.48, "port_5_speed_io_mbytes": 2.98, "port_5_sum_rx_mbytes": 195774.24, "port_5_sum_tx_mbytes": 242789.08, "sum_port_traffic_rx": 6.49, "sum_port_traffic_tx": 6.66, "sum_port_speed_rx": 6.49, "sum_port_speed_tx": 6.66, "sum_port_speed_io": 13.15, "port_5_crc_errors": 0, "sum_port_crc_errors": 0 } foxey-py-netgear-plus-fec1337/pages/GS308E/000077500000000000000000000000001517216143300202665ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308E/0/000077500000000000000000000000001517216143300204255ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308E/0/login.cgi000066400000000000000000000062771517216143300222350ustar00rootroot00000000000000 NETGEAR GS308E
GS308E - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS308E/0/login.htm000066400000000000000000000062441517216143300222550ustar00rootroot00000000000000 NETGEAR GS308E
GS308E - 8-Port Gigabit Ethernet Smart Managed Plus Switch
Passwort
Anmeldung
© NETGEAR, Inc. Alle Rechte vorbehalten.
foxey-py-netgear-plus-fec1337/pages/GS308E/0/port_statistics.htm000066400000000000000000000102341517216143300243750ustar00rootroot00000000000000 Port Statistics
foxey-py-netgear-plus-fec1337/pages/GS308E/0/status.htm000066400000000000000000000164771517216143300225010ustar00rootroot00000000000000Port Status
Port Empfangene Bytes Gesendete Bytes Pakete mit CRC-Fehlern
1
2
3
4
5
6
7
8
foxey-py-netgear-plus-fec1337/pages/GS308E/0/switch_info.htm000066400000000000000000000127761517216143300234700ustar00rootroot00000000000000Switch Information
Port Portstatus Geschwindigkeit Verbindungsgeschwindigkeit Flusssteuerung Max. MTU
1 Aktiv Auto 1000M Deaktiviert 9702
2 Aktiv Auto 1000M Deaktiviert 9702
3 Inaktiv Auto Nicht verbunden Deaktiviert 9702
4 Aktiv Auto 1000M Deaktiviert 9702
5 Aktiv Auto 100M Deaktiviert 9702
6 Aktiv Auto 1000M Deaktiviert 9702
7 Aktiv Auto 100M Deaktiviert 9702
8 Aktiv Auto 100M Deaktiviert 9702
foxey-py-netgear-plus-fec1337/pages/GS308E/0/switch_infos.json000066400000000000000000000062341517216143300240240ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS308E-UG", "switch_serial_number": "5W27255T01D64", "switch_bootloader": "V1.00.03", "switch_firmware": "V1.00.11GR", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 100, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 1000, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 100, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 100, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 1053790.98, "port_1_sum_tx_mbytes": 141276.07, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 528007.28, "port_2_sum_tx_mbytes": 1038499.27, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 1482.42, "port_3_sum_tx_mbytes": 3996.03, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 43091.76, "port_4_sum_tx_mbytes": 361965.61, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 133.33, "port_5_sum_tx_mbytes": 6330.45, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 37276.67, "port_6_sum_tx_mbytes": 428808.09, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 34053.56, "port_7_sum_tx_mbytes": 12565.36, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 14850.13, "port_8_sum_tx_mbytes": 2909.86, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS308E/1/000077500000000000000000000000001517216143300204265ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308E/1/port_statistics.htm000066400000000000000000000102341517216143300243760ustar00rootroot00000000000000Port Statistics
Produktname GS308E
Switch-Name
Seriennummer 5W27255T01D64
MAC-Adresse 34:98:B5:AB:AE:82
Bootloader-Version V1.00.03
Firmwareversion V1.00.11GR
DHCP-Modus Aktualisieren
IP-Adresse
Subnetzmaske
Gateway-Adresse
foxey-py-netgear-plus-fec1337/pages/GS308E/1/status.htm000066400000000000000000000164771517216143300225020ustar00rootroot00000000000000Port Status
Port Empfangene Bytes Gesendete Bytes Pakete mit CRC-Fehlern
1
2
3
4
5
6
7
8
foxey-py-netgear-plus-fec1337/pages/GS308E/1/switch_info.htm000066400000000000000000000127761517216143300234710ustar00rootroot00000000000000Switch Information
Port Portstatus Geschwindigkeit Verbindungsgeschwindigkeit Flusssteuerung Max. MTU
1 Aktiv Auto 1000M Deaktiviert 9702
2 Aktiv Auto 1000M Deaktiviert 9702
3 Inaktiv Auto Nicht verbunden Deaktiviert 9702
4 Aktiv Auto 1000M Deaktiviert 9702
5 Aktiv Auto 100M Deaktiviert 9702
6 Aktiv Auto 1000M Deaktiviert 9702
7 Aktiv Auto 100M Deaktiviert 9702
8 Aktiv Auto 100M Deaktiviert 9702
foxey-py-netgear-plus-fec1337/pages/GS308E/1/switch_infos.json000066400000000000000000000063101517216143300240200ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS308E-UG", "switch_serial_number": "5W27255T01D64", "switch_bootloader": "V1.00.03", "switch_firmware": "V1.00.11GR", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 100, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 1000, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 100, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 100, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.35, "port_1_traffic_tx_mbytes": 0.6, "port_1_speed_rx_mbytes": 0.35, "port_1_speed_tx_mbytes": 0.6, "port_1_speed_io_mbytes": 0.95, "port_1_sum_rx_mbytes": 1053791.33, "port_1_sum_tx_mbytes": 141276.67, "port_2_traffic_rx_mbytes": 11.81, "port_2_traffic_tx_mbytes": 0.35, "port_2_speed_rx_mbytes": 11.81, "port_2_speed_tx_mbytes": 0.35, "port_2_speed_io_mbytes": 12.16, "port_2_sum_rx_mbytes": 528019.08, "port_2_sum_tx_mbytes": 1038499.62, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 1482.42, "port_3_sum_tx_mbytes": 3996.03, "port_4_traffic_rx_mbytes": 0.42, "port_4_traffic_tx_mbytes": 11.56, "port_4_speed_rx_mbytes": 0.42, "port_4_speed_tx_mbytes": 11.56, "port_4_speed_io_mbytes": 11.98, "port_4_sum_rx_mbytes": 43092.18, "port_4_sum_tx_mbytes": 361977.17, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.01, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.01, "port_5_speed_io_mbytes": 0.01, "port_5_sum_rx_mbytes": 133.33, "port_5_sum_tx_mbytes": 6330.46, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 12.39, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 12.39, "port_6_speed_io_mbytes": 12.39, "port_6_sum_rx_mbytes": 37276.67, "port_6_sum_tx_mbytes": 428820.49, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.01, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.01, "port_7_speed_io_mbytes": 0.01, "port_7_sum_rx_mbytes": 34053.56, "port_7_sum_tx_mbytes": 12565.37, "port_8_traffic_rx_mbytes": 0.02, "port_8_traffic_tx_mbytes": 0.02, "port_8_speed_rx_mbytes": 0.02, "port_8_speed_tx_mbytes": 0.02, "port_8_speed_io_mbytes": 0.04, "port_8_sum_rx_mbytes": 14850.15, "port_8_sum_tx_mbytes": 2909.87, "sum_port_traffic_rx": 12.6, "sum_port_traffic_tx": 24.94, "sum_port_speed_rx": 12.6, "sum_port_speed_tx": 24.94, "sum_port_speed_io": 37.54, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS308EP/000077500000000000000000000000001517216143300204065ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308EP/0/000077500000000000000000000000001517216143300205455ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308EP/0/PoEPortConfig.cgi000066400000000000000000000545211517216143300237160ustar00rootroot00000000000000
ml343
ml346
ml334
ml335
ml338
ml342
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • ml595

  • ml583

  • ml578

  • ml549

  • ml553

  • 802.3at Enable 1 - wax610b
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 2 - wax610a
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 3 - loki
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 4 - homeassistant
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 5
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 6
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3af Disable 7
    ml551
    Low
    ml554
    None
    ml557
    16.2
    ml559
    ml975
    Get Value Fault
  • 802.3at Disable 8 - upstream
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
foxey-py-netgear-plus-fec1337/pages/GS308EP/0/dashboard.cgi000066400000000000000000000725611517216143300231730ustar00rootroot00000000000000
ml396
GS308EP
#
ml180
ml035
ml565
ml089
V1.0.1.4
ml550
ml791
ml656
ml678
01:02:03:04:05:06
ml198
1234567890ABC
ml040
GS308EP
Language
ON ml389
OFFml293
ONml351
ml257 ml429 192.168.178.30
LAG 1: (ml394 )
LAG 2: (ml394 )
LAG
ml495
  • UP 1 - wax610b
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 2 - wax610a
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 3 - loki
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 4 - homeassistant
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 5
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 6
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 7
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 8 - upstream
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
foxey-py-netgear-plus-fec1337/pages/GS308EP/0/getPoePortStatus.cgi000066400000000000000000000321441517216143300245310ustar00rootroot00000000000000
  • ml578

  • ml562

  • ml580

  • Delivering Power ml003@4@ 1 - wax610b
    ml570
    51
    ml572
    113
    ml574
    5.8
    ml575
    44
    ml581
    No Error
  • Delivering Power ml003@4@ 2 - wax610a
    ml570
    51
    ml572
    111
    ml574
    5.7
    ml575
    44
    ml581
    No Error
  • Delivering Power ml003@3@ 3 - loki
    ml570
    51
    ml572
    113
    ml574
    5.8
    ml575
    44
    ml581
    No Error
  • Delivering Power ml003@3@ 4 - homeassistant
    ml570
    50
    ml572
    59
    ml574
    3.0
    ml575
    44
    ml581
    No Error
  • Searching Unknown 5
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    44
    ml581
    No Error
  • Searching Unknown 6
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    44
    ml581
    No Error
  • Disabled Unknown 7
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    44
    ml581
    No Error
  • Disabled Unknown 8 - upstream
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    44
    ml581
    No Error
foxey-py-netgear-plus-fec1337/pages/GS308EP/0/index.htm000066400000000000000000000041641517216143300223730ustar00rootroot00000000000000NETGEAR GS308EP
GS308EP
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.


foxey-py-netgear-plus-fec1337/pages/GS308EP/0/login.cgi000066400000000000000000000041641517216143300223460ustar00rootroot00000000000000NETGEAR GS308EP
GS308EP
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.


foxey-py-netgear-plus-fec1337/pages/GS308EP/0/portStatistics.cgi000066400000000000000000000063501517216143300242740ustar00rootroot00000000000000
ml446
  • ml578ml711ml466ml563
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
foxey-py-netgear-plus-fec1337/pages/GS308EP/0/switch_infos.json000066400000000000000000000070061517216143300241420ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS308EP", "switch_serial_number": "1234567890ABC", "switch_bootloader": "unknown", "switch_firmware": "V1.0.1.4", "led_status": "on", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_5_status": "off", "port_5_modus_speed": true, "port_5_connection_speed": 0, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "off", "port_7_modus_speed": true, "port_7_connection_speed": 0, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 540220.07, "port_1_sum_tx_mbytes": 249143.18, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 289378.72, "port_2_sum_tx_mbytes": 295125.59, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 49775.08, "port_3_sum_tx_mbytes": 662616.68, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 156694.64, "port_4_sum_tx_mbytes": 135473.74, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.0, "port_5_sum_tx_mbytes": 0.0, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 0.0, "port_7_sum_tx_mbytes": 0.0, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 633635.18, "port_8_sum_tx_mbytes": 351550.76, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_8_crc_errors": 0, "sum_port_crc_errors": 0, "port_1_poe_power_active": "on", "port_2_poe_power_active": "on", "port_3_poe_power_active": "on", "port_4_poe_power_active": "on", "port_5_poe_power_active": "on", "port_6_poe_power_active": "on", "port_7_poe_power_active": "off", "port_8_poe_power_active": "off", "port_1_poe_output_power": 5.8, "port_2_poe_output_power": 5.7, "port_3_poe_output_power": 5.8, "port_4_poe_output_power": 3.0, "port_5_poe_output_power": 0.0, "port_6_poe_output_power": 0.0, "port_7_poe_output_power": 0.0, "port_8_poe_output_power": 0.0 } foxey-py-netgear-plus-fec1337/pages/GS308EP/1/000077500000000000000000000000001517216143300205465ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308EP/1/PoEPortConfig.cgi000066400000000000000000000545211517216143300237170ustar00rootroot00000000000000
ml343
ml346
ml334
ml335
ml338
ml342
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • ml595

  • ml583

  • ml578

  • ml549

  • ml553

  • 802.3at Enable 1 - wax610b
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 2 - wax610a
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 3 - loki
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 4 - homeassistant
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 5
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 6
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3af Disable 7
    ml551
    Low
    ml554
    None
    ml557
    16.2
    ml559
    ml975
    Get Value Fault
  • 802.3at Disable 8 - upstream
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
foxey-py-netgear-plus-fec1337/pages/GS308EP/1/dashboard.cgi000066400000000000000000000725551517216143300231770ustar00rootroot00000000000000
ml396
GS308EP
#
ml180
ml035
ml565
ml089
V1.0.1.4
ml550
ml791
ml656
ml678
1234567890ABC
ml198
1234567890ABC
ml040
GS308EP
Language
ON ml389
OFFml293
ONml351
ml257 ml429 192.168.178.30
LAG 1: (ml394 )
LAG 2: (ml394 )
LAG
ml495
  • UP 1 - wax610b
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 2 - wax610a
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 3 - loki
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 4 - homeassistant
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 5
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 6
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 7
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 8 - upstream
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
foxey-py-netgear-plus-fec1337/pages/GS308EP/1/getPoePortStatus.cgi000066400000000000000000000321431517216143300245310ustar00rootroot00000000000000
  • ml578

  • ml562

  • ml580

  • Delivering Power ml003@4@ 1 - wax610b
    ml570
    51
    ml572
    119
    ml574
    6.1
    ml575
    44
    ml581
    No Error
  • Delivering Power ml003@4@ 2 - wax610a
    ml570
    51
    ml572
    109
    ml574
    5.6
    ml575
    44
    ml581
    No Error
  • Delivering Power ml003@3@ 3 - loki
    ml570
    51
    ml572
    89
    ml574
    4.6
    ml575
    44
    ml581
    No Error
  • Delivering Power ml003@3@ 4 - homeassistant
    ml570
    51
    ml572
    41
    ml574
    2.1
    ml575
    44
    ml581
    No Error
  • Searching Unknown 5
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    44
    ml581
    No Error
  • Searching Unknown 6
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    44
    ml581
    No Error
  • Disabled Unknown 7
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    44
    ml581
    No Error
  • Disabled Unknown 8 - upstream
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    44
    ml581
    No Error
foxey-py-netgear-plus-fec1337/pages/GS308EP/1/index.htm000066400000000000000000000041641517216143300223740ustar00rootroot00000000000000 NETGEAR GS308EP
GS308EP
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.


foxey-py-netgear-plus-fec1337/pages/GS308EP/1/login.cgi000066400000000000000000000041641517216143300223470ustar00rootroot00000000000000 NETGEAR GS308EP
GS308EP
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.


foxey-py-netgear-plus-fec1337/pages/GS308EP/1/portStatistics.cgi000066400000000000000000000063501517216143300242750ustar00rootroot00000000000000
ml446
  • ml578ml711ml466ml563
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
foxey-py-netgear-plus-fec1337/pages/GS308EP/1/switch_infos.json000066400000000000000000000070521517216143300241440ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS308EP", "switch_bootloader": "unknown", "switch_firmware": "V1.0.1.4", "switch_serial_number": "1234567890ABC", "led_status": "on", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_5_status": "off", "port_5_modus_speed": true, "port_5_connection_speed": 0, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "off", "port_7_modus_speed": true, "port_7_connection_speed": 0, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 2.41, "port_1_traffic_tx_mbytes": 2.0, "port_1_speed_rx_mbytes": 2.41, "port_1_speed_tx_mbytes": 2.0, "port_1_speed_io_mbytes": 4.41, "port_1_sum_rx_mbytes": 540222.48, "port_1_sum_tx_mbytes": 249145.19, "port_2_traffic_rx_mbytes": 11.94, "port_2_traffic_tx_mbytes": 8.68, "port_2_speed_rx_mbytes": 11.94, "port_2_speed_tx_mbytes": 8.68, "port_2_speed_io_mbytes": 20.62, "port_2_sum_rx_mbytes": 289390.66, "port_2_sum_tx_mbytes": 295134.27, "port_3_traffic_rx_mbytes": 0.23, "port_3_traffic_tx_mbytes": 6.43, "port_3_speed_rx_mbytes": 0.23, "port_3_speed_tx_mbytes": 6.43, "port_3_speed_io_mbytes": 6.66, "port_3_sum_rx_mbytes": 49775.31, "port_3_sum_tx_mbytes": 662623.11, "port_4_traffic_rx_mbytes": 0.04, "port_4_traffic_tx_mbytes": 0.15, "port_4_speed_rx_mbytes": 0.04, "port_4_speed_tx_mbytes": 0.15, "port_4_speed_io_mbytes": 0.18, "port_4_sum_rx_mbytes": 156694.68, "port_4_sum_tx_mbytes": 135473.88, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.0, "port_5_sum_tx_mbytes": 0.0, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 0.0, "port_7_sum_tx_mbytes": 0.0, "port_8_traffic_rx_mbytes": 10.4, "port_8_traffic_tx_mbytes": 7.92, "port_8_speed_rx_mbytes": 10.4, "port_8_speed_tx_mbytes": 7.92, "port_8_speed_io_mbytes": 18.32, "port_8_sum_rx_mbytes": 633645.58, "port_8_sum_tx_mbytes": 351558.68, "sum_port_traffic_rx": 25.01, "sum_port_traffic_tx": 25.18, "sum_port_speed_rx": 25.01, "sum_port_speed_tx": 25.18, "sum_port_speed_io": 50.2, "port_8_crc_errors": 0, "sum_port_crc_errors": 0, "port_1_poe_power_active": "on", "port_2_poe_power_active": "on", "port_3_poe_power_active": "on", "port_4_poe_power_active": "on", "port_5_poe_power_active": "on", "port_6_poe_power_active": "on", "port_7_poe_power_active": "off", "port_8_poe_power_active": "off", "port_1_poe_output_power": 6.1, "port_2_poe_output_power": 5.6, "port_3_poe_output_power": 4.6, "port_4_poe_output_power": 2.1, "port_5_poe_output_power": 0.0, "port_6_poe_output_power": 0.0, "port_7_poe_output_power": 0.0, "port_8_poe_output_power": 0.0 } foxey-py-netgear-plus-fec1337/pages/GS308EP/unauthenticated.html000066400000000000000000000005141517216143300244610ustar00rootroot00000000000000 Redirect to Login foxey-py-netgear-plus-fec1337/pages/GS308EPP/000077500000000000000000000000001517216143300205265ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308EPP/0/000077500000000000000000000000001517216143300206655ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308EPP/0/PoEPortConfig.cgi000066400000000000000000000554101517216143300240340ustar00rootroot00000000000000
ml343
ml346
ml334
ml335
ml338
ml342
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • ml595

  • ml583

  • ml578

  • ml549

  • ml553

  • 802.3at Enable 1 - Bij TV 1
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 2 - Bij TV 2
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 3 - Zolder 100mbit 1
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 4 - zolder 100mbit 2
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 5 - Mini AP garage
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 6 - Zigbwe coord.
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 7 - Home Assistant
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 8 - Uplink to router
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
foxey-py-netgear-plus-fec1337/pages/GS308EPP/0/dashboard.cgi000066400000000000000000000734651517216143300233170ustar00rootroot00000000000000
ml396
GS308EPP
#
ml180
ml035
ml565
ml089
V1.0.1.4
ml550
ml791
ml656
ml678
54:07:7D:18:BE:DA
ml198
1234567890ABC
ml040
GS308EPP
Language
ON ml389
OFFml293
ONml351
ml257 ml429 172.16.0.212
LAG 1: (ml394 )
LAG 2: (ml394 )
LAG
ml495
  • AVAILABLE 1 - Bij TV 1
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 2 - Bij TV 2
    ml510
    Auto
    ml382
    100M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 3 - Zolder 100mbit 1
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 4 - zolder 100mbit 2
    ml510
    Auto
    ml382
    100M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 5 - Mini AP garage
    ml510
    Auto
    ml382
    100M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 6 - Zigbwe coord.
    ml510
    Auto
    ml382
    100M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 7 - Home Assistant
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 8 - Uplink to router
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
foxey-py-netgear-plus-fec1337/pages/GS308EPP/0/getPoePortStatus.cgi000066400000000000000000000327201517216143300246510ustar00rootroot00000000000000
  • ml578

  • ml562

  • ml580

  • Searching Unknown 1 - Bij TV 1
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    40
    ml581
    No Error
  • Searching Unknown 2 - Bij TV 2
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    40
    ml581
    No Error
  • Searching Unknown 3 - Zolder 100mbit 1
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    40
    ml581
    No Error
  • Searching Unknown 4 - zolder 100mbit 2
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    40
    ml581
    No Error
  • Delivering Power ml003@0@ 5 - Mini AP garage
    ml570
    51
    ml572
    29
    ml574
    1.5
    ml575
    40
    ml581
    No Error
  • Delivering Power ml003@0@ 6 - Zigbwe coord.
    ml570
    50
    ml572
    22
    ml574
    1.1
    ml575
    40
    ml581
    No Error
  • Delivering Power ml003@4@ 7 - Home Assistant
    ml570
    53
    ml572
    98
    ml574
    5.2
    ml575
    40
    ml581
    No Error
  • Searching Unknown 8 - Uplink to router
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    40
    ml581
    No Error
foxey-py-netgear-plus-fec1337/pages/GS308EPP/0/login.cgi000066400000000000000000000041671517216143300224710ustar00rootroot00000000000000 NETGEAR GS308EPP
GS308EPP
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.


foxey-py-netgear-plus-fec1337/pages/GS308EPP/0/portStatistics.cgi000066400000000000000000000063541517216143300244200ustar00rootroot00000000000000
ml446
  • ml578ml711ml466ml563
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
foxey-py-netgear-plus-fec1337/pages/GS308EPP/0/switch_infos.json000066400000000000000000000067721517216143300242730ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS308EPP", "switch_serial_number": "1234567890ABC", "switch_bootloader": "unknown", "switch_firmware": "V1.0.1.4", "led_status": "on", "port_1_status": "off", "port_1_modus_speed": true, "port_1_connection_speed": 0, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 100, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 100, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 100, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 100, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 1000, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 0.0, "port_1_sum_tx_mbytes": 0.0, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 5430.58, "port_2_sum_tx_mbytes": 272586.25, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 66.81, "port_4_sum_tx_mbytes": 1389.05, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 2434.41, "port_5_sum_tx_mbytes": 2514.08, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 63.84, "port_6_sum_tx_mbytes": 1374.8, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 17894.24, "port_7_sum_tx_mbytes": 31375.91, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 289824.09, "port_8_sum_tx_mbytes": 22532.54, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_8_crc_errors": 0, "sum_port_crc_errors": 0, "port_1_poe_power_active": "on", "port_2_poe_power_active": "on", "port_3_poe_power_active": "on", "port_4_poe_power_active": "on", "port_5_poe_power_active": "on", "port_6_poe_power_active": "on", "port_7_poe_power_active": "on", "port_8_poe_power_active": "on", "port_1_poe_output_power": 0.0, "port_2_poe_output_power": 0.0, "port_3_poe_output_power": 0.0, "port_4_poe_output_power": 0.0, "port_5_poe_output_power": 1.5, "port_6_poe_output_power": 1.1, "port_7_poe_output_power": 5.2, "port_8_poe_output_power": 0.0 } foxey-py-netgear-plus-fec1337/pages/GS308EPP/1/000077500000000000000000000000001517216143300206665ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308EPP/1/PoEPortConfig.cgi000066400000000000000000000554101517216143300240350ustar00rootroot00000000000000
ml343
ml346
ml334
ml335
ml338
ml342
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • ml595

  • ml583

  • ml578

  • ml549

  • ml553

  • 802.3at Enable 1 - Bij TV 1
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 2 - Bij TV 2
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 3 - Zolder 100mbit 1
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 4 - zolder 100mbit 2
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 5 - Mini AP garage
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 6 - Zigbwe coord.
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 7 - Home Assistant
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
  • 802.3at Enable 8 - Uplink to router
    ml551
    Low
    ml554
    User
    ml557
    30.0
    ml559
    IEEE 802
    ml975
    Disable
foxey-py-netgear-plus-fec1337/pages/GS308EPP/1/dashboard.cgi000066400000000000000000000734651517216143300233200ustar00rootroot00000000000000
ml396
GS308EPP
#
ml180
ml035
ml565
ml089
V1.0.1.4
ml550
ml791
ml656
ml678
54:07:7D:18:BE:DA
ml198
1234567890ABC
ml040
GS308EPP
Language
ON ml389
OFFml293
ONml351
ml257 ml429 172.16.0.212
LAG 1: (ml394 )
LAG 2: (ml394 )
LAG
ml495
  • AVAILABLE 1 - Bij TV 1
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 2 - Bij TV 2
    ml510
    Auto
    ml382
    100M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 3 - Zolder 100mbit 1
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 4 - zolder 100mbit 2
    ml510
    Auto
    ml382
    100M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 5 - Mini AP garage
    ml510
    Auto
    ml382
    100M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 6 - Zigbwe coord.
    ml510
    Auto
    ml382
    100M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 7 - Home Assistant
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 8 - Uplink to router
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
foxey-py-netgear-plus-fec1337/pages/GS308EPP/1/getPoePortStatus.cgi000066400000000000000000000327201517216143300246520ustar00rootroot00000000000000
  • ml578

  • ml562

  • ml580

  • Searching Unknown 1 - Bij TV 1
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    40
    ml581
    No Error
  • Searching Unknown 2 - Bij TV 2
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    40
    ml581
    No Error
  • Searching Unknown 3 - Zolder 100mbit 1
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    40
    ml581
    No Error
  • Searching Unknown 4 - zolder 100mbit 2
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    40
    ml581
    No Error
  • Delivering Power ml003@0@ 5 - Mini AP garage
    ml570
    51
    ml572
    29
    ml574
    1.5
    ml575
    40
    ml581
    No Error
  • Delivering Power ml003@0@ 6 - Zigbwe coord.
    ml570
    51
    ml572
    29
    ml574
    1.5
    ml575
    40
    ml581
    No Error
  • Delivering Power ml003@4@ 7 - Home Assistant
    ml570
    53
    ml572
    99
    ml574
    5.3
    ml575
    40
    ml581
    No Error
  • Searching Unknown 8 - Uplink to router
    ml570
    0
    ml572
    0
    ml574
    0.0
    ml575
    40
    ml581
    No Error
foxey-py-netgear-plus-fec1337/pages/GS308EPP/1/login.cgi000066400000000000000000000041671517216143300224720ustar00rootroot00000000000000 NETGEAR GS308EPP
GS308EPP
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.


foxey-py-netgear-plus-fec1337/pages/GS308EPP/1/portStatistics.cgi000066400000000000000000000063541517216143300244210ustar00rootroot00000000000000
ml446
  • ml578ml711ml466ml563
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
foxey-py-netgear-plus-fec1337/pages/GS308EPP/1/switch_infos.json000066400000000000000000000070241517216143300242630ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS308EPP", "switch_serial_number": "1234567890ABC", "switch_bootloader": "unknown", "switch_firmware": "V1.0.1.4", "led_status": "on", "port_1_status": "off", "port_1_modus_speed": true, "port_1_connection_speed": 0, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 100, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 100, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 100, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 100, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 1000, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 0.0, "port_1_sum_tx_mbytes": 0.0, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.01, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.01, "port_2_speed_io_mbytes": 0.01, "port_2_sum_rx_mbytes": 5430.58, "port_2_sum_tx_mbytes": 272586.26, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.01, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.01, "port_4_speed_io_mbytes": 0.01, "port_4_sum_rx_mbytes": 66.81, "port_4_sum_tx_mbytes": 1389.06, "port_5_traffic_rx_mbytes": 0.02, "port_5_traffic_tx_mbytes": 0.02, "port_5_speed_rx_mbytes": 0.02, "port_5_speed_tx_mbytes": 0.02, "port_5_speed_io_mbytes": 0.04, "port_5_sum_rx_mbytes": 2434.43, "port_5_sum_tx_mbytes": 2514.1, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.01, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.01, "port_6_speed_io_mbytes": 0.01, "port_6_sum_rx_mbytes": 63.84, "port_6_sum_tx_mbytes": 1374.81, "port_7_traffic_rx_mbytes": 0.06, "port_7_traffic_tx_mbytes": 0.11, "port_7_speed_rx_mbytes": 0.06, "port_7_speed_tx_mbytes": 0.11, "port_7_speed_io_mbytes": 0.17, "port_7_sum_rx_mbytes": 17894.3, "port_7_sum_tx_mbytes": 31376.03, "port_8_traffic_rx_mbytes": 0.1, "port_8_traffic_tx_mbytes": 0.17, "port_8_speed_rx_mbytes": 0.1, "port_8_speed_tx_mbytes": 0.17, "port_8_speed_io_mbytes": 0.27, "port_8_sum_rx_mbytes": 289824.19, "port_8_sum_tx_mbytes": 22532.71, "sum_port_traffic_rx": 0.18, "sum_port_traffic_tx": 0.34, "sum_port_speed_rx": 0.18, "sum_port_speed_tx": 0.34, "sum_port_speed_io": 0.51, "port_8_crc_errors": 0, "sum_port_crc_errors": 0, "port_1_poe_power_active": "on", "port_2_poe_power_active": "on", "port_3_poe_power_active": "on", "port_4_poe_power_active": "on", "port_5_poe_power_active": "on", "port_6_poe_power_active": "on", "port_7_poe_power_active": "on", "port_8_poe_power_active": "on", "port_1_poe_output_power": 0.0, "port_2_poe_output_power": 0.0, "port_3_poe_output_power": 0.0, "port_4_poe_output_power": 0.0, "port_5_poe_output_power": 1.5, "port_6_poe_output_power": 1.5, "port_7_poe_output_power": 5.3, "port_8_poe_output_power": 0.0 } foxey-py-netgear-plus-fec1337/pages/GS308Ev4/000077500000000000000000000000001517216143300205405ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308Ev4/0/000077500000000000000000000000001517216143300206775ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308Ev4/0/dashboard.cgi000066400000000000000000000711321517216143300233160ustar00rootroot00000000000000
ml396
#
ml180
ml035
ml565
ml089
V1.0.1.3
ml550
ml791
ml656
ml678
54:07:7D:1A:B0:6A
ml198
7H914553C0473
ml040
GS308Ev4
Language
ON ml389
OFFml293
ONml351
ml257 ml152 192.168.0.239
LAG 1: (ml394 )
LAG 2: (ml394 )
LAG
ml495
  • UP 1
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 2
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 3
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 4
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 5
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 6
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 7
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 8
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
foxey-py-netgear-plus-fec1337/pages/GS308Ev4/0/login.cgi000066400000000000000000000041671517216143300225030ustar00rootroot00000000000000 NETGEAR GS308Ev4
GS308Ev4
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.


foxey-py-netgear-plus-fec1337/pages/GS308Ev4/0/portStatistics.cgi000066400000000000000000000062161517216143300244270ustar00rootroot00000000000000
ml446
  • ml578ml711ml466ml563
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
foxey-py-netgear-plus-fec1337/pages/GS308Ev4/0/switch_infos.json000066400000000000000000000060761517216143300243020ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "sw-test", "switch_serial_number": "7H914553C0473", "switch_bootloader": "unknown", "switch_firmware": "V1.0.1.3", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "off", "port_2_modus_speed": true, "port_2_connection_speed": 0, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "off", "port_5_modus_speed": true, "port_5_connection_speed": 0, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "off", "port_7_modus_speed": true, "port_7_connection_speed": 0, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 0.25, "port_1_sum_tx_mbytes": 1.72, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 0.0, "port_2_sum_tx_mbytes": 0.0, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.0, "port_5_sum_tx_mbytes": 0.0, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 0.0, "port_7_sum_tx_mbytes": 0.0, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 0.0, "port_8_sum_tx_mbytes": 0.0, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS308Ev4/1/000077500000000000000000000000001517216143300207005ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS308Ev4/1/dashboard.cgi000066400000000000000000000711541517216143300233230ustar00rootroot00000000000000
ml396
#
ml180
ml035
ml565
ml089
V1.0.1.3
ml550
ml791
ml656
ml678
54:07:7D:1A:B0:6A
ml198
7H914553C0473
ml040
GS308Ev4
Language
ON ml389
OFFml293
ONml351
ml257 ml152 192.168.0.239
LAG 1: (ml394 )
LAG 2: (ml394 )
LAG
ml495
  • UP 1
    ml510
    Auto
    ml382
    1000M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • UP 2
    ml510
    Auto
    ml382
    100M full
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 3
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 4
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 5
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 6
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 7
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
  • AVAILABLE 8
    ml510
    Auto
    ml382
    No Speed
    ml126
    No Limit
    ml086
    No Limit
    ml322
    OFF
foxey-py-netgear-plus-fec1337/pages/GS308Ev4/1/portStatistics.cgi000066400000000000000000000062161517216143300244300ustar00rootroot00000000000000
ml446
  • ml578ml711ml466ml563
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
foxey-py-netgear-plus-fec1337/pages/GS308Ev4/1/switch_infos.json000066400000000000000000000061051517216143300242740ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "sw-test", "switch_serial_number": "7H914553C0473", "switch_bootloader": "unknown", "switch_firmware": "V1.0.1.3", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 100, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "off", "port_5_modus_speed": true, "port_5_connection_speed": 0, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "off", "port_7_modus_speed": true, "port_7_connection_speed": 0, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.01, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.01, "port_1_speed_io_mbytes": 0.02, "port_1_sum_rx_mbytes": 0.25, "port_1_sum_tx_mbytes": 1.73, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 0.0, "port_2_sum_tx_mbytes": 0.0, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.0, "port_5_sum_tx_mbytes": 0.0, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 0.0, "port_7_sum_tx_mbytes": 0.0, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 0.0, "port_8_sum_tx_mbytes": 0.0, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.01, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.01, "sum_port_speed_io": 0.02, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/GS316EPP/000077500000000000000000000000001517216143300205255ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS316EPP/0/000077500000000000000000000000001517216143300206645ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS316EPP/0/dashboard.html000066400000000000000000005047531517216143300235170ustar00rootroot00000000000000

SWITCH

PORTS

Connected

SYSTEM INFO

Firmware Version

1.0.4.4

Check for firmware on

MAC Address

E0:46:EE:35:6B:CB

Serial Number

6LA6375EA0249

Model Number

GS316EPP

Port LEDs
IP Address
LAG LAG 1: (Ports: None)
LAG 2: (Ports: None)
LAG 3: (Ports: None)
LAG 4: (Ports: None)
LAG 5: (Ports: None)
LAG 6: (Ports: None)
LAG 7: (Ports: None)
LAG 8: (Ports: None)
SYSTEM TIME

Local/SNTP

PORT STATUS
foxey-py-netgear-plus-fec1337/pages/GS316EPP/0/homepage.html000066400000000000000000000061071517216143300233430ustar00rootroot00000000000000 NETGEAR GS316EPP
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.
Password
foxey-py-netgear-plus-fec1337/pages/GS316EPP/0/index.htm000066400000000000000000000045701517216143300225130ustar00rootroot00000000000000 NETGEAR GS316EPP
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.
Password
foxey-py-netgear-plus-fec1337/pages/GS316EPP/0/interface_stats.html000066400000000000000000000063151517216143300247350ustar00rootroot00000000000000
PORT STATISTICS
Produktname GS308E
Switch-Name
Seriennummer 5W27255T01D64
MAC-Adresse 34:98:B5:AB:AE:82
Bootloader-Version V1.00.03
Firmwareversion V1.00.11GR
DHCP-Modus Aktualisieren
IP-Adresse
Subnetzmaske
Gateway-Adresse
Port Bytes Received Bytes Sent CRC Error Packets
1 4872 211088 0
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
9 0 0 0
10 0 0 0
11 0 0 0
12 0 0 0
13 0 0 0
14 0 0 0
15 47565914 17032696 0
16 0 0 0
foxey-py-netgear-plus-fec1337/pages/GS316EPP/0/poePortConf.html000066400000000000000000005241671517216143300240270ustar00rootroot00000000000000
Power over Ethernet (PoE)

Configure PoE setting and display PoE Status.

Keeps PoE devices powered on even when soft rebooting the switch.

Forcibly resets the PSE ports.

1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
foxey-py-netgear-plus-fec1337/pages/GS316EPP/0/poePortStatus.html000066400000000000000000001014311517216143300244060ustar00rootroot00000000000000
foxey-py-netgear-plus-fec1337/pages/GS316EPP/0/switch_infos.json000066400000000000000000000147661517216143300242740ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS316EPP", "switch_serial_number": "6LA6375EA0249", "switch_bootloader": "unknown", "switch_firmware": "1.0.4.4", "port_1_status": "on", "led_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 100, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "off", "port_5_modus_speed": true, "port_5_connection_speed": 0, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "off", "port_7_modus_speed": true, "port_7_connection_speed": 0, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "port_9_status": "off", "port_9_modus_speed": true, "port_9_connection_speed": 0, "port_10_status": "off", "port_10_modus_speed": true, "port_10_connection_speed": 0, "port_11_status": "off", "port_11_modus_speed": true, "port_11_connection_speed": 0, "port_12_status": "off", "port_12_modus_speed": true, "port_12_connection_speed": 0, "port_13_status": "off", "port_13_modus_speed": true, "port_13_connection_speed": 0, "port_14_status": "off", "port_14_modus_speed": true, "port_14_connection_speed": 0, "port_15_status": "on", "port_15_modus_speed": true, "port_15_connection_speed": 100, "port_16_status": "off", "port_16_modus_speed": true, "port_16_connection_speed": 0, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 0.0, "port_1_sum_tx_mbytes": 0.21, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 0.0, "port_2_sum_tx_mbytes": 0.0, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.0, "port_5_sum_tx_mbytes": 0.0, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 0.0, "port_7_sum_tx_mbytes": 0.0, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 0.0, "port_8_sum_tx_mbytes": 0.0, "port_9_traffic_rx_mbytes": 0.0, "port_9_traffic_tx_mbytes": 0.0, "port_9_speed_rx_mbytes": 0.0, "port_9_speed_tx_mbytes": 0.0, "port_9_speed_io_mbytes": 0.0, "port_9_sum_rx_mbytes": 0.0, "port_9_sum_tx_mbytes": 0.0, "port_10_traffic_rx_mbytes": 0.0, "port_10_traffic_tx_mbytes": 0.0, "port_10_speed_rx_mbytes": 0.0, "port_10_speed_tx_mbytes": 0.0, "port_10_speed_io_mbytes": 0.0, "port_10_sum_rx_mbytes": 0.0, "port_10_sum_tx_mbytes": 0.0, "port_11_traffic_rx_mbytes": 0.0, "port_11_traffic_tx_mbytes": 0.0, "port_11_speed_rx_mbytes": 0.0, "port_11_speed_tx_mbytes": 0.0, "port_11_speed_io_mbytes": 0.0, "port_11_sum_rx_mbytes": 0.0, "port_11_sum_tx_mbytes": 0.0, "port_12_traffic_rx_mbytes": 0.0, "port_12_traffic_tx_mbytes": 0.0, "port_12_speed_rx_mbytes": 0.0, "port_12_speed_tx_mbytes": 0.0, "port_12_speed_io_mbytes": 0.0, "port_12_sum_rx_mbytes": 0.0, "port_12_sum_tx_mbytes": 0.0, "port_13_traffic_rx_mbytes": 0.0, "port_13_traffic_tx_mbytes": 0.0, "port_13_speed_rx_mbytes": 0.0, "port_13_speed_tx_mbytes": 0.0, "port_13_speed_io_mbytes": 0.0, "port_13_sum_rx_mbytes": 0.0, "port_13_sum_tx_mbytes": 0.0, "port_14_traffic_rx_mbytes": 0.0, "port_14_traffic_tx_mbytes": 0.0, "port_14_speed_rx_mbytes": 0.0, "port_14_speed_tx_mbytes": 0.0, "port_14_speed_io_mbytes": 0.0, "port_14_sum_rx_mbytes": 0.0, "port_14_sum_tx_mbytes": 0.0, "port_15_traffic_rx_mbytes": 0.0, "port_15_traffic_tx_mbytes": 0.0, "port_15_speed_rx_mbytes": 0.0, "port_15_speed_tx_mbytes": 0.0, "port_15_speed_io_mbytes": 0.0, "port_15_sum_rx_mbytes": 47.57, "port_15_sum_tx_mbytes": 17.03, "port_16_traffic_rx_mbytes": 0.0, "port_16_traffic_tx_mbytes": 0.0, "port_16_speed_rx_mbytes": 0.0, "port_16_speed_tx_mbytes": 0.0, "port_16_speed_io_mbytes": 0.0, "port_16_sum_rx_mbytes": 0.0, "port_16_sum_tx_mbytes": 0.0, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_16_crc_errors": 0, "sum_port_crc_errors": 0, "port_1_poe_power_active": "on", "port_2_poe_power_active": "on", "port_3_poe_power_active": "on", "port_4_poe_power_active": "on", "port_5_poe_power_active": "on", "port_6_poe_power_active": "on", "port_7_poe_power_active": "on", "port_8_poe_power_active": "on", "port_9_poe_power_active": "on", "port_10_poe_power_active": "on", "port_11_poe_power_active": "on", "port_12_poe_power_active": "on", "port_13_poe_power_active": "on", "port_14_poe_power_active": "on", "port_15_poe_power_active": "on", "port_1_poe_output_power": 1.6, "port_2_poe_output_power": 0.0, "port_3_poe_output_power": 0.0, "port_4_poe_output_power": 0.0, "port_5_poe_output_power": 0.0, "port_6_poe_output_power": 0.0, "port_7_poe_output_power": 0.0, "port_8_poe_output_power": 0.0, "port_9_poe_output_power": 0.0, "port_10_poe_output_power": 0.0, "port_11_poe_output_power": 0.0, "port_12_poe_output_power": 0.0, "port_13_poe_output_power": 0.0, "port_14_poe_output_power": 0.0, "port_15_poe_output_power": 0.0 } foxey-py-netgear-plus-fec1337/pages/GS316EPP/1/000077500000000000000000000000001517216143300206655ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS316EPP/1/dashboard.html000066400000000000000000005047431517216143300235170ustar00rootroot00000000000000

SWITCH

PORTS

Connected

SYSTEM INFO

Firmware Version

1.0.4.4

Check for firmware on

MAC Address

E0:46:EE:35:6B:CB

Serial Number

6LA6375EA0249

Model Number

GS316EPP

Port LEDs
IP Address
LAG LAG 1: (Ports: None)
LAG 2: (Ports: None)
LAG 3: (Ports: None)
LAG 4: (Ports: None)
LAG 5: (Ports: None)
LAG 6: (Ports: None)
LAG 7: (Ports: None)
LAG 8: (Ports: None)
SYSTEM TIME

Local/SNTP

PORT STATUS
foxey-py-netgear-plus-fec1337/pages/GS316EPP/1/homepage.html000066400000000000000000000061071517216143300233440ustar00rootroot00000000000000 NETGEAR GS316EPP
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.
Password
foxey-py-netgear-plus-fec1337/pages/GS316EPP/1/index.htm000066400000000000000000000045701517216143300225140ustar00rootroot00000000000000 NETGEAR GS316EPP
If logging in for the first time, log in with your switch's default password which is found on the label on the bottom of the switch.
Password
foxey-py-netgear-plus-fec1337/pages/GS316EPP/1/interface_stats.html000066400000000000000000000063151517216143300247360ustar00rootroot00000000000000
PORT STATISTICS
Port Bytes Received Bytes Sent CRC Error Packets
1 4936 219875 0
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
9 0 0 0
10 0 0 0
11 0 0 0
12 0 0 0
13 0 0 0
14 0 0 0
15 47587547 17436900 0
16 0 0 0
foxey-py-netgear-plus-fec1337/pages/GS316EPP/1/poePortConf.html000066400000000000000000005241671517216143300240300ustar00rootroot00000000000000
Power over Ethernet (PoE)

Configure PoE setting and display PoE Status.

Keeps PoE devices powered on even when soft rebooting the switch.

Forcibly resets the PSE ports.

1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
foxey-py-netgear-plus-fec1337/pages/GS316EPP/1/poePortStatus.html000066400000000000000000001014311517216143300244070ustar00rootroot00000000000000
foxey-py-netgear-plus-fec1337/pages/GS316EPP/1/switch_infos.json000066400000000000000000000150011517216143300242540ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "GS316EPP", "switch_serial_number": "6LA6375EA0249", "switch_bootloader": "unknown", "switch_firmware": "1.0.4.4", "led_status": "on", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 100, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "off", "port_5_modus_speed": true, "port_5_connection_speed": 0, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "off", "port_7_modus_speed": true, "port_7_connection_speed": 0, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "port_9_status": "off", "port_9_modus_speed": true, "port_9_connection_speed": 0, "port_10_status": "off", "port_10_modus_speed": true, "port_10_connection_speed": 0, "port_11_status": "off", "port_11_modus_speed": true, "port_11_connection_speed": 0, "port_12_status": "off", "port_12_modus_speed": true, "port_12_connection_speed": 0, "port_13_status": "off", "port_13_modus_speed": true, "port_13_connection_speed": 0, "port_14_status": "off", "port_14_modus_speed": true, "port_14_connection_speed": 0, "port_15_status": "on", "port_15_modus_speed": true, "port_15_connection_speed": 100, "port_16_status": "off", "port_16_modus_speed": true, "port_16_connection_speed": 0, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.01, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.01, "port_1_speed_io_mbytes": 0.01, "port_1_sum_rx_mbytes": 0.0, "port_1_sum_tx_mbytes": 0.22, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 0.0, "port_2_sum_tx_mbytes": 0.0, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.0, "port_5_sum_tx_mbytes": 0.0, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 0.0, "port_7_sum_tx_mbytes": 0.0, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 0.0, "port_8_sum_tx_mbytes": 0.0, "port_9_traffic_rx_mbytes": 0.0, "port_9_traffic_tx_mbytes": 0.0, "port_9_speed_rx_mbytes": 0.0, "port_9_speed_tx_mbytes": 0.0, "port_9_speed_io_mbytes": 0.0, "port_9_sum_rx_mbytes": 0.0, "port_9_sum_tx_mbytes": 0.0, "port_10_traffic_rx_mbytes": 0.0, "port_10_traffic_tx_mbytes": 0.0, "port_10_speed_rx_mbytes": 0.0, "port_10_speed_tx_mbytes": 0.0, "port_10_speed_io_mbytes": 0.0, "port_10_sum_rx_mbytes": 0.0, "port_10_sum_tx_mbytes": 0.0, "port_11_traffic_rx_mbytes": 0.0, "port_11_traffic_tx_mbytes": 0.0, "port_11_speed_rx_mbytes": 0.0, "port_11_speed_tx_mbytes": 0.0, "port_11_speed_io_mbytes": 0.0, "port_11_sum_rx_mbytes": 0.0, "port_11_sum_tx_mbytes": 0.0, "port_12_traffic_rx_mbytes": 0.0, "port_12_traffic_tx_mbytes": 0.0, "port_12_speed_rx_mbytes": 0.0, "port_12_speed_tx_mbytes": 0.0, "port_12_speed_io_mbytes": 0.0, "port_12_sum_rx_mbytes": 0.0, "port_12_sum_tx_mbytes": 0.0, "port_13_traffic_rx_mbytes": 0.0, "port_13_traffic_tx_mbytes": 0.0, "port_13_speed_rx_mbytes": 0.0, "port_13_speed_tx_mbytes": 0.0, "port_13_speed_io_mbytes": 0.0, "port_13_sum_rx_mbytes": 0.0, "port_13_sum_tx_mbytes": 0.0, "port_14_traffic_rx_mbytes": 0.0, "port_14_traffic_tx_mbytes": 0.0, "port_14_speed_rx_mbytes": 0.0, "port_14_speed_tx_mbytes": 0.0, "port_14_speed_io_mbytes": 0.0, "port_14_sum_rx_mbytes": 0.0, "port_14_sum_tx_mbytes": 0.0, "port_15_traffic_rx_mbytes": 0.02, "port_15_traffic_tx_mbytes": 0.4, "port_15_speed_rx_mbytes": 0.02, "port_15_speed_tx_mbytes": 0.4, "port_15_speed_io_mbytes": 0.43, "port_15_sum_rx_mbytes": 47.59, "port_15_sum_tx_mbytes": 17.44, "port_16_traffic_rx_mbytes": 0.0, "port_16_traffic_tx_mbytes": 0.0, "port_16_speed_rx_mbytes": 0.0, "port_16_speed_tx_mbytes": 0.0, "port_16_speed_io_mbytes": 0.0, "port_16_sum_rx_mbytes": 0.0, "port_16_sum_tx_mbytes": 0.0, "sum_port_traffic_rx": 0.02, "sum_port_traffic_tx": 0.41, "sum_port_speed_rx": 0.02, "sum_port_speed_tx": 0.41, "sum_port_speed_io": 0.43, "port_16_crc_errors": 0, "sum_port_crc_errors": 0, "port_1_poe_power_active": "on", "port_2_poe_power_active": "on", "port_3_poe_power_active": "on", "port_4_poe_power_active": "on", "port_5_poe_power_active": "on", "port_6_poe_power_active": "on", "port_7_poe_power_active": "on", "port_8_poe_power_active": "on", "port_9_poe_power_active": "on", "port_10_poe_power_active": "on", "port_11_poe_power_active": "on", "port_12_poe_power_active": "on", "port_13_poe_power_active": "on", "port_14_poe_power_active": "on", "port_15_poe_power_active": "on", "port_1_poe_output_power": 1.6, "port_2_poe_output_power": 0.0, "port_3_poe_output_power": 0.0, "port_4_poe_output_power": 0.0, "port_5_poe_output_power": 0.0, "port_6_poe_output_power": 0.0, "port_7_poe_output_power": 0.0, "port_8_poe_output_power": 0.0, "port_9_poe_output_power": 0.0, "port_10_poe_output_power": 0.0, "port_11_poe_output_power": 0.0, "port_12_poe_output_power": 0.0, "port_13_poe_output_power": 0.0, "port_14_poe_output_power": 0.0, "port_15_poe_output_power": 0.0 } foxey-py-netgear-plus-fec1337/pages/GS316EPP/unauthenticated.html000066400000000000000000000003451517216143300246020ustar00rootroot00000000000000 NETGEAR SWITCH foxey-py-netgear-plus-fec1337/pages/GS748T/000077500000000000000000000000001517216143300203155ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS748T/0/000077500000000000000000000000001517216143300204545ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/GS748T/0/main_login.html000066400000000000000000000237371517216143300234720ustar00rootroot00000000000000 NETGEAR GS748T
 
 
 
 
 
 
Login
 
 
Password
 
 
 
Copyright © 1996-2017 NETGEAR ®
foxey-py-netgear-plus-fec1337/pages/GS748T/0/port_statistics.html000066400000000000000000000210521517216143300246000ustar00rootroot00000000000000 NETGEAR GS748T foxey-py-netgear-plus-fec1337/pages/GS748T/0/port_status.html000066400000000000000000000210371517216143300237340ustar00rootroot00000000000000 NETGEAR GS748T foxey-py-netgear-plus-fec1337/pages/GS748T/0/sysInfo.html000066400000000000000000000210371517216143300227770ustar00rootroot00000000000000 NETGEAR GS748T foxey-py-netgear-plus-fec1337/pages/JGS516PE/000077500000000000000000000000001517216143300205215ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/JGS516PE/0/000077500000000000000000000000001517216143300206605ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/JGS516PE/0/login.htm000077500000000000000000000311551517216143300225120ustar00rootroot00000000000000
foxey-py-netgear-plus-fec1337/pages/JGS516PE/0/monitoring_port_statistics.htm000077500000000000000000000144041517216143300271030ustar00rootroot00000000000000 Statistic
foxey-py-netgear-plus-fec1337/pages/JGS516PE/0/status_status.htm000077500000000000000000000471361517216143300243360ustar00rootroot00000000000000 Status
foxey-py-netgear-plus-fec1337/pages/JGS516PE/0/status_switch_info.htm000077500000000000000000000353071517216143300253240ustar00rootroot00000000000000 Status
foxey-py-netgear-plus-fec1337/pages/JGS516PE/0/switch_infos.json000066400000000000000000000136741517216143300242650ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "", "switch_serial_number": "3KJ8885N002DF", "switch_bootloader": "unknown", "switch_firmware": "2.6.0.48", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 100, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 100, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 100, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 100, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 100, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "port_9_status": "on", "port_9_modus_speed": true, "port_9_connection_speed": 100, "port_10_status": "on", "port_10_modus_speed": true, "port_10_connection_speed": 1000, "port_11_status": "on", "port_11_modus_speed": true, "port_11_connection_speed": 1000, "port_12_status": "on", "port_12_modus_speed": true, "port_12_connection_speed": 100, "port_13_status": "on", "port_13_modus_speed": true, "port_13_connection_speed": 1000, "port_14_status": "off", "port_14_modus_speed": true, "port_14_connection_speed": 0, "port_15_status": "off", "port_15_modus_speed": true, "port_15_connection_speed": 0, "port_16_status": "on", "port_16_modus_speed": true, "port_16_connection_speed": 1000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 843544.42, "port_1_sum_tx_mbytes": 22581.21, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 153758.32, "port_2_sum_tx_mbytes": 284270.84, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 2183979.35, "port_3_sum_tx_mbytes": 52110.36, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 18613.12, "port_4_sum_tx_mbytes": 131456.37, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 1001667.25, "port_5_sum_tx_mbytes": 26703.51, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 1460366.36, "port_6_sum_tx_mbytes": 36962.42, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 1739969.57, "port_7_sum_tx_mbytes": 42694.23, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 0.0, "port_8_sum_tx_mbytes": 0.0, "port_9_traffic_rx_mbytes": 0.0, "port_9_traffic_tx_mbytes": 0.0, "port_9_speed_rx_mbytes": 0.0, "port_9_speed_tx_mbytes": 0.0, "port_9_speed_io_mbytes": 0.0, "port_9_sum_rx_mbytes": 3041036.94, "port_9_sum_tx_mbytes": 79279.0, "port_10_traffic_rx_mbytes": 0.0, "port_10_traffic_tx_mbytes": 0.0, "port_10_speed_rx_mbytes": 0.0, "port_10_speed_tx_mbytes": 0.0, "port_10_speed_io_mbytes": 0.0, "port_10_sum_rx_mbytes": 183207.85, "port_10_sum_tx_mbytes": 796620.86, "port_11_traffic_rx_mbytes": 0.0, "port_11_traffic_tx_mbytes": 0.0, "port_11_speed_rx_mbytes": 0.0, "port_11_speed_tx_mbytes": 0.0, "port_11_speed_io_mbytes": 0.0, "port_11_sum_rx_mbytes": 1703508.0, "port_11_sum_tx_mbytes": 6093017.32, "port_12_traffic_rx_mbytes": 0.0, "port_12_traffic_tx_mbytes": 0.0, "port_12_speed_rx_mbytes": 0.0, "port_12_speed_tx_mbytes": 0.0, "port_12_speed_io_mbytes": 0.0, "port_12_sum_rx_mbytes": 2177.64, "port_12_sum_tx_mbytes": 3051.54, "port_13_traffic_rx_mbytes": 0.0, "port_13_traffic_tx_mbytes": 0.0, "port_13_speed_rx_mbytes": 0.0, "port_13_speed_tx_mbytes": 0.0, "port_13_speed_io_mbytes": 0.0, "port_13_sum_rx_mbytes": 841747.12, "port_13_sum_tx_mbytes": 23493.6, "port_14_traffic_rx_mbytes": 0.0, "port_14_traffic_tx_mbytes": 0.0, "port_14_speed_rx_mbytes": 0.0, "port_14_speed_tx_mbytes": 0.0, "port_14_speed_io_mbytes": 0.0, "port_14_sum_rx_mbytes": 0.0, "port_14_sum_tx_mbytes": 0.0, "port_15_traffic_rx_mbytes": 0.0, "port_15_traffic_tx_mbytes": 0.0, "port_15_speed_rx_mbytes": 0.0, "port_15_speed_tx_mbytes": 0.0, "port_15_speed_io_mbytes": 0.0, "port_15_sum_rx_mbytes": 0.0, "port_15_sum_tx_mbytes": 0.0, "port_16_traffic_rx_mbytes": 0.0, "port_16_traffic_tx_mbytes": 0.0, "port_16_speed_rx_mbytes": 0.0, "port_16_speed_tx_mbytes": 0.0, "port_16_speed_io_mbytes": 0.0, "port_16_sum_rx_mbytes": 7508857.18, "port_16_sum_tx_mbytes": 13133221.99, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_16_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/JGS516PE/1/000077500000000000000000000000001517216143300206615ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/JGS516PE/1/login.htm000077500000000000000000000311551517216143300225130ustar00rootroot00000000000000
foxey-py-netgear-plus-fec1337/pages/JGS516PE/1/monitoring_port_statistics.htm000077500000000000000000000142271517216143300271070ustar00rootroot00000000000000 Statistic
foxey-py-netgear-plus-fec1337/pages/JGS516PE/1/status_status.htm000077500000000000000000000471361517216143300243370ustar00rootroot00000000000000 Status
foxey-py-netgear-plus-fec1337/pages/JGS516PE/1/status_switch_info.htm000077500000000000000000000353071517216143300253250ustar00rootroot00000000000000 Status
foxey-py-netgear-plus-fec1337/pages/JGS516PE/1/switch_infos.json000066400000000000000000000140211517216143300242510ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "", "switch_serial_number": "3KJ8885N002DF", "switch_bootloader": "unknown", "switch_firmware": "2.6.0.48", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 100, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 1000, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 100, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 100, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 100, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 100, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "port_9_status": "on", "port_9_modus_speed": true, "port_9_connection_speed": 100, "port_10_status": "on", "port_10_modus_speed": true, "port_10_connection_speed": 1000, "port_11_status": "on", "port_11_modus_speed": true, "port_11_connection_speed": 1000, "port_12_status": "on", "port_12_modus_speed": true, "port_12_connection_speed": 100, "port_13_status": "on", "port_13_modus_speed": true, "port_13_connection_speed": 1000, "port_14_status": "off", "port_14_modus_speed": true, "port_14_connection_speed": 0, "port_15_status": "off", "port_15_modus_speed": true, "port_15_connection_speed": 0, "port_16_status": "on", "port_16_modus_speed": true, "port_16_connection_speed": 1000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 1.1, "port_1_traffic_tx_mbytes": 0.35, "port_1_speed_rx_mbytes": 1.1, "port_1_speed_tx_mbytes": 0.35, "port_1_speed_io_mbytes": 1.45, "port_1_sum_rx_mbytes": 843545.52, "port_1_sum_tx_mbytes": 22581.56, "port_2_traffic_rx_mbytes": 20.0, "port_2_traffic_tx_mbytes": 7.0, "port_2_speed_rx_mbytes": 20.0, "port_2_speed_tx_mbytes": 7.0, "port_2_speed_io_mbytes": 27.0, "port_2_sum_rx_mbytes": 153778.32, "port_2_sum_tx_mbytes": 284277.84, "port_3_traffic_rx_mbytes": 1000.0, "port_3_traffic_tx_mbytes": 6.0, "port_3_speed_rx_mbytes": 1000.0, "port_3_speed_tx_mbytes": 6.0, "port_3_speed_io_mbytes": 3006.0, "port_3_sum_rx_mbytes": 2186979.35, "port_3_sum_tx_mbytes": 52116.36, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.3, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.3, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 1866.12, "port_4_sum_tx_mbytes": 131456.67, "port_5_traffic_rx_mbytes": 1000.0, "port_5_traffic_tx_mbytes": 20.0, "port_5_speed_rx_mbytes": 1000.0, "port_5_speed_tx_mbytes": 20.0, "port_5_speed_io_mbytes": 40020.0, "port_5_sum_rx_mbytes": 1041667.25, "port_5_sum_tx_mbytes": 26723.51, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 1460366.36, "port_6_sum_tx_mbytes": 36962.42, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 1739969.57, "port_7_sum_tx_mbytes": 42694.23, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 0.0, "port_8_sum_tx_mbytes": 0.0, "port_9_traffic_rx_mbytes": 1000.0, "port_9_traffic_tx_mbytes": 0.5, "port_9_speed_rx_mbytes": 1000.0, "port_9_speed_tx_mbytes": 0.5, "port_9_speed_io_mbytes": 4000.5, "port_9_sum_rx_mbytes": 3045036.94, "port_9_sum_tx_mbytes": 79279.5, "port_10_traffic_rx_mbytes": 50.0, "port_10_traffic_tx_mbytes": 5.0, "port_10_speed_rx_mbytes": 50.0, "port_10_speed_tx_mbytes": 5.0, "port_10_speed_io_mbytes": 55.0, "port_10_sum_rx_mbytes": 183257.85, "port_10_sum_tx_mbytes": 796625.86, "port_11_traffic_rx_mbytes": 1000.0, "port_11_traffic_tx_mbytes": 500.0, "port_11_speed_rx_mbytes": 1000.0, "port_11_speed_tx_mbytes": 500.0, "port_11_speed_io_mbytes": 50500.0, "port_11_sum_rx_mbytes": 1753508.0, "port_11_sum_tx_mbytes": 6093517.32, "port_12_traffic_rx_mbytes": 0.0, "port_12_traffic_tx_mbytes": 0.0, "port_12_speed_rx_mbytes": 0.0, "port_12_speed_tx_mbytes": 0.0, "port_12_speed_io_mbytes": 0.0, "port_12_sum_rx_mbytes": 2177.64, "port_12_sum_tx_mbytes": 3051.54, "port_13_traffic_rx_mbytes": 0.07, "port_13_traffic_tx_mbytes": 6.0, "port_13_speed_rx_mbytes": 0.07, "port_13_speed_tx_mbytes": 6.0, "port_13_speed_io_mbytes": 6.07, "port_13_sum_rx_mbytes": 841747.19, "port_13_sum_tx_mbytes": 23499.6, "port_14_traffic_rx_mbytes": 0.0, "port_14_traffic_tx_mbytes": 0.0, "port_14_speed_rx_mbytes": 0.0, "port_14_speed_tx_mbytes": 0.0, "port_14_speed_io_mbytes": 0.0, "port_14_sum_rx_mbytes": 0.0, "port_14_sum_tx_mbytes": 0.0, "port_15_traffic_rx_mbytes": 0.0, "port_15_traffic_tx_mbytes": 0.0, "port_15_speed_rx_mbytes": 0.0, "port_15_speed_tx_mbytes": 0.0, "port_15_speed_io_mbytes": 0.0, "port_15_sum_rx_mbytes": 0.0, "port_15_sum_tx_mbytes": 0.0, "port_16_traffic_rx_mbytes": 0.8, "port_16_traffic_tx_mbytes": 1000.0, "port_16_speed_rx_mbytes": 0.8, "port_16_speed_tx_mbytes": 1000.0, "port_16_speed_io_mbytes": 60000.8, "port_16_sum_rx_mbytes": 7508857.98, "port_16_sum_tx_mbytes": 13193221.99, "sum_port_traffic_rx": 4071.97, "sum_port_traffic_tx": 1545.15, "sum_port_speed_rx": 4071.97, "sum_port_speed_tx": 1545.15, "sum_port_speed_io": 5617.12, "port_16_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/000077500000000000000000000000001517216143300206505ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/0/000077500000000000000000000000001517216143300210075ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/0/login.htm000066400000000000000000000307631517216143300226420ustar00rootroot00000000000000
foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/0/monitoring_port_statistics.htm000066400000000000000000000152551517216143300272340ustar00rootroot00000000000000 Statistic
foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/0/status_status.htm000066400000000000000000000500431517216143300244510ustar00rootroot00000000000000 Status
foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/0/status_switch_info.htm000066400000000000000000000351071517216143300254460ustar00rootroot00000000000000 Status
foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/0/switch_infos.json000066400000000000000000000212371517216143300244060ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "Rack", "switch_serial_number": "a0b1c2d", "switch_bootloader": "unknown", "switch_firmware": "2.6.0.48", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "off", "port_2_modus_speed": true, "port_2_connection_speed": 0, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 100, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 1000, "port_7_status": "off", "port_7_modus_speed": true, "port_7_connection_speed": 0, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "port_9_status": "off", "port_9_modus_speed": true, "port_9_connection_speed": 0, "port_10_status": "off", "port_10_modus_speed": true, "port_10_connection_speed": 0, "port_11_status": "off", "port_11_modus_speed": true, "port_11_connection_speed": 0, "port_12_status": "off", "port_12_modus_speed": true, "port_12_connection_speed": 0, "port_13_status": "on", "port_13_modus_speed": true, "port_13_connection_speed": 1000, "port_14_status": "off", "port_14_modus_speed": true, "port_14_connection_speed": 0, "port_15_status": "on", "port_15_modus_speed": true, "port_15_connection_speed": 100, "port_16_status": "off", "port_16_modus_speed": true, "port_16_connection_speed": 0, "port_17_status": "on", "port_17_modus_speed": true, "port_17_connection_speed": 1000, "port_18_status": "on", "port_18_modus_speed": true, "port_18_connection_speed": 100, "port_19_status": "on", "port_19_modus_speed": true, "port_19_connection_speed": 1000, "port_20_status": "on", "port_20_modus_speed": true, "port_20_connection_speed": 1000, "port_21_status": "on", "port_21_modus_speed": true, "port_21_connection_speed": 1000, "port_22_status": "on", "port_22_modus_speed": true, "port_22_connection_speed": 1000, "port_23_status": "off", "port_23_modus_speed": true, "port_23_connection_speed": 0, "port_24_status": "off", "port_24_modus_speed": true, "port_24_connection_speed": 0, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 3152230.42, "port_1_sum_tx_mbytes": 1157642.03, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 176208.47, "port_2_sum_tx_mbytes": 327353.79, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 9491.24, "port_3_sum_tx_mbytes": 53163.4, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 2202.7, "port_4_sum_tx_mbytes": 21276.71, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 604621.36, "port_5_sum_tx_mbytes": 1234350.14, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 155232.39, "port_6_sum_tx_mbytes": 581283.97, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 0.0, "port_7_sum_tx_mbytes": 0.0, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 0.0, "port_8_sum_tx_mbytes": 0.0, "port_9_traffic_rx_mbytes": 0.0, "port_9_traffic_tx_mbytes": 0.0, "port_9_speed_rx_mbytes": 0.0, "port_9_speed_tx_mbytes": 0.0, "port_9_speed_io_mbytes": 0.0, "port_9_sum_rx_mbytes": 0.0, "port_9_sum_tx_mbytes": 0.0, "port_10_traffic_rx_mbytes": 0.0, "port_10_traffic_tx_mbytes": 0.0, "port_10_speed_rx_mbytes": 0.0, "port_10_speed_tx_mbytes": 0.0, "port_10_speed_io_mbytes": 0.0, "port_10_sum_rx_mbytes": 0.0, "port_10_sum_tx_mbytes": 0.0, "port_11_traffic_rx_mbytes": 0.0, "port_11_traffic_tx_mbytes": 0.0, "port_11_speed_rx_mbytes": 0.0, "port_11_speed_tx_mbytes": 0.0, "port_11_speed_io_mbytes": 0.0, "port_11_sum_rx_mbytes": 0.0, "port_11_sum_tx_mbytes": 0.0, "port_12_traffic_rx_mbytes": 0.0, "port_12_traffic_tx_mbytes": 0.0, "port_12_speed_rx_mbytes": 0.0, "port_12_speed_tx_mbytes": 0.0, "port_12_speed_io_mbytes": 0.0, "port_12_sum_rx_mbytes": 0.0, "port_12_sum_tx_mbytes": 0.0, "port_13_traffic_rx_mbytes": 0.0, "port_13_traffic_tx_mbytes": 0.0, "port_13_speed_rx_mbytes": 0.0, "port_13_speed_tx_mbytes": 0.0, "port_13_speed_io_mbytes": 0.0, "port_13_sum_rx_mbytes": 588420.62, "port_13_sum_tx_mbytes": 1230812.86, "port_14_traffic_rx_mbytes": 0.0, "port_14_traffic_tx_mbytes": 0.0, "port_14_speed_rx_mbytes": 0.0, "port_14_speed_tx_mbytes": 0.0, "port_14_speed_io_mbytes": 0.0, "port_14_sum_rx_mbytes": 0.0, "port_14_sum_tx_mbytes": 0.0, "port_15_traffic_rx_mbytes": 0.0, "port_15_traffic_tx_mbytes": 0.0, "port_15_speed_rx_mbytes": 0.0, "port_15_speed_tx_mbytes": 0.0, "port_15_speed_io_mbytes": 0.0, "port_15_sum_rx_mbytes": 21881.68, "port_15_sum_tx_mbytes": 23848.16, "port_16_traffic_rx_mbytes": 0.0, "port_16_traffic_tx_mbytes": 0.0, "port_16_speed_rx_mbytes": 0.0, "port_16_speed_tx_mbytes": 0.0, "port_16_speed_io_mbytes": 0.0, "port_16_sum_rx_mbytes": 0.0, "port_16_sum_tx_mbytes": 0.0, "port_17_traffic_rx_mbytes": 0.0, "port_17_traffic_tx_mbytes": 0.0, "port_17_speed_rx_mbytes": 0.0, "port_17_speed_tx_mbytes": 0.0, "port_17_speed_io_mbytes": 0.0, "port_17_sum_rx_mbytes": 4340.59, "port_17_sum_tx_mbytes": 24963.58, "port_18_traffic_rx_mbytes": 0.0, "port_18_traffic_tx_mbytes": 0.0, "port_18_speed_rx_mbytes": 0.0, "port_18_speed_tx_mbytes": 0.0, "port_18_speed_io_mbytes": 0.0, "port_18_sum_rx_mbytes": 122.62, "port_18_sum_tx_mbytes": 20815.25, "port_19_traffic_rx_mbytes": 0.0, "port_19_traffic_tx_mbytes": 0.0, "port_19_speed_rx_mbytes": 0.0, "port_19_speed_tx_mbytes": 0.0, "port_19_speed_io_mbytes": 0.0, "port_19_sum_rx_mbytes": 275477.76, "port_19_sum_tx_mbytes": 515245.53, "port_20_traffic_rx_mbytes": 0.0, "port_20_traffic_tx_mbytes": 0.0, "port_20_speed_rx_mbytes": 0.0, "port_20_speed_tx_mbytes": 0.0, "port_20_speed_io_mbytes": 0.0, "port_20_sum_rx_mbytes": 6873.11, "port_20_sum_tx_mbytes": 38213.84, "port_21_traffic_rx_mbytes": 0.0, "port_21_traffic_tx_mbytes": 0.0, "port_21_speed_rx_mbytes": 0.0, "port_21_speed_tx_mbytes": 0.0, "port_21_speed_io_mbytes": 0.0, "port_21_sum_rx_mbytes": 1279.78, "port_21_sum_tx_mbytes": 35559.4, "port_22_traffic_rx_mbytes": 0.0, "port_22_traffic_tx_mbytes": 0.0, "port_22_speed_rx_mbytes": 0.0, "port_22_speed_tx_mbytes": 0.0, "port_22_speed_io_mbytes": 0.0, "port_22_sum_rx_mbytes": 16828.32, "port_22_sum_tx_mbytes": 40470.27, "port_23_traffic_rx_mbytes": 0.0, "port_23_traffic_tx_mbytes": 0.0, "port_23_speed_rx_mbytes": 0.0, "port_23_speed_tx_mbytes": 0.0, "port_23_speed_io_mbytes": 0.0, "port_23_sum_rx_mbytes": 0.0, "port_23_sum_tx_mbytes": 0.0, "port_24_traffic_rx_mbytes": 0.0, "port_24_traffic_tx_mbytes": 0.0, "port_24_speed_rx_mbytes": 0.0, "port_24_speed_tx_mbytes": 0.0, "port_24_speed_io_mbytes": 0.0, "port_24_sum_rx_mbytes": 0.0, "port_24_sum_tx_mbytes": 0.0, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_24_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/1/000077500000000000000000000000001517216143300210105ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/1/login.htm000066400000000000000000000307631517216143300226430ustar00rootroot00000000000000
foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/1/monitoring_port_statistics.htm000066400000000000000000000146601517216143300272340ustar00rootroot00000000000000 Statistic
foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/1/status_status.htm000066400000000000000000000500431517216143300244520ustar00rootroot00000000000000 Status
foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/1/status_switch_info.htm000066400000000000000000000351071517216143300254470ustar00rootroot00000000000000 Status
foxey-py-netgear-plus-fec1337/pages/JGS524Ev2/1/switch_infos.json000066400000000000000000000212541517216143300244060ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "Rack", "switch_serial_number": "a0b1c2d", "switch_bootloader": "unknown", "switch_firmware": "2.6.0.48", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "off", "port_2_modus_speed": true, "port_2_connection_speed": 0, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 100, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_6_status": "on", "port_6_modus_speed": true, "port_6_connection_speed": 1000, "port_7_status": "off", "port_7_modus_speed": true, "port_7_connection_speed": 0, "port_8_status": "off", "port_8_modus_speed": true, "port_8_connection_speed": 0, "port_9_status": "off", "port_9_modus_speed": true, "port_9_connection_speed": 0, "port_10_status": "off", "port_10_modus_speed": true, "port_10_connection_speed": 0, "port_11_status": "off", "port_11_modus_speed": true, "port_11_connection_speed": 0, "port_12_status": "off", "port_12_modus_speed": true, "port_12_connection_speed": 0, "port_13_status": "on", "port_13_modus_speed": true, "port_13_connection_speed": 1000, "port_14_status": "off", "port_14_modus_speed": true, "port_14_connection_speed": 0, "port_15_status": "on", "port_15_modus_speed": true, "port_15_connection_speed": 100, "port_16_status": "off", "port_16_modus_speed": true, "port_16_connection_speed": 0, "port_17_status": "on", "port_17_modus_speed": true, "port_17_connection_speed": 1000, "port_18_status": "on", "port_18_modus_speed": true, "port_18_connection_speed": 100, "port_19_status": "on", "port_19_modus_speed": true, "port_19_connection_speed": 1000, "port_20_status": "on", "port_20_modus_speed": true, "port_20_connection_speed": 1000, "port_21_status": "on", "port_21_modus_speed": true, "port_21_connection_speed": 1000, "port_22_status": "on", "port_22_modus_speed": true, "port_22_connection_speed": 1000, "port_23_status": "off", "port_23_modus_speed": true, "port_23_connection_speed": 0, "port_24_status": "off", "port_24_modus_speed": true, "port_24_connection_speed": 0, "response_time_s": 0, "port_1_traffic_rx_mbytes": 1.0, "port_1_traffic_tx_mbytes": 0.1, "port_1_speed_rx_mbytes": 1.0, "port_1_speed_tx_mbytes": 0.1, "port_1_speed_io_mbytes": 1.1, "port_1_sum_rx_mbytes": 3152231.42, "port_1_sum_tx_mbytes": 1157642.13, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 5.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 5.0, "port_2_speed_io_mbytes": 5.0, "port_2_sum_rx_mbytes": 176208.48, "port_2_sum_tx_mbytes": 327358.79, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 9491.24, "port_3_sum_tx_mbytes": 53163.4, "port_4_traffic_rx_mbytes": 0.01, "port_4_traffic_tx_mbytes": 0.08, "port_4_speed_rx_mbytes": 0.01, "port_4_speed_tx_mbytes": 0.08, "port_4_speed_io_mbytes": 0.08, "port_4_sum_rx_mbytes": 2202.71, "port_4_sum_tx_mbytes": 21276.79, "port_5_traffic_rx_mbytes": 0.2, "port_5_traffic_tx_mbytes": 3.0, "port_5_speed_rx_mbytes": 0.2, "port_5_speed_tx_mbytes": 3.0, "port_5_speed_io_mbytes": 3.2, "port_5_sum_rx_mbytes": 604621.56, "port_5_sum_tx_mbytes": 1234353.14, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.01, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.01, "port_6_speed_io_mbytes": 0.01, "port_6_sum_rx_mbytes": 155232.39, "port_6_sum_tx_mbytes": 581283.98, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 0.0, "port_7_sum_tx_mbytes": 0.0, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 0.0, "port_8_sum_tx_mbytes": 0.0, "port_9_traffic_rx_mbytes": 0.0, "port_9_traffic_tx_mbytes": 0.0, "port_9_speed_rx_mbytes": 0.0, "port_9_speed_tx_mbytes": 0.0, "port_9_speed_io_mbytes": 0.0, "port_9_sum_rx_mbytes": 0.0, "port_9_sum_tx_mbytes": 0.0, "port_10_traffic_rx_mbytes": 0.0, "port_10_traffic_tx_mbytes": 0.0, "port_10_speed_rx_mbytes": 0.0, "port_10_speed_tx_mbytes": 0.0, "port_10_speed_io_mbytes": 0.0, "port_10_sum_rx_mbytes": 0.0, "port_10_sum_tx_mbytes": 0.0, "port_11_traffic_rx_mbytes": 0.0, "port_11_traffic_tx_mbytes": 0.0, "port_11_speed_rx_mbytes": 0.0, "port_11_speed_tx_mbytes": 0.0, "port_11_speed_io_mbytes": 0.0, "port_11_sum_rx_mbytes": 0.0, "port_11_sum_tx_mbytes": 0.0, "port_12_traffic_rx_mbytes": 0.0, "port_12_traffic_tx_mbytes": 0.0, "port_12_speed_rx_mbytes": 0.0, "port_12_speed_tx_mbytes": 0.0, "port_12_speed_io_mbytes": 0.0, "port_12_sum_rx_mbytes": 0.0, "port_12_sum_tx_mbytes": 0.0, "port_13_traffic_rx_mbytes": 0.0, "port_13_traffic_tx_mbytes": 0.0, "port_13_speed_rx_mbytes": 0.0, "port_13_speed_tx_mbytes": 0.0, "port_13_speed_io_mbytes": 0.0, "port_13_sum_rx_mbytes": 588420.62, "port_13_sum_tx_mbytes": 1230812.86, "port_14_traffic_rx_mbytes": 0.0, "port_14_traffic_tx_mbytes": 0.0, "port_14_speed_rx_mbytes": 0.0, "port_14_speed_tx_mbytes": 0.0, "port_14_speed_io_mbytes": 0.0, "port_14_sum_rx_mbytes": 0.0, "port_14_sum_tx_mbytes": 0.0, "port_15_traffic_rx_mbytes": 0.0, "port_15_traffic_tx_mbytes": 0.0, "port_15_speed_rx_mbytes": 0.0, "port_15_speed_tx_mbytes": 0.0, "port_15_speed_io_mbytes": 0.0, "port_15_sum_rx_mbytes": 21881.68, "port_15_sum_tx_mbytes": 23848.16, "port_16_traffic_rx_mbytes": 0.0, "port_16_traffic_tx_mbytes": 0.0, "port_16_speed_rx_mbytes": 0.0, "port_16_speed_tx_mbytes": 0.0, "port_16_speed_io_mbytes": 0.0, "port_16_sum_rx_mbytes": 0.0, "port_16_sum_tx_mbytes": 0.0, "port_17_traffic_rx_mbytes": 0.0, "port_17_traffic_tx_mbytes": 0.0, "port_17_speed_rx_mbytes": 0.0, "port_17_speed_tx_mbytes": 0.0, "port_17_speed_io_mbytes": 0.0, "port_17_sum_rx_mbytes": 4340.59, "port_17_sum_tx_mbytes": 24963.58, "port_18_traffic_rx_mbytes": 0.0, "port_18_traffic_tx_mbytes": 0.0, "port_18_speed_rx_mbytes": 0.0, "port_18_speed_tx_mbytes": 0.0, "port_18_speed_io_mbytes": 0.0, "port_18_sum_rx_mbytes": 122.62, "port_18_sum_tx_mbytes": 20815.25, "port_19_traffic_rx_mbytes": 0.0, "port_19_traffic_tx_mbytes": 0.0, "port_19_speed_rx_mbytes": 0.0, "port_19_speed_tx_mbytes": 0.0, "port_19_speed_io_mbytes": 0.0, "port_19_sum_rx_mbytes": 275477.76, "port_19_sum_tx_mbytes": 515245.53, "port_20_traffic_rx_mbytes": 0.0, "port_20_traffic_tx_mbytes": 0.0, "port_20_speed_rx_mbytes": 0.0, "port_20_speed_tx_mbytes": 0.0, "port_20_speed_io_mbytes": 0.0, "port_20_sum_rx_mbytes": 6873.11, "port_20_sum_tx_mbytes": 38213.84, "port_21_traffic_rx_mbytes": 0.0, "port_21_traffic_tx_mbytes": 0.0, "port_21_speed_rx_mbytes": 0.0, "port_21_speed_tx_mbytes": 0.0, "port_21_speed_io_mbytes": 0.0, "port_21_sum_rx_mbytes": 1279.78, "port_21_sum_tx_mbytes": 35559.4, "port_22_traffic_rx_mbytes": 0.0, "port_22_traffic_tx_mbytes": 0.0, "port_22_speed_rx_mbytes": 0.0, "port_22_speed_tx_mbytes": 0.0, "port_22_speed_io_mbytes": 0.0, "port_22_sum_rx_mbytes": 16828.32, "port_22_sum_tx_mbytes": 40470.27, "port_23_traffic_rx_mbytes": 0.0, "port_23_traffic_tx_mbytes": 0.0, "port_23_speed_rx_mbytes": 0.0, "port_23_speed_tx_mbytes": 0.0, "port_23_speed_io_mbytes": 0.0, "port_23_sum_rx_mbytes": 0.0, "port_23_sum_tx_mbytes": 0.0, "port_24_traffic_rx_mbytes": 0.0, "port_24_traffic_tx_mbytes": 0.0, "port_24_speed_rx_mbytes": 0.0, "port_24_speed_tx_mbytes": 0.0, "port_24_speed_io_mbytes": 0.0, "port_24_sum_rx_mbytes": 0.0, "port_24_sum_tx_mbytes": 0.0, "sum_port_traffic_rx": 1.21, "sum_port_traffic_tx": 8.19, "sum_port_speed_rx": 1.21, "sum_port_speed_tx": 8.19, "sum_port_speed_io": 9.4, "port_24_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/MS305E/000077500000000000000000000000001517216143300202715ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/MS305E/0/000077500000000000000000000000001517216143300204305ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/MS305E/0/ports.json000066400000000000000000000010071517216143300224700ustar00rootroot00000000000000{"portConfs":[{"portNo":1,"portName":"Port 1","linkSpeedConf":"Auto","linkSpeed":"1G","flowControl":false},{"portNo":2,"portName":"Port 2","linkSpeedConf":"Auto","linkSpeed":"2.5G","flowControl":false},{"portNo":3,"portName":"Port 3","linkSpeedConf":"Auto","linkSpeed":"1G","flowControl":false},{"portNo":4,"portName":"Port 4","linkSpeedConf":"Auto","linkSpeed":"Disabled","flowControl":false},{"portNo":5,"portName":"Port 5","linkSpeedConf":"Auto","linkSpeed":"100M_F","flowControl":false}],"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS305E/0/ports_statistics.json000066400000000000000000000007251517216143300247500ustar00rootroot00000000000000{"portStatistics":[{"portNo":1,"portName":"Port 1","bytesRecv":1000000,"bytesSend":500000,"crcPackets":0},{"portNo":2,"portName":"Port 2","bytesRecv":3000000,"bytesSend":1500000,"crcPackets":0},{"portNo":3,"portName":"Port 3","bytesRecv":500000,"bytesSend":250000,"crcPackets":0},{"portNo":4,"portName":"Port 4","bytesRecv":0,"bytesSend":0,"crcPackets":0},{"portNo":5,"portName":"Port 5","bytesRecv":100000,"bytesSend":50000,"crcPackets":0}],"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS305E/0/switch_infos.json000066400000000000000000000037061517216143300240300ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "MS305E Test", "switch_serial_number": "TEST00005", "switch_bootloader": "", "switch_firmware": "v1.0.0.9", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 2500, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 100, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 1.0, "port_1_sum_tx_mbytes": 0.5, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 3.0, "port_2_sum_tx_mbytes": 1.5, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.5, "port_3_sum_tx_mbytes": 0.25, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.1, "port_5_sum_tx_mbytes": 0.05, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_5_crc_errors": 0, "sum_port_crc_errors": 0 } foxey-py-netgear-plus-fec1337/pages/MS305E/1/000077500000000000000000000000001517216143300204315ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/MS305E/1/ports.json000066400000000000000000000010071517216143300224710ustar00rootroot00000000000000{"portConfs":[{"portNo":1,"portName":"Port 1","linkSpeedConf":"Auto","linkSpeed":"1G","flowControl":false},{"portNo":2,"portName":"Port 2","linkSpeedConf":"Auto","linkSpeed":"2.5G","flowControl":false},{"portNo":3,"portName":"Port 3","linkSpeedConf":"Auto","linkSpeed":"1G","flowControl":false},{"portNo":4,"portName":"Port 4","linkSpeedConf":"Auto","linkSpeed":"Disabled","flowControl":false},{"portNo":5,"portName":"Port 5","linkSpeedConf":"Auto","linkSpeed":"100M_F","flowControl":false}],"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS305E/1/ports_statistics.json000066400000000000000000000007251517216143300247510ustar00rootroot00000000000000{"portStatistics":[{"portNo":1,"portName":"Port 1","bytesRecv":1050000,"bytesSend":530000,"crcPackets":0},{"portNo":2,"portName":"Port 2","bytesRecv":3100000,"bytesSend":1550000,"crcPackets":0},{"portNo":3,"portName":"Port 3","bytesRecv":520000,"bytesSend":260000,"crcPackets":0},{"portNo":4,"portName":"Port 4","bytesRecv":0,"bytesSend":0,"crcPackets":0},{"portNo":5,"portName":"Port 5","bytesRecv":110000,"bytesSend":55000,"crcPackets":0}],"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS305E/1/switch_infos.json000066400000000000000000000037401517216143300240270ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "MS305E Test", "switch_serial_number": "TEST00005", "switch_bootloader": "", "switch_firmware": "v1.0.0.9", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 2500, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 1000, "port_4_status": "off", "port_4_modus_speed": true, "port_4_connection_speed": 0, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 100, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.05, "port_1_traffic_tx_mbytes": 0.03, "port_1_speed_rx_mbytes": 0.05, "port_1_speed_tx_mbytes": 0.03, "port_1_speed_io_mbytes": 0.08, "port_1_sum_rx_mbytes": 1.05, "port_1_sum_tx_mbytes": 0.53, "port_2_traffic_rx_mbytes": 0.1, "port_2_traffic_tx_mbytes": 0.05, "port_2_speed_rx_mbytes": 0.1, "port_2_speed_tx_mbytes": 0.05, "port_2_speed_io_mbytes": 0.15, "port_2_sum_rx_mbytes": 3.1, "port_2_sum_tx_mbytes": 1.55, "port_3_traffic_rx_mbytes": 0.02, "port_3_traffic_tx_mbytes": 0.01, "port_3_speed_rx_mbytes": 0.02, "port_3_speed_tx_mbytes": 0.01, "port_3_speed_io_mbytes": 0.03, "port_3_sum_rx_mbytes": 0.52, "port_3_sum_tx_mbytes": 0.26, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.0, "port_4_sum_tx_mbytes": 0.0, "port_5_traffic_rx_mbytes": 0.01, "port_5_traffic_tx_mbytes": 0.01, "port_5_speed_rx_mbytes": 0.01, "port_5_speed_tx_mbytes": 0.01, "port_5_speed_io_mbytes": 0.01, "port_5_sum_rx_mbytes": 0.11, "port_5_sum_tx_mbytes": 0.06, "sum_port_traffic_rx": 0.18, "sum_port_traffic_tx": 0.1, "sum_port_speed_rx": 0.18, "sum_port_speed_tx": 0.1, "sum_port_speed_io": 0.27, "port_5_crc_errors": 0, "sum_port_crc_errors": 0 } foxey-py-netgear-plus-fec1337/pages/MS305E/login.json000066400000000000000000000001531517216143300222730ustar00rootroot00000000000000{"sessionmax":false,"id":"12345 abc","token":"test_bearer_token","timeout":1800,"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS305E/login_session.json000066400000000000000000000000341517216143300240340ustar00rootroot00000000000000{"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS305E/system_status.json000066400000000000000000000003101517216143300241050ustar00rootroot00000000000000{"systemInfo":{"switchName":"MS305E Test","macAddr":"AA:BB:CC:DD:EE:00","serialNumber":"TEST00005","modelNumber":"MS305E","firmwareVersion":"v1.0.0.9","language":"English"},"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS308E/000077500000000000000000000000001517216143300202745ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/MS308E/0/000077500000000000000000000000001517216143300204335ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/MS308E/0/ports.json000066400000000000000000000014501517216143300224750ustar00rootroot00000000000000{"portConfs":[{"portNo":1,"portName":"Port 1","linkSpeedConf":"Auto","linkSpeed":"1G","flowControl":false},{"portNo":2,"portName":"Port 2","linkSpeedConf":"Auto","linkSpeed":"100M_F","flowControl":false},{"portNo":3,"portName":"Port 3","linkSpeedConf":"Auto","linkSpeed":"2.5G","flowControl":false},{"portNo":4,"portName":"Port 4","linkSpeedConf":"Auto","linkSpeed":"1G","flowControl":false},{"portNo":5,"portName":"Port 5","linkSpeedConf":"Auto","linkSpeed":"Disabled","flowControl":false},{"portNo":6,"portName":"Port 6","linkSpeedConf":"Auto","linkSpeed":"Disabled","flowControl":false},{"portNo":7,"portName":"Port 7","linkSpeedConf":"Auto","linkSpeed":"100M_F","flowControl":false},{"portNo":8,"portName":"Port 8","linkSpeedConf":"Auto","linkSpeed":"1G","flowControl":false}],"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS308E/0/ports_statistics.json000066400000000000000000000013151517216143300247470ustar00rootroot00000000000000{"portStatistics":[{"portNo":1,"portName":"Port 1","bytesRecv":1000000,"bytesSend":500000,"crcPackets":0},{"portNo":2,"portName":"Port 2","bytesRecv":200000,"bytesSend":100000,"crcPackets":0},{"portNo":3,"portName":"Port 3","bytesRecv":3000000,"bytesSend":1500000,"crcPackets":0},{"portNo":4,"portName":"Port 4","bytesRecv":500000,"bytesSend":250000,"crcPackets":0},{"portNo":5,"portName":"Port 5","bytesRecv":0,"bytesSend":0,"crcPackets":0},{"portNo":6,"portName":"Port 6","bytesRecv":0,"bytesSend":0,"crcPackets":0},{"portNo":7,"portName":"Port 7","bytesRecv":100000,"bytesSend":50000,"crcPackets":0},{"portNo":8,"portName":"Port 8","bytesRecv":800000,"bytesSend":400000,"crcPackets":0}],"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS308E/0/switch_infos.json000066400000000000000000000056061517216143300240340ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "MS308E Test", "switch_serial_number": "TEST12345", "switch_bootloader": "", "switch_firmware": "v1.0.0.9", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 100, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 2500, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_5_status": "off", "port_5_modus_speed": true, "port_5_connection_speed": 0, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 100, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 1.0, "port_1_sum_tx_mbytes": 0.5, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 0.2, "port_2_sum_tx_mbytes": 0.1, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 3.0, "port_3_sum_tx_mbytes": 1.5, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 0.5, "port_4_sum_tx_mbytes": 0.25, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.0, "port_5_sum_tx_mbytes": 0.0, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 0.1, "port_7_sum_tx_mbytes": 0.05, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 0.8, "port_8_sum_tx_mbytes": 0.4, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 } foxey-py-netgear-plus-fec1337/pages/MS308E/1/000077500000000000000000000000001517216143300204345ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/MS308E/1/ports.json000066400000000000000000000014501517216143300224760ustar00rootroot00000000000000{"portConfs":[{"portNo":1,"portName":"Port 1","linkSpeedConf":"Auto","linkSpeed":"1G","flowControl":false},{"portNo":2,"portName":"Port 2","linkSpeedConf":"Auto","linkSpeed":"100M_F","flowControl":false},{"portNo":3,"portName":"Port 3","linkSpeedConf":"Auto","linkSpeed":"2.5G","flowControl":false},{"portNo":4,"portName":"Port 4","linkSpeedConf":"Auto","linkSpeed":"1G","flowControl":false},{"portNo":5,"portName":"Port 5","linkSpeedConf":"Auto","linkSpeed":"Disabled","flowControl":false},{"portNo":6,"portName":"Port 6","linkSpeedConf":"Auto","linkSpeed":"Disabled","flowControl":false},{"portNo":7,"portName":"Port 7","linkSpeedConf":"Auto","linkSpeed":"100M_F","flowControl":false},{"portNo":8,"portName":"Port 8","linkSpeedConf":"Auto","linkSpeed":"1G","flowControl":false}],"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS308E/1/ports_statistics.json000066400000000000000000000013151517216143300247500ustar00rootroot00000000000000{"portStatistics":[{"portNo":1,"portName":"Port 1","bytesRecv":1050000,"bytesSend":530000,"crcPackets":0},{"portNo":2,"portName":"Port 2","bytesRecv":210000,"bytesSend":110000,"crcPackets":0},{"portNo":3,"portName":"Port 3","bytesRecv":3100000,"bytesSend":1550000,"crcPackets":0},{"portNo":4,"portName":"Port 4","bytesRecv":520000,"bytesSend":260000,"crcPackets":0},{"portNo":5,"portName":"Port 5","bytesRecv":0,"bytesSend":0,"crcPackets":0},{"portNo":6,"portName":"Port 6","bytesRecv":0,"bytesSend":0,"crcPackets":0},{"portNo":7,"portName":"Port 7","bytesRecv":110000,"bytesSend":55000,"crcPackets":0},{"portNo":8,"portName":"Port 8","bytesRecv":850000,"bytesSend":420000,"crcPackets":0}],"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS308E/1/switch_infos.json000066400000000000000000000056601517216143300240350ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "MS308E Test", "switch_serial_number": "TEST12345", "switch_bootloader": "", "switch_firmware": "v1.0.0.9", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 1000, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 100, "port_3_status": "on", "port_3_modus_speed": true, "port_3_connection_speed": 2500, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 1000, "port_5_status": "off", "port_5_modus_speed": true, "port_5_connection_speed": 0, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "on", "port_7_modus_speed": true, "port_7_connection_speed": 100, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.05, "port_1_traffic_tx_mbytes": 0.03, "port_1_speed_rx_mbytes": 0.05, "port_1_speed_tx_mbytes": 0.03, "port_1_speed_io_mbytes": 0.08, "port_1_sum_rx_mbytes": 1.05, "port_1_sum_tx_mbytes": 0.53, "port_2_traffic_rx_mbytes": 0.01, "port_2_traffic_tx_mbytes": 0.01, "port_2_speed_rx_mbytes": 0.01, "port_2_speed_tx_mbytes": 0.01, "port_2_speed_io_mbytes": 0.02, "port_2_sum_rx_mbytes": 0.21, "port_2_sum_tx_mbytes": 0.11, "port_3_traffic_rx_mbytes": 0.1, "port_3_traffic_tx_mbytes": 0.05, "port_3_speed_rx_mbytes": 0.1, "port_3_speed_tx_mbytes": 0.05, "port_3_speed_io_mbytes": 0.15, "port_3_sum_rx_mbytes": 3.1, "port_3_sum_tx_mbytes": 1.55, "port_4_traffic_rx_mbytes": 0.02, "port_4_traffic_tx_mbytes": 0.01, "port_4_speed_rx_mbytes": 0.02, "port_4_speed_tx_mbytes": 0.01, "port_4_speed_io_mbytes": 0.03, "port_4_sum_rx_mbytes": 0.52, "port_4_sum_tx_mbytes": 0.26, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 0.0, "port_5_sum_tx_mbytes": 0.0, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.01, "port_7_traffic_tx_mbytes": 0.01, "port_7_speed_rx_mbytes": 0.01, "port_7_speed_tx_mbytes": 0.01, "port_7_speed_io_mbytes": 0.01, "port_7_sum_rx_mbytes": 0.11, "port_7_sum_tx_mbytes": 0.06, "port_8_traffic_rx_mbytes": 0.05, "port_8_traffic_tx_mbytes": 0.02, "port_8_speed_rx_mbytes": 0.05, "port_8_speed_tx_mbytes": 0.02, "port_8_speed_io_mbytes": 0.07, "port_8_sum_rx_mbytes": 0.85, "port_8_sum_tx_mbytes": 0.42, "sum_port_traffic_rx": 0.24, "sum_port_traffic_tx": 0.12, "sum_port_speed_rx": 0.24, "sum_port_speed_tx": 0.12, "sum_port_speed_io": 0.36, "port_8_crc_errors": 0, "sum_port_crc_errors": 0 } foxey-py-netgear-plus-fec1337/pages/MS308E/login.json000066400000000000000000000001531517216143300222760ustar00rootroot00000000000000{"sessionmax":false,"id":"12345 abc","token":"test_bearer_token","timeout":1800,"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS308E/login_session.json000066400000000000000000000000341517216143300240370ustar00rootroot00000000000000{"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/MS308E/system_status.json000066400000000000000000000003101517216143300241100ustar00rootroot00000000000000{"systemInfo":{"switchName":"MS308E Test","macAddr":"AA:BB:CC:DD:EE:FF","serialNumber":"TEST12345","modelNumber":"MS308E","firmwareVersion":"v1.0.0.9","language":"English"},"errCode":0,"message":"OK"}foxey-py-netgear-plus-fec1337/pages/XS508TM/000077500000000000000000000000001517216143300204455ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/XS508TM/0/000077500000000000000000000000001517216143300206045ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/XS508TM/0/login000066400000000000000000000012021517216143300216320ustar00rootroot00000000000000NETGEAR
foxey-py-netgear-plus-fec1337/pages/XS508TM/0/port_configuration000066400000000000000000000105721517216143300244470ustar00rootroot00000000000000{ "resp": { "status": "success", "respCode": 0, "respMsg": "Operation success" }, "port_configuration": { "phy_ports": [ { "port": 1, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 7, "linkstatus": 0, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 2, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 3, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 4, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 5, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 6, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 7, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 8, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 9, "descp": "", "type": 1, "admin": 1, "autoNego": 1, "speedmode": 8, "speedstatus": 8, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 10, "descp": "", "type": 1, "admin": 1, "autoNego": 1, "speedmode": 8, "speedstatus": 8, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" } ], "lag_ports": [ { "port": 30, "descp": "", "type": 1, "admin": 1, "autoNego": 65535, "speedmode": 129, "speedstatus": 129, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": "", "mac": "54:07:7D:0D:98:33" }, { "port": 31, "descp": "", "type": 1, "admin": 1, "autoNego": 65535, "speedmode": 129, "speedstatus": 129, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": "", "mac": "54:07:7D:0D:98:33" }, { "port": 32, "descp": "", "type": 1, "admin": 1, "autoNego": 65535, "speedmode": 129, "speedstatus": 129, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": "", "mac": "54:07:7D:0D:98:33" }, { "port": 33, "descp": "", "type": 1, "admin": 1, "autoNego": 65535, "speedmode": 129, "speedstatus": 129, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": "", "mac": "54:07:7D:0D:98:33" } ], "cpu_ports": [ { "port": 29, "descp": "" } ] } } foxey-py-netgear-plus-fec1337/pages/XS508TM/0/port_stats000066400000000000000000000101271517216143300227320ustar00rootroot00000000000000{ "resp": { "status": "success", "respCode": 0, "respMsg": "Operation success" }, "port_stats": [ { "port": 1, "goodPktRx": 56345, "errPktRx": 0, "broadPktRx": 42871, "goodPktTx": 6250, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 2, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 3, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 4, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 5, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 6, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 7, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 8, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 9, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 10, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 30, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 41 }, { "port": 31, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 41 }, { "port": 32, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 41 }, { "port": 33, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 41 } ] } foxey-py-netgear-plus-fec1337/pages/XS508TM/0/system_information000066400000000000000000000031231517216143300244570ustar00rootroot00000000000000{ "resp": { "status": "success", "respCode": 0, "respMsg": "Operation success" }, "system_information": { "sysName": "", "sysLocation": "", "sysContact": "", "sysSN": "79V13B5VA0039", "sysProduct": "XS508TM S3600 Series 8-Port 10G/Multi-Gigabit Ethernet Smart Switch with 2 SFP+ Ports, 7.8.11.17, 1.0.0.2", "sysMac": "54:07:7D:0D:98:31", "sysObjectOid": "1.3.6.1.4.1.4526.100.4.100", "sysDateTime": "2025-02-22 02:12:40", "sysUpTimeDays": 0, "sysUpTimeHours": 0, "sysUpTimeMins": 8, "sysUpTimeSecs": 39, "txtVerModelName": "XS508TM", "txtBootVer": "1.0.0.2", "txtSwVer": "7.8.11.17", "powers": [ { "txtPowerSupply": 1, "txtPowerDescriptor": "PS-1", "txtPowerType": 1, "txtPowerState": 2 } ], "thermals": [ { "sensor": 1, "temp": 36, "maxTemp": 36, "state": 2, "descp": "Local" }, { "sensor": 2, "temp": 34, "maxTemp": 34, "state": 2, "descp": "Remote-1" }, { "sensor": 3, "temp": 36, "maxTemp": 36, "state": 2, "descp": "Remote-2" } ], "fans": [ { "txtFan": 1, "txtFanDescriptor": "FAN-1", "txtFanType": 1, "txtFanSpeed": 2968, "txtDutyLevel": 29, "txtFanState": 2 }, { "txtFan": 2, "txtFanDescriptor": "FAN-2", "txtFanType": 1, "txtFanSpeed": 3098, "txtDutyLevel": 29, "txtFanState": 2 } ] } } foxey-py-netgear-plus-fec1337/pages/XS508TM/1/000077500000000000000000000000001517216143300206055ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/XS508TM/1/login000066400000000000000000000012021517216143300216330ustar00rootroot00000000000000NETGEAR
foxey-py-netgear-plus-fec1337/pages/XS508TM/1/port_configuration000066400000000000000000000105721517216143300244500ustar00rootroot00000000000000{ "resp": { "status": "success", "respCode": 0, "respMsg": "Operation success" }, "port_configuration": { "phy_ports": [ { "port": 1, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 7, "linkstatus": 0, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 2, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 3, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 4, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 5, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 6, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 7, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 8, "descp": "", "type": 1, "admin": 1, "autoNego": 0, "speedmode": 1, "speedstatus": 130, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 9, "descp": "", "type": 1, "admin": 1, "autoNego": 1, "speedmode": 8, "speedstatus": 8, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" }, { "port": 10, "descp": "", "type": 1, "admin": 1, "autoNego": 1, "speedmode": 8, "speedstatus": 8, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": 0, "mac": "54:07:7D:0D:98:33" } ], "lag_ports": [ { "port": 30, "descp": "", "type": 1, "admin": 1, "autoNego": 65535, "speedmode": 129, "speedstatus": 129, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": "", "mac": "54:07:7D:0D:98:33" }, { "port": 31, "descp": "", "type": 1, "admin": 1, "autoNego": 65535, "speedmode": 129, "speedstatus": 129, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": "", "mac": "54:07:7D:0D:98:33" }, { "port": 32, "descp": "", "type": 1, "admin": 1, "autoNego": 65535, "speedmode": 129, "speedstatus": 129, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": "", "mac": "54:07:7D:0D:98:33" }, { "port": 33, "descp": "", "type": 1, "admin": 1, "autoNego": 65535, "speedmode": 129, "speedstatus": 129, "linkstatus": 1, "trap": 1, "maxFrmsz": 1500, "flowCtrl": "", "mac": "54:07:7D:0D:98:33" } ], "cpu_ports": [ { "port": 29, "descp": "" } ] } } foxey-py-netgear-plus-fec1337/pages/XS508TM/1/port_stats000066400000000000000000000101271517216143300227330ustar00rootroot00000000000000{ "resp": { "status": "success", "respCode": 0, "respMsg": "Operation success" }, "port_stats": [ { "port": 1, "goodPktRx": 57745, "errPktRx": 3, "broadPktRx": 42871, "goodPktTx": 7250, "errPktTx": 2, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 2, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 3, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 4, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 5, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 6, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 7, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 8, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 9, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 10, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 42 }, { "port": 30, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 41 }, { "port": 31, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 41 }, { "port": 32, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 41 }, { "port": 33, "goodPktRx": 0, "errPktRx": 0, "broadPktRx": 0, "goodPktTx": 0, "errPktTx": 0, "collisionPkt": 0, "lnkdwnevnt": 0, "lastResetDay": 0, "lastResetHour": 0, "lastResetMin": 12, "lastResetSec": 41 } ] } foxey-py-netgear-plus-fec1337/pages/XS508TM/1/system_information000066400000000000000000000031231517216143300244600ustar00rootroot00000000000000{ "resp": { "status": "success", "respCode": 0, "respMsg": "Operation success" }, "system_information": { "sysName": "", "sysLocation": "", "sysContact": "", "sysSN": "79V13B5VA0039", "sysProduct": "XS508TM S3600 Series 8-Port 10G/Multi-Gigabit Ethernet Smart Switch with 2 SFP+ Ports, 7.8.11.17, 1.0.0.2", "sysMac": "54:07:7D:0D:98:31", "sysObjectOid": "1.3.6.1.4.1.4526.100.4.100", "sysDateTime": "2025-02-22 02:12:40", "sysUpTimeDays": 0, "sysUpTimeHours": 0, "sysUpTimeMins": 8, "sysUpTimeSecs": 39, "txtVerModelName": "XS508TM", "txtBootVer": "1.0.0.2", "txtSwVer": "7.8.11.17", "powers": [ { "txtPowerSupply": 1, "txtPowerDescriptor": "PS-1", "txtPowerType": 1, "txtPowerState": 2 } ], "thermals": [ { "sensor": 1, "temp": 36, "maxTemp": 36, "state": 2, "descp": "Local" }, { "sensor": 2, "temp": 34, "maxTemp": 34, "state": 2, "descp": "Remote-1" }, { "sensor": 3, "temp": 36, "maxTemp": 36, "state": 2, "descp": "Remote-2" } ], "fans": [ { "txtFan": 1, "txtFanDescriptor": "FAN-1", "txtFanType": 1, "txtFanSpeed": 2968, "txtDutyLevel": 29, "txtFanState": 2 }, { "txtFan": 2, "txtFanDescriptor": "FAN-2", "txtFanType": 1, "txtFanSpeed": 3098, "txtDutyLevel": 29, "txtFanState": 2 } ] } } foxey-py-netgear-plus-fec1337/pages/XS512EM/000077500000000000000000000000001517216143300204215ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/XS512EM/0/000077500000000000000000000000001517216143300205605ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/XS512EM/0/homepage.html000066400000000000000000000000751517216143300232350ustar00rootroot00000000000000 foxey-py-netgear-plus-fec1337/pages/XS512EM/0/interface_stats.html000066400000000000000000000114141517216143300246250ustar00rootroot00000000000000 Port Statistics
Port Bytes Received Bytes Sent CRC Error Packets
1 2963383340021 492465196654 0
2 10048725743 312641144883 0
3 0 0 0
4 248054225056 3049584530436 0
5 146392343851 5155044076 11
6 0 0 0
7 0 0 0
8 36949772 5366544819 0
9 32951417155 23596209556 0
10 0 0 0
11 69193512 5327208434 0
12 941259342524 477503828111 0
foxey-py-netgear-plus-fec1337/pages/XS512EM/0/login.htm000066400000000000000000000076401517216143300224110ustar00rootroot00000000000000 NETGEAR XS512EM
XS512EM - 12-Port 10-Gigabit/Multi-Gigabit Ethernet Smart Managed Plus Switch
Password

foxey-py-netgear-plus-fec1337/pages/XS512EM/0/port_settings.html000066400000000000000000000444511517216143300243620ustar00rootroot00000000000000 Port Status
Port Port Description Port Status Speed Linked Speed Flow Control Max MTU
1 E SHOP Uplink (MAIN) Up Auto 5G Full Disable 9216
2 Living Room Up Auto 2.5G Full Disable 9216
3 Down Auto No Speed Disable 9216
4 Mediaserver Up Auto 10G Full Disable 9216
5 N SHOP Uplink Up Auto 1000M Full Disable 9216
6 Down Auto No Speed Disable 9216
7 Down Auto No Speed Disable 9216
8 Dell iDRAC Up Auto 1000M Full Disable 9216
9 Alexander Up Auto 2.5G Full Disable 9216
10 Down Auto No Speed Disable 9216
11 Up Auto 100M Full Disable 9216
12 Router Uplink (MAIN) Up Auto 10G Full Disable 9216
foxey-py-netgear-plus-fec1337/pages/XS512EM/0/switch_infos.json000066400000000000000000000110041517216143300241460ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "CLOSET", "switch_serial_number": "58T17B6543210", "switch_bootloader": "unknown", "switch_firmware": "1.0.2.8", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 5000, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 2500, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 10000, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "off", "port_7_modus_speed": true, "port_7_connection_speed": 0, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "port_9_status": "on", "port_9_modus_speed": true, "port_9_connection_speed": 2500, "port_10_status": "off", "port_10_modus_speed": true, "port_10_connection_speed": 0, "port_11_status": "on", "port_11_modus_speed": true, "port_11_connection_speed": 100, "port_12_status": "on", "port_12_modus_speed": true, "port_12_connection_speed": 10000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.0, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.0, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.0, "port_1_sum_rx_mbytes": 2963383.34, "port_1_sum_tx_mbytes": 492465.2, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 10048.73, "port_2_sum_tx_mbytes": 312641.14, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.0, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.0, "port_4_speed_io_mbytes": 0.0, "port_4_sum_rx_mbytes": 248054.23, "port_4_sum_tx_mbytes": 3049584.53, "port_5_traffic_rx_mbytes": 0.0, "port_5_traffic_tx_mbytes": 0.0, "port_5_speed_rx_mbytes": 0.0, "port_5_speed_tx_mbytes": 0.0, "port_5_speed_io_mbytes": 0.0, "port_5_sum_rx_mbytes": 146392.34, "port_5_sum_tx_mbytes": 5155.04, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 0.0, "port_7_sum_tx_mbytes": 0.0, "port_8_traffic_rx_mbytes": 0.0, "port_8_traffic_tx_mbytes": 0.0, "port_8_speed_rx_mbytes": 0.0, "port_8_speed_tx_mbytes": 0.0, "port_8_speed_io_mbytes": 0.0, "port_8_sum_rx_mbytes": 36.95, "port_8_sum_tx_mbytes": 5366.54, "port_9_traffic_rx_mbytes": 0.0, "port_9_traffic_tx_mbytes": 0.0, "port_9_speed_rx_mbytes": 0.0, "port_9_speed_tx_mbytes": 0.0, "port_9_speed_io_mbytes": 0.0, "port_9_sum_rx_mbytes": 32951.42, "port_9_sum_tx_mbytes": 23596.21, "port_10_traffic_rx_mbytes": 0.0, "port_10_traffic_tx_mbytes": 0.0, "port_10_speed_rx_mbytes": 0.0, "port_10_speed_tx_mbytes": 0.0, "port_10_speed_io_mbytes": 0.0, "port_10_sum_rx_mbytes": 0.0, "port_10_sum_tx_mbytes": 0.0, "port_11_traffic_rx_mbytes": 0.0, "port_11_traffic_tx_mbytes": 0.0, "port_11_speed_rx_mbytes": 0.0, "port_11_speed_tx_mbytes": 0.0, "port_11_speed_io_mbytes": 0.0, "port_11_sum_rx_mbytes": 69.19, "port_11_sum_tx_mbytes": 5327.21, "port_12_traffic_rx_mbytes": 0.0, "port_12_traffic_tx_mbytes": 0.0, "port_12_speed_rx_mbytes": 0.0, "port_12_speed_tx_mbytes": 0.0, "port_12_speed_io_mbytes": 0.0, "port_12_sum_rx_mbytes": 941259.34, "port_12_sum_tx_mbytes": 477503.83, "sum_port_traffic_rx": 0.0, "sum_port_traffic_tx": 0.0, "sum_port_speed_rx": 0.0, "sum_port_speed_tx": 0.0, "sum_port_speed_io": 0.0, "port_12_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/XS512EM/0/sysInfo.html000066400000000000000000000137001517216143300231010ustar00rootroot00000000000000 Switch Information
Product Name XS512EM
Switch Name
Serial Number 58T17B6543210
MAC Address 8c:3b:04:03:02:01
Firmware Version 1.0.2.8
DHCP Mode Refresh
IP Address
Subnet Mask
Gateway Address
Management VLAN ID (1-4093)
foxey-py-netgear-plus-fec1337/pages/XS512EM/1/000077500000000000000000000000001517216143300205615ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/pages/XS512EM/1/homepage.html000066400000000000000000000000751517216143300232360ustar00rootroot00000000000000 foxey-py-netgear-plus-fec1337/pages/XS512EM/1/interface_stats.html000066400000000000000000000107611517216143300246320ustar00rootroot00000000000000 Port Statistics
Port Bytes Received Bytes Sent CRC Error Packets
1 2963383350021 492465197654 0
2 10048725843 312641145883 0
3 0 0 0
4 248054229056 3049584570436 0
5 146392443851 5155944076 11
6 0 0 0
7 0 0 0
8 36959772 5367544819 0
9 32961417155 23597209556 0
10 0 0 0
11 69193512 5327208434 0
12 941259342524 477503828111 0
foxey-py-netgear-plus-fec1337/pages/XS512EM/1/login.htm000066400000000000000000000073551517216143300224150ustar00rootroot00000000000000 NETGEAR Web Managed Switch
XS512EM - 12-Port 10-Gigabit/Multi-Gigabit Ethernet Smart Managed Plus Switch
Password

foxey-py-netgear-plus-fec1337/pages/XS512EM/1/port_settings.html000066400000000000000000000444511517216143300243630ustar00rootroot00000000000000 Port Status
Port Port Description Port Status Speed Linked Speed Flow Control Max MTU
1 E SHOP Uplink (MAIN) Up Auto 5G Full Disable 9216
2 Living Room Up Auto 2.5G Full Disable 9216
3 Down Auto No Speed Disable 9216
4 Mediaserver Up Auto 10G Full Disable 9216
5 N SHOP Uplink Up Auto 1000M Full Disable 9216
6 Down Auto No Speed Disable 9216
7 Down Auto No Speed Disable 9216
8 Dell iDRAC Up Auto 1000M Full Disable 9216
9 Alexander Up Auto 2.5G Full Disable 9216
10 Down Auto No Speed Disable 9216
11 Up Auto 100M Full Disable 9216
12 Router Uplink (MAIN) Up Auto 10G Full Disable 9216
foxey-py-netgear-plus-fec1337/pages/XS512EM/1/switch_infos.json000066400000000000000000000110301517216143300241460ustar00rootroot00000000000000{ "switch_ip": "192.168.0.1", "switch_name": "CLOSET", "switch_serial_number": "58T17B6543210", "switch_bootloader": "unknown", "switch_firmware": "1.0.2.8", "port_1_status": "on", "port_1_modus_speed": true, "port_1_connection_speed": 5000, "port_2_status": "on", "port_2_modus_speed": true, "port_2_connection_speed": 2500, "port_3_status": "off", "port_3_modus_speed": true, "port_3_connection_speed": 0, "port_4_status": "on", "port_4_modus_speed": true, "port_4_connection_speed": 10000, "port_5_status": "on", "port_5_modus_speed": true, "port_5_connection_speed": 1000, "port_6_status": "off", "port_6_modus_speed": true, "port_6_connection_speed": 0, "port_7_status": "off", "port_7_modus_speed": true, "port_7_connection_speed": 0, "port_8_status": "on", "port_8_modus_speed": true, "port_8_connection_speed": 1000, "port_9_status": "on", "port_9_modus_speed": true, "port_9_connection_speed": 2500, "port_10_status": "off", "port_10_modus_speed": true, "port_10_connection_speed": 0, "port_11_status": "on", "port_11_modus_speed": true, "port_11_connection_speed": 100, "port_12_status": "on", "port_12_modus_speed": true, "port_12_connection_speed": 10000, "response_time_s": 0, "port_1_traffic_rx_mbytes": 0.01, "port_1_traffic_tx_mbytes": 0.0, "port_1_speed_rx_mbytes": 0.01, "port_1_speed_tx_mbytes": 0.0, "port_1_speed_io_mbytes": 0.01, "port_1_sum_rx_mbytes": 2963383.35, "port_1_sum_tx_mbytes": 492465.2, "port_2_traffic_rx_mbytes": 0.0, "port_2_traffic_tx_mbytes": 0.0, "port_2_speed_rx_mbytes": 0.0, "port_2_speed_tx_mbytes": 0.0, "port_2_speed_io_mbytes": 0.0, "port_2_sum_rx_mbytes": 10048.73, "port_2_sum_tx_mbytes": 312641.15, "port_3_traffic_rx_mbytes": 0.0, "port_3_traffic_tx_mbytes": 0.0, "port_3_speed_rx_mbytes": 0.0, "port_3_speed_tx_mbytes": 0.0, "port_3_speed_io_mbytes": 0.0, "port_3_sum_rx_mbytes": 0.0, "port_3_sum_tx_mbytes": 0.0, "port_4_traffic_rx_mbytes": 0.0, "port_4_traffic_tx_mbytes": 0.04, "port_4_speed_rx_mbytes": 0.0, "port_4_speed_tx_mbytes": 0.04, "port_4_speed_io_mbytes": 0.04, "port_4_sum_rx_mbytes": 248054.23, "port_4_sum_tx_mbytes": 3049584.57, "port_5_traffic_rx_mbytes": 0.1, "port_5_traffic_tx_mbytes": 0.9, "port_5_speed_rx_mbytes": 0.1, "port_5_speed_tx_mbytes": 0.9, "port_5_speed_io_mbytes": 1.0, "port_5_sum_rx_mbytes": 146392.44, "port_5_sum_tx_mbytes": 5155.94, "port_6_traffic_rx_mbytes": 0.0, "port_6_traffic_tx_mbytes": 0.0, "port_6_speed_rx_mbytes": 0.0, "port_6_speed_tx_mbytes": 0.0, "port_6_speed_io_mbytes": 0.0, "port_6_sum_rx_mbytes": 0.0, "port_6_sum_tx_mbytes": 0.0, "port_7_traffic_rx_mbytes": 0.0, "port_7_traffic_tx_mbytes": 0.0, "port_7_speed_rx_mbytes": 0.0, "port_7_speed_tx_mbytes": 0.0, "port_7_speed_io_mbytes": 0.0, "port_7_sum_rx_mbytes": 0.0, "port_7_sum_tx_mbytes": 0.0, "port_8_traffic_rx_mbytes": 0.01, "port_8_traffic_tx_mbytes": 1.0, "port_8_speed_rx_mbytes": 0.01, "port_8_speed_tx_mbytes": 1.0, "port_8_speed_io_mbytes": 1.01, "port_8_sum_rx_mbytes": 36.96, "port_8_sum_tx_mbytes": 5367.54, "port_9_traffic_rx_mbytes": 10.0, "port_9_traffic_tx_mbytes": 1.0, "port_9_speed_rx_mbytes": 10.0, "port_9_speed_tx_mbytes": 1.0, "port_9_speed_io_mbytes": 11.0, "port_9_sum_rx_mbytes": 32961.42, "port_9_sum_tx_mbytes": 23597.21, "port_10_traffic_rx_mbytes": 0.0, "port_10_traffic_tx_mbytes": 0.0, "port_10_speed_rx_mbytes": 0.0, "port_10_speed_tx_mbytes": 0.0, "port_10_speed_io_mbytes": 0.0, "port_10_sum_rx_mbytes": 0.0, "port_10_sum_tx_mbytes": 0.0, "port_11_traffic_rx_mbytes": 0.0, "port_11_traffic_tx_mbytes": 0.0, "port_11_speed_rx_mbytes": 0.0, "port_11_speed_tx_mbytes": 0.0, "port_11_speed_io_mbytes": 0.0, "port_11_sum_rx_mbytes": 69.19, "port_11_sum_tx_mbytes": 5327.21, "port_12_traffic_rx_mbytes": 0.0, "port_12_traffic_tx_mbytes": 0.0, "port_12_speed_rx_mbytes": 0.0, "port_12_speed_tx_mbytes": 0.0, "port_12_speed_io_mbytes": 0.0, "port_12_sum_rx_mbytes": 941259.34, "port_12_sum_tx_mbytes": 477503.83, "sum_port_traffic_rx": 10.12, "sum_port_traffic_tx": 2.94, "sum_port_speed_rx": 10.12, "sum_port_speed_tx": 2.94, "sum_port_speed_io": 13.07, "port_12_crc_errors": 0, "sum_port_crc_errors": 0 }foxey-py-netgear-plus-fec1337/pages/XS512EM/1/sysInfo.html000066400000000000000000000137001517216143300231020ustar00rootroot00000000000000 Switch Information
Product Name XS512EM
Switch Name
Serial Number 58T17B6543210
MAC Address 8c:3b:04:03:02:01
Firmware Version 1.0.2.8
DHCP Mode Refresh
IP Address
Subnet Mask
Gateway Address
Management VLAN ID (1-4093)
foxey-py-netgear-plus-fec1337/pyproject.toml000066400000000000000000000015671517216143300212430ustar00rootroot00000000000000[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "py-netgear-plus" dynamic = ["version"] authors = [ { name = "Michiel Fokke", email = "github@fokke.org" }, { name = "Christian Karrié", email = "ckarrie@gmail.com" }, ] description = "A library for interacting with Netgear Plus switches." readme = "README.md" requires-python = ">=3.10" classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", ] keywords = ["netgear", "plus", "switch", "api", "library"] dependencies = ["requests", "lxml"] [project.scripts] ngp-cli = "py_netgear_plus.ngp_cli:main" [project.urls] Homepage = "https://github.com/foxey/py-netgear-plus" Issues = "https://github.com/foxey/py-netgear-plus/issues" [tool.hatch.version] path = "src/py_netgear_plus/__init__.py" foxey-py-netgear-plus-fec1337/requirements.txt000066400000000000000000000001361517216143300216020ustar00rootroot00000000000000colorlog==6.10.1 ruff==0.15.11 hatchling==1.29.0 build==1.4.3 pytest==9.0.3 pytest-cov==7.1.0 foxey-py-netgear-plus-fec1337/scripts/000077500000000000000000000000001517216143300200055ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/scripts/lint000077500000000000000000000001271517216143300207010ustar00rootroot00000000000000#!/usr/bin/env bash set -e cd "$(dirname "$0")/.." ruff format . ruff check . --fix foxey-py-netgear-plus-fec1337/scripts/setup000077500000000000000000000002551517216143300210750ustar00rootroot00000000000000#!/usr/bin/env bash set -e cd "$(dirname "$0")/.." python3 -m pip install --upgrade pip python3 -m pip install --requirement requirements.txt python3 -m pip install -e . foxey-py-netgear-plus-fec1337/src/000077500000000000000000000000001517216143300171055ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/src/py_netgear_plus/000077500000000000000000000000001517216143300223055ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/src/py_netgear_plus/__init__.py000066400000000000000000001322731517216143300244260ustar00rootroot00000000000000"""Netgear API.""" import logging import re import time from contextlib import suppress from pathlib import Path from typing import Any from .fetcher import ( BaseResponse, LoginFailedError, NotLoggedInError, PageFetcher, PageFetcherConnectionError, PageNotLoadedError, Response, status_code_no_response, status_code_not_found, status_code_unauthorized, ) from .models import ( MODELS, AutodetectedSwitchModel, MultipleModelsDetectedError, PortNumberOutofRangeError, SwitchModelNotDetectedError, ) from .parsers import NetgearPlusPageParserError, create_page_parser __version__ = "0.6.3" DEFAULT_PAGE = "index.htm" MAX_AUTHENTICATION_FAILURES = 3 PORT_STATUS_CONNECTED = ["Aktiv", "Up", "UP", "CONNECTED"] PORT_MODUS_SPEED = ["Auto"] SWITCH_STATES = ["on", "off"] FLOW_CONTROL = ["Enable", "Disable"] _LOGGER = logging.getLogger(__name__) def _from_bytes_to_megabytes(v: float) -> float: bytes_to_mbytes = 1e-6 return float(f"{round(v * bytes_to_mbytes, 2):.2f}") def _normalize_flow_control(value: Any) -> int | None: """Return protocol value for flow control when it can be inferred.""" if value is None: return None if isinstance(value, bool): return 1 if value else 2 if isinstance(value, int): return value if value in (1, 2) else None normalized = str(value).strip().lower() flow_control_mapping = { "1": 1, "true": 1, "enable": 1, "enabled": 1, "aktiv": 1, "2": 2, "false": 2, "disable": 2, "disabled": 2, "deaktiviert": 2, } return flow_control_mapping.get(normalized) def _get_pending_apply_delay(response: Response | BaseResponse) -> float | None: """Return wait time if switch accepted a change and asks to wait.""" if not getattr(response, "content", None): return None content = response.content if isinstance(content, str): content = content.encode("utf-8") if b"Please wait..." not in content: return None match = re.search(rb'http-equiv="refresh"\s+content\s*=\s*["\']?\s*(\d+)', content) if match: return float(match.group(1)) return 4.0 class InvalidPortStatusError(Exception): """Number of statusses do not match number of ports.""" class InvalidSwitchStateError(Exception): """State should be one of the options in SWITCH_STATES.""" class InvalidPoEPortError(Exception): """Port is not a PoE port.""" class NetgearSwitchConnector: """Representation of a Netgear Switch.""" def __init__(self, host: str, password: str) -> None: """Initialize Connector Object.""" self.host = host # initial values self.switch_model = AutodetectedSwitchModel self._page_fetcher = PageFetcher(host) self._page_parser = create_page_parser() self.ports = 0 self.poe_ports = [] self._switch_bootloader = "unknown" # sleep time between requests self.sleep_time = 0.25 # Login related instance variables # plain login password self._password = password # Model page template param variables self._client_hash = None self._gambit = None self._authentication_failure_count = 0 # previous data calculation self._previous_timestamp = time.perf_counter() self._previous_data = {} # current data self._loaded_switch_metadata = {} _LOGGER.debug( "[NetgearSwitchConnector] instance (v%s) created for IP=%s", __version__, self.host, ) _LOGGER.debug( "[NetgearSwitchConnector] DEBUG logging enabled. " "Your logs may contain sensitve information like " "passwords or session cookies. Do not use in production." ) def turn_on_offline_mode(self, path_prefix: str) -> None: """Turn on offline mode.""" self._page_fetcher.turn_on_offline_mode(path_prefix) def turn_on_online_mode(self) -> None: """Turn on online mode.""" self._page_fetcher.turn_on_online_mode() def get_offline_mode(self) -> bool: """Get offline mode status.""" return self._page_fetcher.offline_mode @property def _is_json_api(self) -> bool: """Return True if switch uses JSON REST API.""" return getattr(self.switch_model, "API_TYPE", "") == "json_rest" def _json_api_login(self) -> bool: """Login via JSON REST API (MS-series switches).""" login_template = self.switch_model.LOGIN_TEMPLATE login_url = login_template["url"].format(ip=self.host) login_method = login_template["method"] session_template = self.switch_model.LOGIN_SESSION_TEMPLATE session_url = session_template["url"].format(ip=self.host) session_method = session_template["method"] try: response = self._page_fetcher.json_request( login_method, login_url, data={"password": self._password}, ) if not self._page_fetcher.has_ok_status(response): return False data = response.json() if data.get("errCode") != 0: return False token = data.get("token") session_id = data.get("id") if not token or not session_id: return False self._page_fetcher.set_bearer_token(token) response2 = self._page_fetcher.json_request( session_method, session_url, data={"id": session_id, "status": True}, ) if not self._page_fetcher.has_ok_status(response2): self._page_fetcher.clear_bearer_token() return False except (PageFetcherConnectionError, ValueError, KeyError): return False _LOGGER.info( "[NetgearSwitchConnector._json_api_login] " "JSON REST API login successful for IP=%s", self.host, ) return True def _json_api_fetch(self, templates: list) -> Response | BaseResponse: """Fetch a JSON REST API endpoint with retry on auth failure.""" for template in templates: url = template["url"].format(ip=self.host) method = template["method"] response = self._page_fetcher.json_request(method, url) if ( response.status_code == status_code_unauthorized and self._json_api_login() ): response = self._page_fetcher.json_request(method, url) if self._page_fetcher.has_ok_status(response): return response message = f"Failed to load any JSON API endpoint: {templates}" raise PageNotLoadedError(message) def _autodetect_json_api(self) -> type[AutodetectedSwitchModel] | None: """Try to detect switch model via JSON REST API.""" json_api_models = [ m for m in MODELS if getattr(m, "API_TYPE", "") == "json_rest" ] for mdl_cls in json_api_models: mdl = mdl_cls() # Temporarily set model so login templates are available self._set_instance_attributes_by_model(mdl) with suppress(PageFetcherConnectionError, PageNotLoadedError): response = self._json_api_fetch(mdl.AUTODETECT_TEMPLATES) try: data = response.json() model_number = data.get("systemInfo", {}).get("modelNumber", "") if model_number == mdl.MODEL_NAME: self._page_parser = create_page_parser( self.switch_model.MODEL_NAME ) return self.switch_model except (ValueError, KeyError): pass self.switch_model = AutodetectedSwitchModel return None def autodetect_model(self) -> type[AutodetectedSwitchModel]: """Detect switch model from login page contents.""" _LOGGER.debug( "[NetgearSwitchConnector.autodetect_model] called for IP=%s", self.host ) # Try JSON REST API detection (MS-series switches) json_api_model = self._autodetect_json_api() if json_api_model: _LOGGER.info( "[NetgearSwitchConnector.autodetect_model] " "found %s switch via JSON REST API.", json_api_model.MODEL_NAME, ) return json_api_model for template in AutodetectedSwitchModel.AUTODETECT_TEMPLATES: response = None url = template["url"].format(ip=self.host) method = template["method"] with suppress(PageFetcherConnectionError): response = self._page_fetcher.request( method, url, ) if response and self._page_fetcher.has_ok_status(response): passed_checks_by_model = {} matched_models = [] for mdl_cls in MODELS: mdl = mdl_cls() if getattr(mdl, "API_TYPE", "") == "json_rest": continue mdl_name = mdl.MODEL_NAME passed_checks_by_model[mdl_name] = {} autodetect_funcs = mdl.get_autodetect_funcs() for func_name, expected_results in autodetect_funcs: func_result = getattr(self._page_parser, func_name)(response) check_successful = func_result in expected_results passed_checks_by_model[mdl_name][func_name] = check_successful # check_login_switchinfo_tag beats them all if ( func_name == "check_login_switchinfo_tag" and check_successful ): matched_models.append(mdl) values_for_current_mdl = passed_checks_by_model[mdl_name].values() if all(values_for_current_mdl) and mdl not in matched_models: matched_models.append(mdl) if len(matched_models) == 1: # set local settings self._set_instance_attributes_by_model(matched_models[0]) _LOGGER.info( "[NetgearSwitchConnector.autodetect_model] found %s switch.", matched_models[0].MODEL_NAME, ) if self.switch_model: self._page_parser = create_page_parser( self.switch_model.MODEL_NAME ) return self.switch_model if len(matched_models) > 1: raise MultipleModelsDetectedError(str(matched_models)) _LOGGER.debug( "[NetgearSwitchConnector.autodetect_model] " "passed_checks_by_model=%s matched_models=%s", passed_checks_by_model, matched_models, ) raise SwitchModelNotDetectedError def _set_instance_attributes_by_model( self, switch_model: type[AutodetectedSwitchModel] ) -> None: self.switch_model = switch_model self.ports = switch_model.PORTS self.poe_ports = switch_model.POE_PORTS self._previous_data = { "traffic_tx": [0] * self.ports, "traffic_rx": [0] * self.ports, "crc_errors": [0] * self.ports, "speed_io": [0] * self.ports, "sum_rx": [0] * self.ports, "sum_tx": [0] * self.ports, } def get_unique_id(self) -> str: """Return unique identifier from switch model and ip address.""" if self.switch_model.MODEL_NAME == "": _LOGGER.debug( "[NetgearSwitchConnector.get_unique_id] switch_model is None, " "try NetgearSwitchConnector.autodetect_model" ) self.autodetect_model() _LOGGER.debug( "[NetgearSwitchConnector.get_unique_id] now switch_model is %s", str(self.switch_model), ) model_lower = self.switch_model.MODEL_NAME.lower() return model_lower + "_" + self.host.replace(".", "_") def _handle_soft_authentication_failure( self, response: Response | BaseResponse ) -> None: """Handle soft authentication failure.""" # Clear cached login data self._page_fetcher.clear_login_page_response() if "content" not in dir(response): message = "No content in login form response." raise LoginFailedError(message) # Handling Error Messages error_msg = self._page_parser.parse_error(response) if error_msg: _LOGGER.warning( "[NetgearSwitchConnector.handle_soft_authentication_failure]" ' [IP: %s] Response from switch: "%s"', self.host, error_msg, ) else: _LOGGER.debug( "[NetgearSwitchConnector.handle_soft_authentication_failure]" " No error message found in response:\n\n%s", response.content.decode("utf-8"), ) self._authentication_failure_count += 1 if self._authentication_failure_count >= MAX_AUTHENTICATION_FAILURES: count = self._authentication_failure_count message = f"Too many authentication failures ({count})." raise LoginFailedError(message) def get_login_cookie(self) -> bool: """Login and save returned cookie.""" if not self.switch_model or self.switch_model.MODEL_NAME == "": self.autodetect_model() if self._is_json_api: if self._page_fetcher.has_bearer_token(): return True return self._json_api_login() if not self._page_fetcher.get_login_page_response(): self._page_fetcher.check_login_url(self.switch_model) rand = self._page_parser.parse_login_form_rand( self._page_fetcher.get_login_page_response() ) response = self._page_fetcher.get_login_response( self.switch_model, self._password, rand ) _LOGGER.debug( "[NetgearSwitchConnector.get_login_cookie] looking for cookies: %s", ", ".join(self.switch_model.ALLOWED_COOKIE_TYPES), ) # GS31xEP(P) series switches return the cookie value in a hidden form element self._gambit = self._page_parser.parse_gambit_tag(response) if self._gambit: self._page_fetcher.set_cookie( self.switch_model.ALLOWED_COOKIE_TYPES[0], self._gambit ) _LOGGER.debug("[NetgearSwitchConnector.get_login_cookie] Found Gambit tag:") _LOGGER.debug( "[NetgearSwitchConnector.get_login_cookie] Setting cookie %s=%s", self.switch_model.ALLOWED_COOKIE_TYPES[0], str(self._gambit), ) self._authentication_failure_count = 0 return True # Other switches return a cookie on successful login for ct in self.switch_model.ALLOWED_COOKIE_TYPES: cookie = response.cookies.get(ct, None) if cookie: _LOGGER.debug( "[NetgearSwitchConnector.get_login_cookie] Found cookie %s", ct ) self._page_fetcher.set_cookie(ct, cookie) self._authentication_failure_count = 0 return True _LOGGER.debug( "[NetgearSwitchConnector.get_login_cookie] " "No Gambit tag or valid cookie found." ) self._handle_soft_authentication_failure(response) return False def get_cookie(self) -> tuple[str | None, str | None]: """Return cookie.""" return self._page_fetcher.get_cookie() def set_cookie(self, name: str, content: str) -> None: """Return cookie.""" if name == "gambitCookie": self._gambit = content return self._page_fetcher.set_cookie(name, content) def _validate_switch_port_request(self, port: int, state: str) -> None: """Validate switch_port inputs and model capabilities.""" if not self.switch_model.MODEL_NAME: self.autodetect_model() if state not in SWITCH_STATES: message = f'State "{state}" not in {SWITCH_STATES}.' raise InvalidSwitchStateError(message) if not self.switch_model.SWITCH_PORT_TEMPLATES: message = "No switch port templates found." raise NotImplementedError(message) if port < 1 or port > self.ports: message = f"Port {port} not in range 1-{self.ports}." raise PortNumberOutofRangeError(message) def _request_switch_port_change( self, method: str, url: str, data: dict[str, Any] ) -> Response | BaseResponse: """Send a switch_port request, retrying once after login refresh.""" try: return self._page_fetcher.request(method, url, data) except NotLoggedInError as error: if self.get_login_cookie(): return self._page_fetcher.request(method, url, data) message = "Not logged in and unable to login." raise LoginFailedError(message) from error def delete_login_cookie(self) -> bool: """Logout and delete cookie.""" """Only used while testing. Prevents "Maximum number of sessions" error.""" if not self.switch_model or self.switch_model.MODEL_NAME == "": self.autodetect_model() if self._is_json_api: self._page_fetcher.clear_bearer_token() return True response = BaseResponse() for template in self.switch_model.LOGOUT_TEMPLATES: url = template["url"].format(ip=self.host) method = template["method"] data = {} self._page_fetcher.set_data_from_template(template, self, data) if not self.get_offline_mode(): try: response = self._page_fetcher.request(method, url, data) break # Exit the loop if the request is successful except NotLoggedInError: response.status_code = status_code_unauthorized response.content = b"" break except PageFetcherConnectionError: _LOGGER.debug( "NetgearSwitchConnector.fetch_page: " "caught PageFetcherConnectionError" ) response.status_code = status_code_no_response response.content = b"" break # Stop retrying after a connection error else: response = self._page_fetcher.get_page_from_file(url) if response.status_code != status_code_not_found: break _LOGGER.debug( "[NetgearSwitchConnector.delete_login_cookie] " "logout response status code=%s", response.status_code, ) self._page_fetcher.clear_cookie() return response.status_code != status_code_not_found def reboot(self) -> bool: """Reboot the switch.""" if not self.switch_model.has_reboot_button(): _LOGGER.info("[NetgearSwitchConnector.reboot] Reboot button not available.") return False response = BaseResponse() for template in self.switch_model.SWITCH_REBOOT_TEMPLATES: url = template["url"].format(ip=self.host) method = template["method"] data = {} if not self.get_offline_mode(): self._page_fetcher.set_data_from_template(template, self, data) response = self.fetch_page(method, url, data) if self._page_parser.parse_reboot_success(response): return True _LOGGER.debug( "[NetgearSwitchConnector.reboot] failed to load any page of templates: %s", self.switch_model.SWITCH_REBOOT_TEMPLATES, ) return False def fetch_page(self, method: str, url: str, data: dict) -> Response | BaseResponse: """Fetch url and retry when first response is a redirect to the login page.""" response = BaseResponse() if not self.get_offline_mode(): for attempt in range(2): try: response = self._page_fetcher.request(method, url, data) break # Exit the loop if the request is successful except NotLoggedInError as error: if attempt == 0 and self.get_login_cookie(): continue # Retry the request if login cookie is available message = "Not logged in and unable to login." raise LoginFailedError(message) from error except PageFetcherConnectionError: _LOGGER.debug( "NetgearSwitchConnector.fetch_page: " "caught PageFetcherConnectionError" ) response.status_code = status_code_no_response response.content = b"" break # Stop retrying after a connection error else: response = self._page_fetcher.get_page_from_file(url) return response def fetch_page_from_templates(self, templates: list) -> Response | BaseResponse: """Return response for 1st successful request from templates.""" response = BaseResponse() for template in templates: url = template["url"].format(ip=self.host) method = template["method"] data = {} if not self.get_offline_mode(): self._page_fetcher.set_data_from_template(template, self, data) response = self.fetch_page(method, url, data) if self._page_fetcher.has_ok_status(response): return response message = f"Failed to load any page of templates: {templates}" raise PageNotLoadedError(message) def get_switch_infos(self) -> dict[str, Any]: """Return dict with all available statistics.""" if not self.switch_model.MODEL_NAME: self.autodetect_model() current_data = {} switch_data = {} if not self._loaded_switch_metadata: self._get_switch_metadata() switch_data.update(**self._loaded_switch_metadata) # Fetch Port Status time.sleep(self.sleep_time) switch_data.update(self._get_port_status()) # Hold fire time.sleep(self.sleep_time) _start_time = time.perf_counter() current_data = self._initialize_current_data() # Parse port statistics html current_data.update(self._get_port_statistics()) if not self.get_offline_mode(): sample_time = _start_time - self._previous_timestamp else: sample_time = 0 switch_data["response_time_s"] = round(sample_time, 1) self._update_current_data(current_data, switch_data, sample_time) switch_data.update(self._updated_switch_data(current_data)) # Partially supported models fail parsing below this line if not self.switch_model.SUPPORTED: return switch_data if len(self.switch_model.POE_PORTS): time.sleep(self.sleep_time) switch_data.update(self._get_poe_port_config()) time.sleep(self.sleep_time) switch_data.update(self._get_poe_port_status()) # set previous data self._previous_timestamp = time.perf_counter() self._previous_data = current_data return switch_data def _get_switch_metadata(self) -> None: if not self.switch_model: self.autodetect_model() if self._is_json_api: page = self._json_api_fetch(self.switch_model.SWITCH_INFO_TEMPLATES) else: page = self.fetch_page_from_templates( self.switch_model.SWITCH_INFO_TEMPLATES ) if not page.content: return switch_metadata = {"switch_ip": self.host} if not self._is_json_api: self._client_hash = self._page_parser.parse_client_hash(page) if self.switch_model.SWITCH_LED_TEMPLATES: switch_metadata.update(self._page_parser.parse_led_status(page)) # Avoid a second call on next get_switch_infos() call self._loaded_switch_metadata = ( switch_metadata | self._page_parser.parse_switch_metadata(page) ) def _get_port_statistics(self) -> dict[str, Any]: if self._is_json_api: response = self._json_api_fetch(self.switch_model.PORT_STATISTICS_TEMPLATES) else: response = self.fetch_page_from_templates( self.switch_model.PORT_STATISTICS_TEMPLATES ) return self._page_parser.parse_port_statistics(response, self.ports) def _initialize_current_data(self) -> dict: """Initialize current data dictionary with default values.""" current_data = {} for key in [ "sum_port_traffic_rx", "sum_port_traffic_tx", "sum_port_crc_errors", "sum_port_speed_rx", "sum_port_speed_tx", ]: current_data[key] = 0 return current_data def _update_current_data( self, current_data: dict, switch_data: dict, sample_time: float ) -> None: """Update current data with calculated values.""" sample_factor = 1 if not sample_time else 1 / sample_time for port_number0 in range(self.ports): try: port_number = port_number0 + 1 current_data[f"port_{port_number}_traffic_rx"] = ( 0 if (self._previous_data["traffic_rx"][port_number0] == 0) else ( current_data["traffic_rx"][port_number0] - self._previous_data["traffic_rx"][port_number0] ) ) current_data[f"port_{port_number}_traffic_tx"] = ( 0 if (self._previous_data["traffic_tx"][port_number0] == 0) else ( current_data["traffic_tx"][port_number0] - self._previous_data["traffic_tx"][port_number0] ) ) current_data[f"port_{port_number}_crc_errors"] = ( 0 if (self._previous_data["crc_errors"][port_number0] == 0) else ( current_data["crc_errors"][port_number0] - self._previous_data["crc_errors"][port_number0] ) ) current_data[f"port_{port_number}_sum_rx"] = current_data["sum_rx"][ port_number0 ] current_data[f"port_{port_number}_sum_tx"] = current_data["sum_tx"][ port_number0 ] current_data[f"port_{port_number}_speed_rx"] = int( current_data[f"port_{port_number}_traffic_rx"] * sample_factor ) current_data[f"port_{port_number}_speed_tx"] = int( current_data[f"port_{port_number}_traffic_tx"] * sample_factor ) current_data[f"port_{port_number}_speed_io"] = ( current_data[f"port_{port_number}_speed_rx"] + current_data[f"port_{port_number}_speed_tx"] ) except IndexError: _LOGGER.debug("IndexError at port_number0=%s", port_number0) continue # Lowpass-Filter keys = [ "traffic_rx", "traffic_tx", "crc_errors", "speed_rx", "speed_tx", "speed_io", ] for key in keys: current_data[f"port_{port_number}_{key}"] = max( current_data[f"port_{port_number}_{key}"], 0 ) # Access old data if value is 0 port_status_is_connected = ( switch_data.get(f"port_{port_number}_status") == "on" ) if port_status_is_connected: keys = ["sum_rx", "sum_tx", "speed_io"] for key in keys: if current_data[f"port_{port_number}_{key}"] < 0: current_data[f"port_{port_number}_{key}"] = self._previous_data[ key ][port_number0] current_data[key][port_number0] = current_data[ f"port_{port_number}_{key}" ] _LOGGER.info( "Fallback to previous data: port_nr=%s port_%s=%s", port_number, key, current_data[f"port_{port_number}_{key}"], ) # Highpass-Filter (max 1e9 B/s = 1GB/s per port) hp_max_traffic = 1e9 / sample_factor current_data[f"port_{port_number}_traffic_rx"] = min( current_data[f"port_{port_number}_traffic_rx"], hp_max_traffic ) current_data[f"port_{port_number}_traffic_tx"] = min( current_data[f"port_{port_number}_traffic_tx"], hp_max_traffic ) current_data[f"port_{port_number}_crc_errors"] = min( current_data[f"port_{port_number}_crc_errors"], hp_max_traffic ) # Highpass-Filter (max 1e9 B/s = 1GB/s per port) # speed is already normalized to 1s hp_max_speed = 1e9 current_data[f"port_{port_number}_speed_rx"] = min( current_data[f"port_{port_number}_speed_rx"], hp_max_speed ) current_data[f"port_{port_number}_speed_tx"] = min( current_data[f"port_{port_number}_speed_tx"], hp_max_speed ) # Sum up all metrics in key dict for key in [ "traffic_rx", "traffic_tx", "crc_errors", "speed_rx", "speed_tx", ]: current_data[f"sum_port_{key}"] += current_data[ f"port_{port_number}_{key}" ] current_data["sum_port_speed_io"] = ( current_data["sum_port_speed_rx"] + current_data["sum_port_speed_tx"] ) # set for later (previous data) current_data["speed_io"][port_number0] = current_data[ f"port_{port_number}_speed_io" ] def _updated_switch_data(self, current_data: dict) -> dict: switch_data = {} for port_number in range(1, self.ports + 1): keys = [ "traffic_rx", "traffic_tx", "speed_rx", "speed_tx", "speed_io", "sum_rx", "sum_tx", ] for key in keys: switch_data[f"port_{port_number}_{key}_mbytes"] = ( _from_bytes_to_megabytes(current_data[f"port_{port_number}_{key}"]) ) switch_data["sum_port_traffic_rx"] = _from_bytes_to_megabytes( current_data["sum_port_traffic_rx"] ) switch_data["sum_port_traffic_tx"] = _from_bytes_to_megabytes( current_data["sum_port_traffic_tx"] ) switch_data["sum_port_speed_rx"] = _from_bytes_to_megabytes( current_data["sum_port_speed_rx"] ) switch_data["sum_port_speed_tx"] = _from_bytes_to_megabytes( current_data["sum_port_speed_tx"] ) switch_data["sum_port_speed_io"] = _from_bytes_to_megabytes( current_data["sum_port_speed_io"] ) switch_data[f"port_{port_number}_crc_errors"] = current_data[ f"port_{port_number}_crc_errors" ] switch_data["sum_port_crc_errors"] = current_data["sum_port_crc_errors"] return switch_data def _get_poe_port_config(self) -> dict: response = self.fetch_page_from_templates( self.switch_model.POE_PORT_CONFIG_TEMPLATES ) return self._page_parser.parse_poe_port_config(response) def _get_poe_port_status(self) -> dict: response = self.fetch_page_from_templates( self.switch_model.POE_PORT_STATUS_TEMPLATES ) return self._page_parser.parse_poe_port_status(response) def _get_port_status(self) -> dict: switch_data = {} if self._is_json_api: response_portstatus = self._json_api_fetch( self.switch_model.PORT_STATUS_TEMPLATES ) else: response_portstatus = self.fetch_page_from_templates( self.switch_model.PORT_STATUS_TEMPLATES ) port_status = self._page_parser.parse_port_status( response_portstatus, self.ports ) for port_number in range(1, self.ports + 1): if len(port_status) == self.ports: switch_data[f"port_{port_number}_status"] = ( "on" if port_status[port_number].get("status") in PORT_STATUS_CONNECTED else "off" ) switch_data[f"port_{port_number}_modus_speed"] = ( port_status[port_number].get("modus_speed") in PORT_MODUS_SPEED ) port_connection_speed = ( port_status[port_number].get("connection_speed").upper() ) port_connection_speeds = { "10G": 10000, "5G": 5000, "2.5G": 2500, "1G": 1000, "1000M": 1000, "100M": 100, "10M": 10, } if port_connection_speed in port_connection_speeds: switch_data[f"port_{port_number}_connection_speed"] = ( port_connection_speeds[port_connection_speed] ) else: switch_data[f"port_{port_number}_connection_speed"] = 0 if port_status[port_number].get("description") is not None: switch_data[f"port_{port_number}_description"] = port_status[ port_number ].get("description") if port_status[port_number].get("flow_control") is not None: switch_data[f"port_{port_number}_flow_control"] = port_status[ port_number ].get("flow_control") else: message = ( f"Number of statusses ({len(port_status)})" f" not equal to number of ports({self.ports})" ) raise InvalidPortStatusError(message) return switch_data def switch_leds(self, state: str) -> bool: """Switch poe port on or off.""" if not self.switch_model.SWITCH_LED_TEMPLATES: message = "No LED templates found." raise NotImplementedError(message) if state not in SWITCH_STATES: message = f'State "{state}" not in {SWITCH_STATES}.' raise InvalidSwitchStateError(message) for template in self.switch_model.SWITCH_LED_TEMPLATES: url = template["url"].format(ip=self.host) method = template["method"] data = self.switch_model.get_switch_led_data(state) # type: ignore[report-call-issue] self._page_fetcher.set_data_from_template(template, self, data) _LOGGER.debug("switch_leds data=%s", data) response = BaseResponse try: response = self._page_fetcher.request(method, url, data) except NotLoggedInError as error: if self.get_login_cookie(): response = self._page_fetcher.request(method, url, data) else: message = "Not logged in and unable to login." raise LoginFailedError(message) from error if ( self._page_fetcher.has_ok_status(response) and str(response.content.strip()) == "b'SUCCESS'" ): # Clear cached metadata to refetch led status on next poll self._loaded_switch_metadata = {} return True _LOGGER.warning( "NetgearSwitchConnector.switch_leds response was %s", response.content.strip(), ) return False def turn_on_leds(self) -> bool: """Turn on front panel LEDs.""" return self.switch_leds("on") def turn_off_leds(self) -> bool: """Turn off front panel LEDs.""" return self.switch_leds("off") def switch_poe_port(self, poe_port: int, state: str) -> bool: """Switch poe port on or off.""" if state not in SWITCH_STATES: message = f'State "{state}" not in {SWITCH_STATES}.' raise InvalidSwitchStateError(message) if poe_port in self.poe_ports: for template in self.switch_model.SWITCH_POE_PORT_TEMPLATES: url = template["url"].format(ip=self.host) method = template["method"] data = self.switch_model.get_switch_poe_port_data(poe_port, state) # type: ignore[report-call-issue] self._page_fetcher.set_data_from_template(template, self, data) _LOGGER.debug("switch_poe_port data=%s", data) response = BaseResponse try: response = self._page_fetcher.request(method, url, data) except NotLoggedInError as error: if self.get_login_cookie(): response = self._page_fetcher.request(method, url, data) else: message = "Not logged in and unable to login." raise LoginFailedError(message) from error if ( self._page_fetcher.has_ok_status(response) and str(response.content.strip()) == "b'SUCCESS'" ): return True _LOGGER.warning( "NetgearSwitchConnector.switch_poe_port response was %s", response.content.strip(), ) else: message = f"Port {poe_port} not in {self.poe_ports}" raise InvalidPoEPortError(message) return False def turn_on_poe_port(self, poe_port: int) -> bool: """Turn on power of a PoE port.""" return self.switch_poe_port(poe_port, "on") def turn_off_poe_port(self, poe_port: int) -> bool: """Turn off power of a PoE port.""" return self.switch_poe_port(poe_port, "off") def power_cycle_poe_port(self, poe_port: int) -> bool: """Cycle the power of a PoE port.""" if poe_port in self.poe_ports: for template in self.switch_model.CYCLE_POE_PORT_TEMPLATES: url = template["url"].format(ip=self.host) data = self.switch_model.get_power_cycle_poe_port_data(poe_port) # type: ignore[report-call-issue] self._page_fetcher.set_data_from_template(template, self, data) response = Response method = template["method"] try: response = self._page_fetcher.request(method, url, data) except NotLoggedInError as error: if self.get_login_cookie(): response = self._page_fetcher.request(method, url, data) else: message = "Not logged in and unable to login." raise LoginFailedError(message) from error if ( self._page_fetcher.has_ok_status(response) and str(response.content.strip()) == "b'SUCCESS'" ): return True _LOGGER.warning( "NetgearSwitchConnector.power_cycle_poe_port response was %s", response.content.strip(), ) return False def switch_port(self, port: int, state: str) -> bool: """Enable or disable a regular port.""" self._validate_switch_port_request(port, state) current_info = self.get_switch_infos() desc_key = f"port_{port}_description" flow_key = f"port_{port}_flow_control" for template in self.switch_model.SWITCH_PORT_TEMPLATES: url = template["url"].format(ip=self.host) method = template["method"] data = self.switch_model.get_switch_port_data(port, state) if desc_key in current_info: data["DESCRIPTION"] = current_info[desc_key] if flow_key in current_info: flow = _normalize_flow_control(current_info[flow_key]) if flow is not None: data["FLOW_CONTROL"] = flow self._page_fetcher.set_data_from_template(template, self, data) _LOGGER.debug("switch_port data=%s", data) response = self._request_switch_port_change(method, url, data) if ( self._page_fetcher.has_ok_status(response) and str(response.content.strip()) == "b'SUCCESS'" ): return True pending_apply_delay = _get_pending_apply_delay(response) if pending_apply_delay is not None: with suppress(NetgearPlusPageParserError): self._client_hash = self._page_parser.parse_client_hash(response) _LOGGER.info( "NetgearSwitchConnector.switch_port change accepted, " "waiting %.1fs for switch to apply it", pending_apply_delay, ) time.sleep(pending_apply_delay) return True _LOGGER.warning( "NetgearSwitchConnector.switch_port response was %s", response.content.strip(), ) return False def turn_on_port(self, port: int) -> bool: """Enable a port (Auto).""" return self.switch_port(port, "on") def turn_off_port(self, port: int) -> bool: """Disable a port.""" return self.switch_port(port, "off") def save_pages(self, path_prefix: str = "") -> None: """Save all pages to files for debugging.""" if not self.switch_model or not self.switch_model.MODEL_NAME: self.autodetect_model() if not Path(path_prefix).exists(): Path(path_prefix).mkdir(parents=True) for template in [ *self.switch_model.SWITCH_INFO_TEMPLATES, *self.switch_model.PORT_STATUS_TEMPLATES, *self.switch_model.PORT_STATISTICS_TEMPLATES, *self.switch_model.POE_PORT_CONFIG_TEMPLATES, *self.switch_model.POE_PORT_STATUS_TEMPLATES, ]: url = template["url"].format(ip=self.host) try: response = self.fetch_page_from_templates([template]) except PageNotLoadedError: _LOGGER.warning( "NetgearSwitchConnector.save_pages could not download %s", url ) continue if self._page_fetcher.has_ok_status(response): page_name = url.split("/")[-1] or DEFAULT_PAGE with Path(f"{path_prefix}/{page_name}").open("wb") as file: file.write(response.content) if ( template in self.switch_model.SWITCH_INFO_TEMPLATES and not self._client_hash ): with suppress(NetgearPlusPageParserError): self._client_hash = self._page_parser.parse_client_hash( response ) else: _LOGGER.warning( "NetgearSwitchConnector.save_pages failed with status %s for %s", response.status_code, url, ) def save_autodetect_templates(self, path_prefix: str = "") -> None: """Save all pages used to detect the switch model to files for debugging.""" # These pages should be called unauthenticated, so logout first if self.get_cookie() != (None, None): _LOGGER.debug("NetgearSwitchConnector.save_autodetect_templates logout") self.delete_login_cookie() for template in self.switch_model.AUTODETECT_TEMPLATES: url = template["url"].format(ip=self.host) response = BaseResponse() with suppress(NotLoggedInError): response = self._page_fetcher.request("get", url) if self._page_fetcher.has_ok_status(response): page_name = url.split("/")[-1] or DEFAULT_PAGE with Path(f"{path_prefix}/{page_name}").open("wb") as file: file.write(response.content) foxey-py-netgear-plus-fec1337/src/py_netgear_plus/fetcher.py000066400000000000000000000335721517216143300243110ustar00rootroot00000000000000"""HTML page retrieval classes.""" import json import logging from contextlib import suppress from pathlib import Path from typing import Any import requests import requests.cookies from lxml import html from requests import Response from py_netgear_plus.models import ( AutodetectedSwitchModel, InvalidCryptFunctionError, SwitchModelNotDetectedError, ) from py_netgear_plus.netgear_crypt import hex_hmac_md5, merge_hash DEFAULT_PAGE = "index.htm" URL_REQUEST_TIMEOUT = 15 status_code_ok = requests.codes.ok status_code_not_found = requests.codes.not_found status_code_no_response = requests.codes.no_response status_code_unauthorized = requests.codes.unauthorized _LOGGER = logging.getLogger(__name__) class PageFetcherConnectionError(Exception): """Connection reset while requesting page.""" class LoginFailedError(Exception): """Invalid credentials.""" class NotLoggedInError(Exception): """Not logged in.""" class PageNotLoadedError(Exception): """Failed to load the page.""" class EmptyTemplateParameterError(Exception): """None of the models passed the tests.""" class BaseResponse: """Base class for response objects.""" def __init__(self) -> None: """Initialize BaseResponse Object.""" self.status_code = status_code_not_found self.content = b"" self.cookies = requests.cookies.RequestsCookieJar() def __bool__(self) -> bool: """Return True if status code is 200.""" return self.status_code == status_code_ok class PageFetcher: """Class to fetch html pages from switch (or file).""" def __init__(self, host: str) -> None: """Initialize PageFetcher Object.""" self.host = host # cached login page response self._login_page_response = None self._password_hash = None # login cookie self._cookie_name = None self._cookie_content = None # bearer token (JSON REST API switches) self._bearer_token = None # offline mode settings self.offline_mode = False self.offline_path_prefix = "" def turn_on_offline_mode(self, path_prefix: str) -> None: """Turn on offline mode.""" self.offline_mode = True self.offline_path_prefix = path_prefix def turn_on_online_mode(self) -> None: """Turn on online mode.""" self.offline_mode = False def check_login_url(self, switch_model: type[AutodetectedSwitchModel]) -> bool: """Check and cache login page.""" templates = switch_model.AUTODETECT_TEMPLATES for template in templates: url = template["url"].format(ip=self.host) if self.offline_mode: _LOGGER.debug( "[PageFetcher.check_login_url] reading %s from file.", url ) self._login_page_response = self.get_page_from_file(url) else: method = template["method"] allow_redirects = False timeout = URL_REQUEST_TIMEOUT _LOGGER.debug( "[PageFetcher.check_login_url] calling request for %s %s" " with allow_directs=%s, timeout=%d", method.upper(), url, allow_redirects, timeout, ) with suppress( requests.exceptions.Timeout, requests.exceptions.ConnectionError, requests.exceptions.ChunkedEncodingError, ): self._login_page_response = requests.request( method, url, allow_redirects=allow_redirects, timeout=timeout ) if self.has_ok_status(self._login_page_response): return True message = f"Failed to load any page of templates: {templates}" raise PageNotLoadedError(message) def get_login_page_response(self) -> Response | BaseResponse | None: """Return cached login page.""" return self._login_page_response def clear_login_page_response(self) -> None: """Return cached login page.""" self._login_page_response = None self._password_hash = None def get_cookie(self) -> tuple[str | None, str | None]: """Get cookie.""" if self._cookie_name and self._cookie_content: return (self._cookie_name, self._cookie_content) return (None, None) def set_cookie(self, cookie_name: str, cookie_content: str) -> None: """Set cookie.""" self._cookie_name = cookie_name self._cookie_content = cookie_content def clear_cookie(self) -> None: """Clear cookie.""" self._cookie_name = None self._cookie_content = None def set_bearer_token(self, token: str) -> None: """Set Bearer token for JSON REST API authentication.""" self._bearer_token = token def has_bearer_token(self) -> bool: """Return True if a Bearer token is set.""" return self._bearer_token is not None def clear_bearer_token(self) -> None: """Clear Bearer token.""" self._bearer_token = None def json_request( self, method: str, url: str, data: Any = None, ) -> Response | BaseResponse: """Make a JSON REST API request with optional Bearer token auth.""" if self.offline_mode: return self.get_page_from_file(url) headers = { "Accept": "application/json, text/plain, */*", } if self._bearer_token: headers["Authorization"] = f"Bearer {self._bearer_token}" kwargs: dict[str, Any] = { "headers": headers, "timeout": URL_REQUEST_TIMEOUT, } if data is not None: headers["Content-Type"] = "text/plain;charset=UTF-8" kwargs["data"] = json.dumps(data, separators=(",", ":")) try: response = requests.request(method, url, **kwargs) # noqa: S113 except requests.exceptions.Timeout: return BaseResponse() except ( requests.exceptions.ConnectionError, requests.exceptions.ChunkedEncodingError, ) as error: raise PageFetcherConnectionError from error return response def get_page_from_file(self, url: str) -> BaseResponse: """Get page from file.""" response = BaseResponse() page_name = url.rsplit(sep="/", maxsplit=1)[-1] or DEFAULT_PAGE path = Path(f"{self.offline_path_prefix}/{page_name}") if path.exists(): with path.open("r") as file: response.content = file.read().encode("utf-8") response.status_code = status_code_ok _LOGGER.debug( "[NetgearSwitchConnector.get_page_from_file] " "loaded offline page=%s", page_name, ) else: _LOGGER.debug( "[NetgearSwitchConnector.get_page_from_file] offline page=%s not found", page_name, ) return response def set_data_from_template( self, template: dict[str, Any], source: Any, data: dict[str, Any] ) -> None: """Populate data from template using class variables.""" if "params" not in template: return for key, value in template["params"].items(): if value.startswith("literal:"): data[key] = value[8:] else: try: data[key] = getattr(source, value) except AttributeError as error: message = ( "NetgearSwitchConnector._set_data_from_template: " f"missing attribute {key} (class variable {value})" ) raise EmptyTemplateParameterError(message) from error if not data[key]: message = ( "NetgearSwitchConnector._set_data_from_template: " f"empty attribute {key} (class variable {value})" ) raise EmptyTemplateParameterError(message) def get_login_response( self, switch_model: type[AutodetectedSwitchModel], login_password: str, rand: str | None, ) -> Response | BaseResponse: """Login and save returned cookie.""" if not switch_model or switch_model.MODEL_NAME == "": raise SwitchModelNotDetectedError if switch_model.CRYPT_FUNCTION == "merge_hash" and not rand: self._password_hash = login_password _LOGGER.debug( "[PageFetcher.get_login_response] no rand: use plaintext password" ) elif switch_model.CRYPT_FUNCTION == "merge_hash" and rand: self._password_hash = merge_hash(login_password, rand) _LOGGER.debug( "[PageFetcher.get_login_response] use merge_hash password with rand=%s", rand, ) elif switch_model.CRYPT_FUNCTION == "hex_hmac_md5": self._password_hash = hex_hmac_md5(login_password) _LOGGER.debug( "[PageFetcher.get_login_response] use hex_hmac_md5 password", ) else: raise InvalidCryptFunctionError(switch_model.CRYPT_FUNCTION) response = None template = switch_model.LOGIN_TEMPLATE url = template["url"].format(ip=self.host) method = template["method"] data = {} self.set_data_from_template(template, self, data) allow_redirects = True response = self.request(method, url, data=data, allow_redirects=allow_redirects) if not response or response.status_code != status_code_ok: raise LoginFailedError return response def _is_authenticated(self, response: Response | BaseResponse) -> bool: """Check for redirect to login when not authenticated (anymore).""" if "content" in dir(response) and response.content: title = html.fromstring(response.content).xpath("//title") if ( len(title) and title[0].text and title[0].text.lower() == "redirect to login" ): _LOGGER.info( "[PageFetcher._is_authenticated] Returning false: title=%s", title[0].text.lower(), ) return False script = html.fromstring(response.content).xpath( '//script[contains(text(),"/wmi/login")]' ) if ( len(script) > 0 and script[0].text and 'top.location.href = "/wmi/login"' in script[0].text ): _LOGGER.info( "[PageFetcher._is_authenticated] Returning false: script=%s", script[0].text, ) return False return True def request( self, method: str, url: str, data: Any = None, timeout: int = 0, allow_redirects: bool = False, # noqa: FBT001, FBT002 ) -> Response | BaseResponse: """Make authenticated requests with requests.request.""" if self.offline_mode: return self.get_page_from_file(url) if timeout == 0: timeout = URL_REQUEST_TIMEOUT response = Response() kwargs = {} data_key = "data" if method == "post" else "params" if self._cookie_name and self._cookie_content: jar = requests.cookies.RequestsCookieJar() if ":" in self.host: host_only, port_only = self.host.split(":") jar.set( self._cookie_name, self._cookie_content, domain=host_only, path="/", port=port_only, ) else: jar.set( self._cookie_name, self._cookie_content, domain=self.host, path="/" ) kwargs = { data_key: data, "cookies": jar, "allow_redirects": allow_redirects, "timeout": timeout, } _LOGGER.debug( "[PageFetcher.request] calling %s %s with %s cookie" " with %s=%s, allow_redirects=%s, timeout=%d", method.upper(), url, self._cookie_name, data_key, data, allow_redirects, timeout, ) else: kwargs = { data_key: data, "allow_redirects": allow_redirects, "timeout": timeout, } _LOGGER.debug( "[PageFetcher.request] calling %s %s without cookie" " with %s=%s, allow_redirects=%s, timeout=%d", method.upper(), url, data_key, data, allow_redirects, timeout, ) try: response = requests.request(method, url, **kwargs) # noqa: S113 except requests.exceptions.Timeout: return response except requests.exceptions.ConnectionError as error: raise PageFetcherConnectionError from error except requests.exceptions.ChunkedEncodingError as error: raise PageFetcherConnectionError from error # Session expired: refresh login cookie and try again if response.status_code == status_code_ok and not self._is_authenticated( response ): raise NotLoggedInError return response def has_ok_status(self, response: Response | BaseResponse | None) -> bool: """Check if response has status code 200.""" return response is not None and response.status_code == status_code_ok foxey-py-netgear-plus-fec1337/src/py_netgear_plus/models.py000066400000000000000000000545361517216143300241570ustar00rootroot00000000000000"""Definitions of auto-detectable Switch models.""" from typing import ClassVar from py_netgear_plus.utils import get_all_child_classes_list class MultipleModelsDetectedError(Exception): """Detection of switch model was not unique.""" class SwitchModelNotDetectedError(Exception): """None of the models passed the tests.""" class PortNumberOutofRangeError(Exception): """Port number out of range.""" class InvalidCryptFunctionError(Exception): """No implementation for the defined CRYPT_FUNCTION.""" class AutodetectedSwitchModel: """Base class definition for Netgear Plus Switch Models.""" SUPPORTED = True ALLOWED_COOKIE_TYPES: ClassVar = ["SID"] MODEL_NAME = "" PORTS = 0 POE_PORTS: ClassVar = [] POE_MAX_POWER_ALL_PORTS = None POE_MAX_POWER_SINGLE_PORT = None POE_SCHEDULING = False API_TYPE: ClassVar = "" CHECKS_AND_RESULTS: ClassVar = [] AUTODETECT_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/login.cgi"}, {"method": "get", "url": "http://{ip}/login.htm"}, {"method": "get", "url": "http://{ip}/"}, ] CRYPT_FUNCTION: ClassVar = "merge_hash" LOGIN_TEMPLATE: ClassVar = { "method": "post", "url": "http://{ip}/login.cgi", "params": {"password": "_password_hash"}, } SWITCH_INFO_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/switch_info.htm"}, {"method": "get", "url": "http://{ip}/switch_info.cgi"}, ] SWITCH_LED_TEMPLATES: ClassVar = [] PORT_STATISTICS_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/portStatistics.cgi", "params": {"hash": "_client_hash"}, }, { "method": "post", "url": "http://{ip}/port_statistics.htm", "params": {"hash": "_client_hash"}, }, ] PORT_STATUS_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/status.htm", "params": {"hash": "_client_hash"}, } ] SWITCH_PORT_TEMPLATES: ClassVar = [] POE_PORT_CONFIG_TEMPLATES: ClassVar = [] SWITCH_POE_PORT_TEMPLATES: ClassVar = [] CYCLE_POE_PORT_TEMPLATES: ClassVar = [] POE_PORT_STATUS_TEMPLATES: ClassVar = [] LOGOUT_TEMPLATES: ClassVar = [{"method": "post", "url": "http://{ip}/logout.cgi"}] SWITCH_REBOOT_TEMPLATES: ClassVar = [] def __init__(self) -> None: """Empty contructor.""" def get_autodetect_funcs(self) -> list: """Return list with detection functions.""" return self.CHECKS_AND_RESULTS def get_switch_port_data(self, port: int, state: str) -> dict: """Return dict with form fields for switching a port (enable/disable).""" del port, state return {} def get_switch_poe_port_data(self, poe__port: int, state: str) -> dict: """Return empty dict. Implement on model level.""" del poe__port, state return {} def get_power_cycle_poe_port_data(self, poe_port: int) -> dict: """Return empty dict. Implement on model level.""" del poe_port return {} def has_led_switch(self) -> bool: """Return true when front panel LED can be switched.""" return bool(self.SWITCH_LED_TEMPLATES) def get_switch_led_data(self, state: str) -> dict: """Return empty dict. Implement on model level.""" del state return {} def has_reboot_button(self) -> bool: """Return true when switch reboot is supported.""" return bool(self.SWITCH_REBOOT_TEMPLATES) class GS105E(AutodetectedSwitchModel): """Definition for Netgear GS105E model.""" MODEL_NAME = "GS105E" PORTS = 5 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS105E"]), ] class GS105Ev2(AutodetectedSwitchModel): """Definition for Netgear GS105Ev2 model.""" MODEL_NAME = "GS105Ev2" PORTS = 5 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS105Ev2"]), ] PORT_STATISTICS_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/portStatistics.cgi", } ] PORT_STATUS_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/status.cgi", } ] SWITCH_PORT_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/status.cgi", "params": {"hash": "_client_hash"}, } ] SWITCH_REBOOT_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/device_reboot.cgi", "params": {"CBox": "literal:on", "hash": "_client_hash"}, } ] LOGOUT_TEMPLATES: ClassVar = [{"method": "get", "url": "http://{ip}/logout.cgi"}] def get_switch_port_data(self, port: int, state: str) -> dict: """Build form data for switching port state via SPEED field.""" return { f"port{port}": "checked", "SPEED": 1 if state == "on" else 2, } class GS105PE(GS105Ev2): """Definition for Netgear GS105PE model. Inherits port switching from GS105Ev2.""" MODEL_NAME = "GS105PE" PORTS = 5 SWITCH_REBOOT_TEMPLATES: ClassVar = [] CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS105PE"]), ] class GS108E(AutodetectedSwitchModel): """Definition for Netgear GS108E model.""" MODEL_NAME = "GS108E" PORTS = 8 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS108E"]), ( "parse_login_switchinfo_tag", ["GS308E - 8-Port Gigabit Ethernet Smart Managed Plus Switch"], ), ] ALLOWED_COOKIE_TYPES: ClassVar = ["GS108SID", "SID"] class GS108Ev3(AutodetectedSwitchModel): """Definition for Netgear GS108Ev3 model.""" MODEL_NAME = "GS108Ev3" PORTS = 8 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS108Ev3"]), ( "parse_login_switchinfo_tag", [ "GS108Ev3 - 8-Port Gigabit ProSAFE Plus Switch", "GS108Ev3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch", ], ), ] SWITCH_REBOOT_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/device_reboot.cgi", "params": {"CBox": "literal:on", "hash": "_client_hash"}, } ] ALLOWED_COOKIE_TYPES: ClassVar = ["GS108SID", "SID"] class GS108Ev4(AutodetectedSwitchModel): """Definition for Netgear GW108Ev4 model.""" MODEL_NAME = "GS108Ev4" PORTS = 8 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS108Ev4"]), ] SWITCH_INFO_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/dashboard.cgi"} ] PORT_STATUS_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/dashboard.cgi"} ] PORT_STATISTICS_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/portStatistics.cgi", "params": {"hash": "_client_hash"}, }, ] ALLOWED_COOKIE_TYPES: ClassVar = ["GS108SID", "SID"] class GS108PEv3(AutodetectedSwitchModel): """Definition for Netgear GS108PEv3 model.""" MODEL_NAME = "GS108PEv3" PORTS = 8 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS108PEv3"]), ( "parse_login_switchinfo_tag", [ "GS108PEv3 - 8-Port Gigabit ProSAFE Plus Switch", "GS108PEv3 - 8-Port Gigabit Ethernet Smart Managed Plus Switch", ], ), ] ALLOWED_COOKIE_TYPES: ClassVar = ["GS108SID", "SID"] class GS305E(AutodetectedSwitchModel): """Definition for Netgear GS305E model.""" MODEL_NAME = "GS305E" PORTS = 5 ALLOWED_COOKIE_TYPES: ClassVar = ["SID"] CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS305E"]), ] SWITCH_INFO_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/switch_info.cgi"}, ] PORT_STATUS_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/status.cgi"}, ] PORT_STATISTICS_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/portStatistics.cgi"}, ] class GS308E(AutodetectedSwitchModel): """Definition for Netgear GS308E model.""" MODEL_NAME = "GS308E" PORTS = 8 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS308E"]), ( "parse_login_switchinfo_tag", [ "GS308E - 8-Port Gigabit ProSAFE Plus Switch", "GS308E - 8-Port Gigabit Ethernet Smart Managed Plus Switch", ], ), ] ALLOWED_COOKIE_TYPES: ClassVar = ["GS108SID", "SID"] class GS308Ev4(GS108Ev4): """Definition for Netgear GS308Ev3 model.""" MODEL_NAME = "GS308Ev4" PORTS = 8 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS308Ev4"]), ] SWITCH_REBOOT_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/device_reboot.cgi", "params": {"hash": "_client_hash"}, } ] ALLOWED_COOKIE_TYPES: ClassVar = ["SID"] class EMxSeries(AutodetectedSwitchModel): """Parent class definition for Netgear GSxxxEMX and XSxxxEM models.""" LOGIN_TEMPLATE: ClassVar = { "method": "post", "url": "http://{ip}/homepage.html", "params": {"LoginPassword": "_password_hash"}, } ALLOWED_COOKIE_TYPES: ClassVar = ["gambitCookie"] SWITCH_INFO_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/iss/specific/sysInfo.html", "params": {"Gambit": "_gambit"}, } ] PORT_STATUS_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/iss/specific/port_settings.html", "params": {"Gambit": "_gambit"}, } ] PORT_STATISTICS_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/iss/specific/interface_stats.html", "params": {"Gambit": "_gambit"}, } ] LOGOUT_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/iss/specific/logout.html", "params": {"Gambit": "_gambit"}, } ] class GS110EMX(EMxSeries): """Definition for Netgear GS110EMX model.""" MODEL_NAME = "GS110EMX" PORTS = 10 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS110EMX"]), ] class XS512EM(EMxSeries): """Definition for Netgear XS512EM model.""" MODEL_NAME = "XS512EM" PORTS = 12 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["XS512EM"]), ] class GS30xSeries(AutodetectedSwitchModel): """Parent class definition for Netgear GS30x series.""" SWITCH_INFO_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/dashboard.cgi"} ] SWITCH_LED_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/port_led.cgi", "params": {"hash": "_client_hash"}, } ] PORT_STATUS_TEMPLATES: ClassVar = SWITCH_INFO_TEMPLATES PORT_STATISTICS_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/portStatistics.cgi"} ] POE_PORT_CONFIG_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/PoEPortConfig.cgi"} ] SWITCH_POE_PORT_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/PoEPortConfig.cgi", "params": {"hash": "_client_hash"}, } ] CYCLE_POE_PORT_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/PoEPortConfig.cgi", "params": {"hash": "_client_hash"}, } ] POE_PORT_STATUS_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/getPoePortStatus.cgi"} ] SWITCH_REBOOT_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/device_reboot.cgi", "params": {"hash": "_client_hash"}, } ] def get_switch_poe_port_data(self, poe_port: int, state: str) -> dict: """Fill dict with form fields for switching a PoE port.""" return { "ACTION": "Apply", "portID": poe_port - 1, "ADMIN_MODE": 1 if state == "on" else 0, "PORT_PRIO": 0, "POW_MOD": 3, "POW_LIMT_TYP": 0, "DETEC_TYP": 2, "DISCONNECT_TYP": 2, } def get_power_cycle_poe_port_data(self, poe_port: int) -> dict: """Return empty dict. Implement on model level.""" return { "ACTION": "Reset", "port" + str(poe_port - 1): "checked", } def get_switch_led_data(self, state: str) -> dict: """Return empty dict. Implement on model level.""" return { "portled": 0 if state == "on" else 2, } class GS30xEPxSeries(GS30xSeries): """Parent class definition for Netgear GS30xEPx series.""" def get_switch_poe_port_data(self, poe_port: int, state: str) -> dict: """Fill dict with form fields for switching a PoE port.""" return { "ACTION": "Apply", "portID": poe_port - 1, "ADMIN_MODE": 1 if state == "on" else 0, "PORT_PRIO": 0, "POW_MOD": 3, "POW_LIMT_TYP": 2, "DETEC_TYP": 2, "DISCONNECT_TYP": 2, } class GS305EP(GS30xEPxSeries): """Definition for Netgear GS305EP model.""" MODEL_NAME = "GS305EP" PORTS = 5 POE_PORTS: ClassVar = [1, 2, 3, 4] POE_MAX_POWER_ALL_PORTS = 63 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS305EP"]), ] class GS305EPP(GS30xEPxSeries): """Definition for Netgear GS305EPP model.""" MODEL_NAME = "GS305EPP" PORTS = 5 POE_PORTS: ClassVar = [1, 2, 3, 4] POE_MAX_POWER_ALL_PORTS = 120 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS305EPP"]), ] class GS308EP(GS30xSeries): """Definition for Netgear GS308EP model.""" MODEL_NAME = "GS308EP" PORTS = 8 POE_PORTS: ClassVar = [1, 2, 3, 4, 5, 6, 7, 8] POE_MAX_POWER_ALL_PORTS = 62 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS308EP"]), ] class GS308EPP(GS30xEPxSeries): """Definition for Netgear GS308EP model.""" MODEL_NAME = "GS308EPP" PORTS = 8 POE_PORTS: ClassVar = [1, 2, 3, 4, 5, 6, 7, 8] POE_MAX_POWER_ALL_PORTS = 123 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS308EPP"]), ] class GS316Series(GS30xSeries): """Parent class definition for Netgear GS316xx models.""" PORTS = 16 POE_PORTS: ClassVar = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ] POE_SCHEDULING = False # True LOGIN_TEMPLATE: ClassVar = { "method": "post", "url": "http://{ip}/homepage.html", "params": {"LoginPassword": "_password_hash"}, } ALLOWED_COOKIE_TYPES: ClassVar = ["gambitCookie"] SWITCH_INFO_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/iss/specific/dashboard.html", "params": {"Gambit": "_gambit"}, } ] SWITCH_LED_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/iss/specific/leds.html", "params": {"Gambit": "_gambit"}, } ] PORT_STATUS_TEMPLATES: ClassVar = SWITCH_INFO_TEMPLATES PORT_STATISTICS_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/iss/specific/interface_stats.html", "params": {"Gambit": "_gambit"}, } ] POE_PORT_CONFIG_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/iss/specific/poePortConf.html", "params": {"Gambit": "_gambit"}, } ] SWITCH_POE_PORT_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/iss/specific/poePortConf.html", "params": {"Gambit": "_gambit"}, } ] CYCLE_POE_PORT_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/iss/specific/poePortConf.html", "params": {"Gambit": "_gambit"}, } ] POE_PORT_STATUS_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/iss/specific/poePortStatus.html", "params": {"Gambit": "_gambit", "GetData": "literal:TRUE"}, } ] LOGOUT_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/iss/specific/logout.html", "params": {"Gambit": "_gambit"}, } ] SWITCH_REBOOT_TEMPLATES: ClassVar = [ { "method": "post", "url": "http://{ip}/iss/specific/sys_reload.html", "params": {"Gambit": "_gambit", "ACTION": "literal:Reload"}, } ] def get_switch_poe_port_data(self, poe_port: int, state: str) -> dict: """Fill dict with form fields for switching a PoE port.""" return { "TYPE": "submitPoe", "PORT_NO": poe_port, "POWER_LIMIT_VALUE": 300, "PRIORITY": "NOTSET", "POWER_MODE": "NOTSET", "POWER_LIMIT_TYPE": "NOTSET", "DETECTION": "NOTSET", "ADMIN_STATE": 1 if state == "on" else 0, "DISCONNECT_TYPE": "NOTSET", } def get_power_cycle_poe_port_data(self, poe_port: int) -> dict: """Return form fields for PoE port cycle.""" if poe_port not in self.POE_PORTS: message = f"Port number {poe_port} out of range." raise PortNumberOutofRangeError(message) poeport_string = ["0"] * len(self.POE_PORTS) poeport_string[poe_port - 1] = "1" return { "TYPE": "resetPoe", "PoePort": "".join(poeport_string), } def get_switch_led_data(self, state: str) -> dict: """Return empty dict. Implement on model level.""" return { "PORT_LED_STATUS": 1 if state == "on" else 0, } class GS316EP(GS316Series): """Definition for Netgear GS316EP model.""" MODEL_NAME = "GS316EP" POE_MAX_POWER_ALL_PORTS = 180 POE_MAX_POWER_SINGLE_PORT = 30 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS316EP"]), ] class GS316EPP(GS316EP): """Definition for Netgear GS316EPP model.""" MODEL_NAME = "GS316EPP" POE_MAX_POWER_ALL_PORTS = 231 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [True]), ("parse_login_title_tag", ["GS316EPP"]), ] class JGSxxxSeries(AutodetectedSwitchModel): """Parent class definition for Netgear JGSxxx models.""" CRYPT_FUNCTION: ClassVar = "hex_hmac_md5" LOGIN_TEMPLATE: ClassVar = { "method": "post", "url": "http://{ip}/login.htm", "params": { "submitId": "literal:pwdLogin", "password": "_password_hash", "submitEnd": "literal:", }, } SWITCH_INFO_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/config/status_switch_info.htm", }, ] PORT_STATUS_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/config/status_status.htm", }, ] PORT_STATISTICS_TEMPLATES: ClassVar = [ { "method": "get", "url": "http://{ip}/config/monitoring_port_statistics.htm", } ] class JGS516PE(JGSxxxSeries): """Definition for Netgear JGS516PE model.""" MODEL_NAME = "JGS516PE" PORTS = 16 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [False]), ("parse_first_script_tag", ["JGS516PE"]), ] class JGS524Ev2(JGSxxxSeries): """Definition for Netgear JGS524Ev2 model.""" MODEL_NAME = "JGS524Ev2" PORTS = 24 CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [False]), ("parse_first_script_tag", ["JGS524Ev2"]), ] class GS116Ev2(JGSxxxSeries): """Definition for Netgear GS116Ev2 model.""" MODEL_NAME = "GS116Ev2" PORTS = 16 POE_PORTS: ClassVar = [] CHECKS_AND_RESULTS: ClassVar = [ ("check_login_form_rand", [False]), ("parse_first_script_tag", ["GS116Ev2"]), ] class MS3xxSeries(AutodetectedSwitchModel): """Parent class definition for Netgear MS3xx series (JSON REST API).""" API_TYPE: ClassVar = "json_rest" CHECKS_AND_RESULTS: ClassVar = [] AUTODETECT_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/api/system/status"}, ] LOGIN_TEMPLATE: ClassVar = { "method": "patch", "url": "http://{ip}/api/system/login", } LOGIN_SESSION_TEMPLATE: ClassVar = { "method": "post", "url": "http://{ip}/api/login_session", } SWITCH_INFO_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/api/system/status"}, ] PORT_STATUS_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/api/ports"}, ] PORT_STATISTICS_TEMPLATES: ClassVar = [ {"method": "get", "url": "http://{ip}/api/ports/statistics"}, ] LOGOUT_TEMPLATES: ClassVar = [] class MS305E(MS3xxSeries): """Definition for Netgear MS305E model.""" MODEL_NAME = "MS305E" PORTS = 5 class MS308E(MS3xxSeries): """Definition for Netgear MS308E model.""" MODEL_NAME = "MS308E" PORTS = 8 MODELS = get_all_child_classes_list(AutodetectedSwitchModel, "MODEL_NAME") foxey-py-netgear-plus-fec1337/src/py_netgear_plus/netgear_crypt.py000066400000000000000000000030341517216143300255250ustar00rootroot00000000000000"""Module providing utility functions for merging strings and generating MD5 hashes.""" import hashlib import hmac def merge(str1: str, str2: str) -> str: """Merge two strings by alternating characters from each string.""" result = "" arr1 = [] arr2 = [] if str1: arr1 = list(str1) if str2: arr2 = list(str2) index1 = 0 index2 = 0 while (index1 < len(arr1)) | (index2 < len(arr2)): if index1 < len(arr1): result += arr1[index1] index1 += 1 if index2 < len(arr2): result += arr2[index2] index2 += 1 return result def make_md5(str2hash: str) -> str: """Generate an MD5 hash for the given string.""" result = hashlib.md5(str2hash.encode()) # noqa: S324 return result.hexdigest() def merge_hash(str1: str, str2: str) -> str: """Return MD5 hash of merged strings.""" return make_md5(merge(str1, str2)) def hex_hmac_md5(password: str, md5_key: str = "YOU_CAN_NOT_PASS") -> str: """Create hex digest from HMAC-DM5 hash.""" # Default md5_key is "YOU_CAN_NOT_PASS" for JGS524Ev2 model space = "\0" # Calculate the number of full password repetitions and remaining padding repeat_count = 2048 // (len(password) + 1) remaining_space = 2048 - (repeat_count * (len(password) + 1)) # Construct the padded password passwrd = (password + space) * repeat_count + space * remaining_space return hmac.new( md5_key.encode("utf-8"), passwrd.encode("utf-8"), hashlib.md5 ).hexdigest() foxey-py-netgear-plus-fec1337/src/py_netgear_plus/ngp_cli.py000077500000000000000000000320411517216143300242750ustar00rootroot00000000000000#!/bin/env python """ Netgear Plus CLI. A command-line utility to interact with a Netgear switch. This tool allows users to perform various operations on a Netgear switch, such as logging in, identifying the switch model, collecting data, logging out, and checking switch status. Usage: ngp-cli [--password ] [options] Commands: login Log in to the switch and save the cookie for future commands. logout Log out from the switch and delete the saved cookie. identify Identify the switch model. status Display the current status of the switch. collect Collect a full set of data from the switch for testing. parse Parse collected pages and save data to a file. save Save pages retrieved from the switch to a file. version Display the CLI version. Options: --password, -P Specify the password for the switch. If not provided, the NETGEAR_PLUS_PASSWORD environment variable is used. --debug, -d Enable debug mode for detailed logs. --verbose, -v Enable verbose mode for detailed outputs. --filter, -f Filter output by a specified string. --json, -j Output results in JSON format. --path, -p Specify the path for saving pages or parsed data (default: "pages"). Environment Variables: NETGEAR_PLUS_PASSWORD: Password for the switch if --password is not provided. """ import argparse import json import logging import os import time from pathlib import Path from sys import stderr from typing import Any from py_netgear_plus import ( LoginFailedError, NetgearSwitchConnector, SwitchModelNotDetectedError, ) from py_netgear_plus import ( __version__ as ngp_version, ) COOKIE_FILE = Path.home() / ".netgear_plus_cookie" def save_cookie( connector: NetgearSwitchConnector, filename: Path = COOKIE_FILE ) -> bool: """Save the authentication cookie and host to a file.""" with Path(filename).open("w") as f: (cookie_name, cookie_content) = connector.get_cookie() json.dump( { "cookie_name": cookie_name, "cookie_content": cookie_content, "host": connector.host, }, f, ) return True return False def load_cookie( connector: NetgearSwitchConnector, filename: Path = COOKIE_FILE ) -> bool: """Load the authentication cookie and host from a file.""" if Path(filename).exists(): with Path(filename).open("r") as f: data = json.load(f) connector.set_cookie(data.get("cookie_name"), data.get("cookie_content")) connector.host = data.get("host") return True return False def get_saved_host() -> str | None: """Retrieve the saved host from the cookie file.""" if Path(COOKIE_FILE).exists(): with Path(COOKIE_FILE).open("r") as f: data = json.load(f) return data.get("host") return None def save_switch_infos(path_prefix: str, switch_infos: dict) -> None: """Save switch info to file for debugging.""" if not Path(path_prefix).exists(): Path(path_prefix).mkdir(parents=True) with Path(f"{path_prefix}/switch_infos.json").open("w") as file: json.dump(switch_infos, file, indent=4) def main() -> None: """Parse arguments and execute the corresponding command.""" parser = parse_commandline() args = parser.parse_args() if args.command == "version": version_command() return if args.debug: logging.basicConfig(level=logging.DEBUG) print("Enabling debug mode.", file=stderr) # noqa: T201 command_functions = { "collect": collect_command, "identify": identify_command, "login": login_command, "logout": logout_command, "parse": parse_command, "reboot": reboot_command, "save": save_command, "status": status_command, "version": version_command, } if args.command in command_functions: command_chooser(args, command_functions) else: if args.command: print(f"Invalid command: {args.command}\n", file=stderr) # noqa: T201 parser.print_help(stderr) def parse_commandline() -> argparse.ArgumentParser: """Parse command-line arguments.""" parser = argparse.ArgumentParser(description="Netgear Plus CLI") parser.add_argument( "--password", "-P", help="Password for the switch. " "Defaults to NETGEAR_PLUS_PASSWORD environment variable (if set).", default=os.getenv("NETGEAR_PLUS_PASSWORD"), ) parser.add_argument( "--debug", "-d", help="Enable debug mode", action="store_true", ) parser.add_argument( "--verbose", "-v", help="Be talkative", action="store_true", ) parser.add_argument( "--filter", "-f", help="Filter output by the provided string", type=str, default="", ) parser.add_argument( "--json", "-j", help="Output in JSON format", action="store_true", ) parser.add_argument( "--path", "-p", help="Path to save pages and parsed data", type=str, default="pages", ) subparsers = parser.add_subparsers(dest="command") login_parser = subparsers.add_parser( "login", help="Login to the switch and save the cookie" ) login_parser.add_argument("host", help="Netgear Switch IP address") identify_parser = subparsers.add_parser( "identify", help="Identify the switch model" ) identify_parser.add_argument( "host", help="Netgear Switch IP address", nargs="?", default="" ) subparsers.add_parser("collect", help="Collect a full set of data for testing") subparsers.add_parser("logout", help="Logout from the switch and delete the cookie") subparsers.add_parser("parse", help="Parse pages and save data to file") subparsers.add_parser("reboot", help="Reboot the switch") subparsers.add_parser("save", help="Save pages to file") subparsers.add_parser("status", help="Display switch status") subparsers.add_parser("version", help="Display CLI version") return parser def command_chooser( args: argparse.Namespace, command_functions: dict[str, Any] ) -> None: """Choose the appropriate command function based on the command-line arguments.""" connector = None if args.command == "login": if not args.password: print("Password is required for login.", file=stderr) # noqa: T201 return connector = NetgearSwitchConnector(args.host, args.password) elif args.command == "identify": host = args.host or get_saved_host() if not host: print("Host is required for identify.", file=stderr) # noqa: T201 return connector = NetgearSwitchConnector(str(host), args.password) else: saved_host = get_saved_host() if not saved_host: print("Host not found. Please login first.", file=stderr) # noqa: T201 return connector = NetgearSwitchConnector(saved_host, args.password) try: command_functions[args.command](connector, args) except LoginFailedError: print("Invalid credentials. Please login again.", file=stderr) # noqa: T201 if Path.exists(COOKIE_FILE): Path(COOKIE_FILE).unlink() def collect_command( connector: NetgearSwitchConnector, args: argparse.Namespace ) -> bool: """Save pages to file.""" if not load_cookie(connector): print("Not logged in.", file=stderr) # noqa: T201 return False model_name = connector.autodetect_model().MODEL_NAME n = ["first", "second"] for i in range(2): if i: if args.verbose: print("Waiting 10 seconds...", file=stderr) # noqa: T201 time.sleep(10) path = f"{args.path}/{model_name}/{i}" if not Path(path).exists(): Path(path).mkdir(parents=True, exist_ok=True) if args.verbose: print(f"Saving {n[i]} set of pages in {path}", file=stderr) # noqa: T201 connector.save_pages(path) for i in range(2): path = f"{args.path}/{model_name}/{i}" if args.verbose: print(f"Parsing {n[i]} set of pages in {path}", file=stderr) # noqa: T201 connector.turn_on_offline_mode(path) switch_infos = connector.get_switch_infos() switch_infos["switch_ip"] = "192.168.0.1" save_switch_infos(path, switch_infos) connector.turn_on_online_mode() path = f"{args.path}/{model_name}/0" if args.verbose: print( # noqa: T201 f"Logging out to collect autodetect pages.\nSaving in {path}.", file=stderr ) logout_command(connector, args) connector.save_autodetect_templates(path) return True def identify_command( connector: NetgearSwitchConnector, args: argparse.Namespace, ) -> bool: """Identify the switch model and print the model name.""" del args try: model = connector.autodetect_model() except SwitchModelNotDetectedError: print("Failed to detect switch model.", file=stderr) # noqa: T201 return False else: print(f"Switch model: {model.MODEL_NAME}") # noqa: T201 return True def login_command(connector: NetgearSwitchConnector, args: argparse.Namespace) -> bool: """Attempt to login and save the cookie.""" try: if connector.get_login_cookie() and save_cookie(connector): if args.verbose: print("Login successful.", file=stderr) # noqa: T201 return True except LoginFailedError: print("Invalid credentials.", file=stderr) # noqa: T201 return False def logout_command( connector: NetgearSwitchConnector, args: argparse.Namespace, ) -> bool: """Logout from the switch and delete the cookie.""" has_cookie = load_cookie(connector) if Path.exists(COOKIE_FILE): if args.verbose: print("Deleting cookie file...", file=stderr) # noqa: T201 Path(COOKIE_FILE).unlink() if not has_cookie: print("Not logged in.", file=stderr) # noqa: T201 return False if connector.delete_login_cookie(): return True print("Logout failed.", file=stderr) # noqa: T201 return False def save_command(connector: NetgearSwitchConnector, args: argparse.Namespace) -> bool: """Save pages to file.""" if not load_cookie(connector): print("Not logged in.", file=stderr) # noqa: T201 return False if not Path(args.path).exists(): Path(args.path).mkdir(parents=True, exist_ok=True) if args.verbose: print("Saving html pages...", file=stderr) # noqa: T201 connector.save_pages(args.path) return True def status_command(connector: NetgearSwitchConnector, args: argparse.Namespace) -> bool: """Display switch status.""" if not load_cookie(connector): print("Not logged in.", file=stderr) # noqa: T201 return False if args.verbose: print("Getting switch infos...", file=stderr) # noqa: T201 switch_infos = connector.get_switch_infos() if args.json: print(json.dumps(switch_infos, indent=4)) # noqa: T201 return True max_key_length = max(len(key) for key in switch_infos) for key in sorted(switch_infos.keys()): if not args.filter or args.filter in key: print(f"{key.ljust(max_key_length)}\t{switch_infos[key]}") # noqa: T201 return bool(switch_infos) def parse_command(connector: NetgearSwitchConnector, args: argparse.Namespace) -> bool: """Save parsed data to file.""" if not Path(args.path).exists(): print(f"Path does not exist: {args.path}", file=stderr) # noqa: T201 return False if args.verbose: print("Parsing html pages...", file=stderr) # noqa: T201 connector.turn_on_offline_mode(args.path) switch_infos = connector.get_switch_infos() switch_infos["switch_ip"] = "192.168.0.1" save_switch_infos(args.path, switch_infos) return True def reboot_command(connector: NetgearSwitchConnector, args: argparse.Namespace) -> bool: """Save pages to file.""" if args.verbose: print("Rebooting switch...", file=stderr) # noqa: T201 if not load_cookie(connector): print("Not logged in.", file=stderr) # noqa: T201 return False connector.autodetect_model() connector._get_switch_metadata() # noqa: SLF001 if connector.reboot(): if Path.exists(COOKIE_FILE): if args.verbose: print("Reboot successful. Deleting cookie file...", file=stderr) # noqa: T201 Path(COOKIE_FILE).unlink() return True if args.verbose: print("Reboot failed.", file=stderr) # noqa: T201 return False def version_command() -> bool: """Display CLI version.""" print(f"Netgear Plus CLI version: {ngp_version}") # noqa: T201 return True if __name__ == "__main__": main() foxey-py-netgear-plus-fec1337/src/py_netgear_plus/parsers.py000066400000000000000000001442571517216143300243530ustar00rootroot00000000000000"""Definitions of html parsers for Netgear Plus switches.""" import json import logging import re from typing import Any import requests from lxml import html from requests import Response from .fetcher import BaseResponse from .utils import get_all_child_classes_dict _LOGGER = logging.getLogger(__name__) API_V2_CHECKS = { "bootloader": ["V1.00.03", "V2.06.01", "V2.06.02", "V2.06.03", "V1.6.0.2-VB"], "firmware": ["V2.06.24GR", "V2.06.24EN", "V1.6.0.17"], } POE_PORT_ENABLED_STATUS = ["enable", "aktiv"] def create_page_parser(switch_model: str | None = None) -> Any: """Return the parser for the switch model.""" if switch_model is None: return PageParser() if switch_model not in PARSERS: message = f"Model {switch_model} not supported by the parser." raise NetgearPlusPageParserModelNotSupportedError(message) return PARSERS[switch_model]() def get_first_text(tree: html.HtmlElement, xpath: str) -> str: """Get the first text from an xpath.""" try: return tree.xpath(xpath)[0].text except IndexError as error: message = f"XPath {xpath} not found." raise NetgearPlusPageParserError(message) from error def get_first_value(tree: html.HtmlElement, xpath: str) -> str: """Get the first value from an xpath.""" try: return tree.xpath(xpath)[0].value except IndexError as error: message = f"XPath {xpath} not found." raise NetgearPlusPageParserError(message) from error def get_text_from_next_parent_element(tree: html.HtmlElement, xpath: str) -> str: """Get the first text from an xpath.""" try: return tree.xpath(xpath)[0].getparent().getnext().text_content() except IndexError as error: message = f"XPath {xpath} not found." raise NetgearPlusPageParserError(message) from error def get_text_from_next_element(tree: html.HtmlElement, xpath: str) -> str: """Get the first text from an xpath.""" try: return tree.xpath(xpath)[0].getnext().text_content() except IndexError as error: message = f"XPath {xpath} not found." raise NetgearPlusPageParserError(message) from error def strip_duplex(text: str) -> str: """Strip duplex from text.""" return re.sub(r"full|half", "", text, flags=re.IGNORECASE).strip() # convert to int def convert_to_int( lst: list, output_elems: int, base: int = 10, attr_name: str = "text", ) -> list: """Convert a list of objects to a list of integers.""" new_lst = [] for obj in lst: try: value = int(getattr(obj, attr_name), base) except (TypeError, ValueError): value = 0 new_lst.append(value) if len(new_lst) < output_elems: diff = output_elems - len(new_lst) new_lst.extend([0] * diff) return new_lst def convert_gs3xx_to_int(input_1: str, input_2: str, base: int = 10) -> int: """Convert two strings to an integer.""" int32 = 2**32 return int(input_1, base) * int32 + int(input_2, base) def convert_gs105_to_int(input_1: int, input_2: int) -> int: """Calculate real value from int32 turnover counter and current value.""" int32 = 2**32 return input_1 * int32 + input_2 class NetgearPlusPageParserError(Exception): """Base class for NetgearSwitchParser errors.""" class NetgearPlusPageParserModelNotSupportedError(NetgearPlusPageParserError): """Model not supported by the parser.""" class PageParser: """Base class for parsing Netgear Plus html pages.""" def __init__(self) -> None: """Empty contructor.""" self._switch_firmware = None self._switch_bootloader = None self._port_status = {} _LOGGER.debug("%s object initialized.", self.__class__.__name__) def parse_login_form_rand(self, page: Response | BaseResponse | None) -> str | None: """Return rand value from login page if present.""" if page is not None and page.content: tree = html.fromstring(page.content) input_rand_elems = tree.xpath('//input[@id="rand"]') if input_rand_elems and input_rand_elems[0].value: return input_rand_elems[0].value _LOGGER.debug( "[PageParser.parse_login_form_rand] rand INPUT element not found." ) return None def check_login_form_rand(self, page: Response | BaseResponse) -> bool: """Return true of rand value from login page is present.""" return bool(self.parse_login_form_rand(page)) def parse_login_title_tag(self, page: Response | BaseResponse) -> str | None: """Return the title tag from the login page.""" """For new firmwares V2.06.10, V2.06.17, V2.06.24.""" if page is not None and page.content: tree = html.fromstring(page.content) title_elems = tree.xpath("//title") if title_elems and title_elems[0].text: return title_elems[0].text.replace("NETGEAR", "").strip() _LOGGER.debug("[PageParser.parse_login_title_tag] TITLE element not found.") return None def parse_login_switchinfo_tag(self, page: Response | BaseResponse) -> str | None: """Return the title tag from the login page.""" """ For old firmware V2.00.05, return "" or something like: "GS108Ev3 - 8-Port Gigabit ProSAFE Plus Switch". Newer firmwares contain that too. """ if page is not None and page.content: tree = html.fromstring(page.content) switchinfo_elems = tree.xpath('//div[@class="switchInfo"]') if switchinfo_elems: return switchinfo_elems[0].text _LOGGER.debug( "[PageParser.parse_login_switchinfo_tag] " "DIV with class 'switchInfo' not found." ) return None def parse_first_script_tag(self, page: Response | BaseResponse) -> str | None: """Parse script tag.""" if page is not None and page.content: tree = html.fromstring(page.content) script_elems = tree.xpath("//script") if script_elems and script_elems[0].text: model_name = re.search("sysGeneInfor = '([^?]+)?", script_elems[0].text) if model_name: try: return model_name.group(1) except IndexError: pass _LOGGER.debug( "[PageParser.parse_script_tag] no sysGeneInfor in SCRIPT element found." ) return None def parse_gambit_tag(self, page: Response | BaseResponse) -> str | None: """Parse Gambit form element.""" # GS31xEP(P) series switches return the cookie value in a hidden form element if page is not None and page.content: tree = html.fromstring(page.content) gambit_elems = tree.xpath('//input[@name="Gambit"]') if gambit_elems and gambit_elems[0].value: return gambit_elems[0].value _LOGGER.debug("[PageParser.parse_gambit_tag] Gambit INPUT element not found.") return None def has_api_v2(self) -> bool: """Check if the switch has API v2.""" if not self._switch_firmware or not self._switch_bootloader: error_message = ( "Firmware or bootloader version not set. " "Call parse_switch_metadata first." ) raise NetgearPlusPageParserError(error_message) match_bootloader = self._switch_bootloader in API_V2_CHECKS["bootloader"] match_firmware = self._switch_firmware in API_V2_CHECKS["firmware"] return match_bootloader or match_firmware def parse_switch_metadata(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse switch info from the html page.""" tree = html.fromstring(page.content) switch_name = get_first_value(tree, '//input[@id="switch_name"]') switch_serial_number = get_first_text(tree, '//table[@id="tbl1"]/tr[3]/td[2]') # Detect Firmware (2nd xpath is for older firmware) self._switch_firmware = get_first_text( tree, '//table[@id="tbl1"]/tr[6]/td[2]' ) or get_first_text(tree, '//table[@id="tbl1"]/tr[4]/td[2]') self._switch_bootloader = get_first_text(tree, '//td[@id="loader"]') return { "switch_name": switch_name, "switch_serial_number": switch_serial_number, "switch_bootloader": self._switch_bootloader, "switch_firmware": self._switch_firmware, } def parse_client_hash(self, page: Response | BaseResponse) -> str | None: """Parse the client hash from the html page.""" tree = html.fromstring(page.content) return get_first_value(tree, '//input[@name="hash"]') def parse_led_status(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse status of the front panel LEDs from the html page.""" raise NotImplementedError def parse_port_status( self, page: Response | BaseResponse, ports: int ) -> dict[int, dict[str, Any]]: """Parse port status from the html page.""" status_by_port = {} if self.has_api_v2(): tree = html.fromstring(page.content) _port_elems = tree.xpath('//tr[@class="portID"]/td[2]') portstatus_elems = tree.xpath('//tr[@class="portID"]/td[3]') portspeed_elems = tree.xpath('//tr[@class="portID"]/td[4]') portconnectionspeed_elems = tree.xpath('//tr[@class="portID"]/td[5]') for port_nr in range(ports): try: status_text = portstatus_elems[port_nr].text.strip() modus_speed_text = portspeed_elems[port_nr].text.strip() connection_speed_text = strip_duplex( portconnectionspeed_elems[port_nr].text ) except (IndexError, AttributeError): status_text = self.port_status.get(port_nr + 1, {}).get( "status", None ) modus_speed_text = self.port_status.get(port_nr + 1, {}).get( "modus_speed", None ) connection_speed_text = self.port_status.get(port_nr + 1, {}).get( "connection_speed", None ) status_by_port[port_nr + 1] = { "status": status_text, "modus_speed": modus_speed_text, "connection_speed": connection_speed_text, } self.port_status = status_by_port _LOGGER.debug("Port Status is %s", self.port_status) return status_by_port def parse_port_statistics( self, page: Response | BaseResponse, ports: int ) -> dict[str, Any]: """Parse port statistics from the html page.""" if self.has_api_v2(): return self.parse_port_statistics_v2(page, ports) return self.parse_port_statistics_v1(page, ports) def parse_port_statistics_v1( self, page: Response | BaseResponse, ports: int ) -> dict[str, Any]: """Parse port statistics from the html page.""" tree = html.fromstring(page.content) rx_elems = tree.xpath('//tr[@class="portID"]/td[2]') tx_elems = tree.xpath('//tr[@class="portID"]/td[3]') crc_elems = tree.xpath('//tr[@class="portID"]/td[4]') # convert to int (base 10) rx = convert_to_int(rx_elems, output_elems=ports, base=10, attr_name="text") tx = convert_to_int(tx_elems, output_elems=ports, base=10, attr_name="text") crc = convert_to_int(crc_elems, output_elems=ports, base=10, attr_name="text") io_zeros = [0] * ports return { "traffic_rx": rx, "traffic_tx": tx, "sum_rx": rx, "sum_tx": tx, "crc_errors": crc, "speed_io": io_zeros, } def parse_port_statistics_v2( self, page: Response | BaseResponse, ports: int ) -> dict[str, Any]: """Parse port statistics from the html page.""" tree = html.fromstring(page.content) rx_elems = tree.xpath('//input[@name="rxPkt"]') tx_elems = tree.xpath('//input[@name="txpkt"]') crc_elems = tree.xpath('//input[@name="crcPkt"]') # convert to int (base 16) rx = convert_to_int(rx_elems, output_elems=ports, base=16, attr_name="value") tx = convert_to_int(tx_elems, output_elems=ports, base=16, attr_name="value") crc = convert_to_int(crc_elems, output_elems=ports, base=16, attr_name="value") io_zeros = [0] * ports return { "traffic_rx": rx, "traffic_tx": tx, "sum_rx": rx, "sum_tx": tx, "crc_errors": crc, "speed_io": io_zeros, } def parse_poe_port_config(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse PoE port configuration from the html page.""" raise NotImplementedError def parse_poe_port_status(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse PoE port status from the html page.""" raise NotImplementedError def parse_error(self, page: Response | BaseResponse) -> str | None: """Parse error from the html page.""" tree = html.fromstring(page.content) error_msg = tree.xpath('//input[@id="err_msg"]') if error_msg: return error_msg[0].value return None def parse_reboot_success(self, page: Response | BaseResponse) -> bool: """Parse if reboot was successful.""" return page.status_code == requests.codes.ok class GS105E(PageParser): """Parser for the GS105E switch.""" def __init__(self) -> None: """Initialize the GS105E parser.""" super().__init__() class GS105Ev2(PageParser): """Parser for the GS105Ev2 switch.""" def __init__(self) -> None: """Initialize the GS105Ev2 parser.""" super().__init__() def parse_switch_metadata(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse switch info from the html page.""" tree = html.fromstring(page.content) switch_name = get_first_value(tree, '//input[@id="switch_name"]') switch_serial_number = get_text_from_next_element( tree, '//td[contains(text(),"Serial Number")]' ) # Detect Firmware self._switch_firmware = get_text_from_next_element( tree, '//td[contains(text(),"Firmware Version")]' ) self._switch_bootloader = get_text_from_next_element( tree, '//td[contains(text(),"Bootloader Version")]' ) return { "switch_name": switch_name, "switch_serial_number": switch_serial_number, "switch_bootloader": self._switch_bootloader, "switch_firmware": self._switch_firmware, } def parse_port_status( self, page: Response | BaseResponse, ports: int ) -> dict[int, dict[str, Any]]: """Parse port status from the html page.""" status_by_port = {} tree = html.fromstring(page.content) _port_elems = tree.xpath('//tr[@class="portID"]/td[3]') portstatus_elems = tree.xpath('//tr[@class="portID"]/td[4]') portspeed_elems = tree.xpath('//tr[@class="portID"]/td[5]') portconnectionspeed_elems = tree.xpath('//tr[@class="portID"]/td[6]') portflowcontrol_elems = tree.xpath('//tr[@class="portID"]/td[7]') for port_nr in range(ports): try: description_text = _port_elems[port_nr].text or "" status_text = portstatus_elems[port_nr].text.strip() modus_speed_text = portspeed_elems[port_nr].text.strip() connection_speed_text = strip_duplex( portconnectionspeed_elems[port_nr].text ) flow_control_text = portflowcontrol_elems[port_nr].text.strip() except (IndexError, AttributeError): description_text = self.port_status.get(port_nr + 1, {}).get( "description", None ) status_text = self.port_status.get(port_nr + 1, {}).get("status", None) modus_speed_text = self.port_status.get(port_nr + 1, {}).get( "modus_speed", None ) connection_speed_text = self.port_status.get(port_nr + 1, {}).get( "connection_speed", None ) flow_control_text = self.port_status.get(port_nr + 1, {}).get( "flow_control", None ) status_by_port[port_nr + 1] = { "description": description_text, "status": status_text, "modus_speed": modus_speed_text, "connection_speed": connection_speed_text, "flow_control": flow_control_text, } self.port_status = status_by_port _LOGGER.debug("Port Status is %s", self.port_status) return status_by_port def parse_port_statistics( self, page: Response | BaseResponse, ports: int ) -> dict[str, Any]: """Parse port statistics from the html page.""" tree = html.fromstring(page.content) rx_turnover_elems = tree.xpath('//tr[@class="portID"]/input[1]') rx_current_elems = tree.xpath('//tr[@class="portID"]/input[2]') tx_turnover_elems = tree.xpath('//tr[@class="portID"]/input[3]') tx_current_elems = tree.xpath('//tr[@class="portID"]/input[4]') crc_turnover_elems = tree.xpath('//tr[@class="portID"]/input[5]') crc_current_elems = tree.xpath('//tr[@class="portID"]/input[6]') # calculate int bytes rx = [ convert_gs105_to_int(turnover, current) for turnover, current in zip( convert_to_int( rx_turnover_elems, output_elems=ports, base=10, attr_name="value" ), convert_to_int( rx_current_elems, output_elems=ports, base=10, attr_name="value" ), strict=False, ) ] tx = [ convert_gs105_to_int(turnover, current) for turnover, current in zip( convert_to_int( tx_turnover_elems, output_elems=ports, base=10, attr_name="value" ), convert_to_int( tx_current_elems, output_elems=ports, base=10, attr_name="value" ), strict=True, ) ] crc = [ convert_gs105_to_int(turnover, current) for turnover, current in zip( convert_to_int( crc_turnover_elems, output_elems=ports, base=10, attr_name="value" ), convert_to_int( crc_current_elems, output_elems=ports, base=10, attr_name="value" ), strict=True, ) ] io_zeros = [0] * ports return { "traffic_rx": rx, "traffic_tx": tx, "sum_rx": rx, "sum_tx": tx, "crc_errors": crc, "speed_io": io_zeros, } class GS105PE(GS105Ev2): """Parser for the GS105PE switch.""" def __init__(self) -> None: """Initialize the GS105PE parser.""" super().__init__() class GS105Ev3(PageParser): """Parser for the GS105Ev3 switch.""" def __init__(self) -> None: """Initialize the GS105Ev3 parser.""" super().__init__() class GS108E(PageParser): """Parser for the GS108E switch.""" def __init__(self) -> None: """Initialize the GS108E parser.""" super().__init__() class GS108Ev3(PageParser): """Parser for the GS108Ev3 switch.""" def __init__(self) -> None: """Initialize the GS108Ev3 parser.""" super().__init__() class GS108Ev4(PageParser): """Parser for the GS108Ev4 switch.""" def __init__(self) -> None: """Initialize the GS108Ev4 parser.""" super().__init__() def parse_switch_metadata(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse switch info from the html page.""" tree = html.fromstring(page.content) titles = tree.xpath('//div[@class="hid_info_title"]/span/text()') values = tree.xpath( '//div[@class="hid_info_title"]/following-sibling::div[1]/span/text()' ) data = dict(zip(titles, values, strict=False)) switch_name = get_first_value(tree, '//input[@id="switchName"]') switch_serial_number = data["ml198"] self._switch_firmware = data["ml089"] # unable to find bootloader version self._switch_bootloader = "unknown" return { "switch_name": switch_name, "switch_serial_number": switch_serial_number, "switch_bootloader": self._switch_bootloader, "switch_firmware": self._switch_firmware, } def parse_port_status( self, page: Response | BaseResponse, ports: int ) -> dict[int, dict[str, Any]]: """Parse port status from the html page.""" status_by_port = {} tree = html.fromstring(page.content) blocks = tree.xpath('//li[contains(@class, "list_item")]') for port_nr in range(ports): try: port = blocks[port_nr].xpath('.//input[@class="port"]/@value')[0] status_text = blocks[port_nr].xpath( './/span[contains(@class, "padding_r_18")]/span/text()' )[0] speed = blocks[port_nr].xpath('.//input[@class="Speed"]/@value')[0] connection_speed_text = strip_duplex( blocks[port_nr].xpath('.//input[@class="LinkedSpeed"]/@value')[0] ) modus_speed_text = [ "0", "Auto", "Disable", "3", "10M full", "5", "100M full", ][int(speed)] except (IndexError, AttributeError): status_text = self.port_status.get(port_nr + 1, {}).get("status", None) modus_speed_text = self.port_status.get(port_nr + 1, {}).get( "modus_speed", None ) connection_speed_text = self.port_status.get(port_nr + 1, {}).get( "connection_speed", None ) status_by_port[int(port)] = { "status": status_text, "modus_speed": modus_speed_text, "connection_speed": connection_speed_text, } self.port_status = status_by_port return status_by_port def parse_port_statistics( self, page: Response | BaseResponse, ports: int ) -> dict[str, Any]: """Parse port statistics from the html page.""" tree = html.fromstring(page.content) li_elements = tree.xpath("//li") data = {} rx = [0] * ports tx = [0] * ports crc = [0] * ports for li in li_elements: try: port_number = li.xpath(".//span[1]/text()") if not port_number: continue port_number = int(port_number[0].strip()) except ValueError: continue inputs = li.xpath("following-sibling::input[@type='hidden']/@value") data[port_number] = list(map(int, inputs[:6])) rx[port_number - 1] = int(data[port_number][1]) tx[port_number - 1] = int(data[port_number][3]) crc[port_number - 1] = int(data[port_number][5]) io_zeros = [0] * ports return { "traffic_rx": rx, "traffic_tx": tx, "sum_rx": rx, "sum_tx": tx, "crc_errors": crc, "speed_io": io_zeros, } class GS108PEv3(PageParser): """Parser for the GS108PEv3 switch.""" def __init__(self) -> None: """Initialize the GS108PEv3 parser.""" super().__init__() class GS305E(GS105Ev2): """Parser for the GS305E switch.""" def __init__(self) -> None: """Initialize the GS305E parser.""" super().__init__() class GS308E(PageParser): """Parser for the GS308E switch.""" def __init__(self) -> None: """Initialize the GS308E parser.""" super().__init__() class GS308Ev4(GS108Ev4): """Parser for the GS308Ev4 switch.""" def __init__(self) -> None: """Initialize the GS308Ev4 parser.""" super().__init__() def parse_reboot_success(self, page: Response | BaseResponse) -> bool: """Parse if reboot was successful.""" return page.status_code in [ requests.codes.ok, requests.codes.no_response, ] class EMxSeries(PageParser): """Parser for the GS110EMX switch.""" def __init__(self) -> None: """Initialize the GS110EMX parser.""" super().__init__() def parse_switch_metadata(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse switch info from the html page.""" tree = html.fromstring(page.content) switch_name = get_first_value(tree, '//input[@name="switch_name"]') switch_serial_number = get_text_from_next_element( tree, '//td[contains(text(),"Serial Number")]' ) self._switch_bootloader = "unknown" self._switch_firmware = get_text_from_next_element( tree, '//td[contains(text(),"Firmware Version")]' ) return { "switch_name": switch_name, "switch_serial_number": switch_serial_number, "switch_bootloader": self._switch_bootloader, "switch_firmware": self._switch_firmware, } def parse_client_hash(self, page: Response | BaseResponse) -> str | None: """Return None as these switches do not have a hash value.""" del page return None def parse_port_status( self, page: Response | BaseResponse, ports: int ) -> dict[int, dict[str, Any]]: """Parse port status from the html page.""" tree = html.fromstring(page.content) xtree_port_statusses = tree.xpath('//tr[@class="portID"]') if len(xtree_port_statusses) != ports: message = f"Port count mismatch: {len(xtree_port_statusses)} != {ports}" raise NetgearPlusPageParserError(message) status_by_port = {} for element in xtree_port_statusses: try: port_nr = element.xpath('./td/input[@name="PORT_NO"]')[0].value port_nr = int(port_nr) except IndexError as error: message = "parse_port_status: Port number not found." raise NetgearPlusPageParserError(message) from error except ValueError as error: message = f"parse_port_status: Port number ({port_nr}) not an integer." raise NetgearPlusPageParserError(message) from error xtree_port_attributes = element.xpath("./td") port_state_text = xtree_port_attributes[3].text.strip() modus_speed_text = xtree_port_attributes[4].text.strip() connection_speed_text = strip_duplex(xtree_port_attributes[5].text) status_by_port[port_nr] = { "status": port_state_text, "modus_speed": modus_speed_text, "connection_speed": connection_speed_text, } self.port_status = status_by_port _LOGGER.debug("Port Status is %s", self.port_status) return status_by_port def parse_port_statistics( self, page: Response | BaseResponse, ports: int ) -> dict[str, Any]: """Parse port statistics from the html page.""" tree = html.fromstring(page.content) rx = [] tx = [] crc = [] page_inputs = tree.xpath('//table/tr[@class="portID"]/td') for port_nr in range(ports): try: rx_value = int(page_inputs[port_nr * 4 + 1].text) except (IndexError, ValueError): rx_value = 0 rx.append(rx_value) try: tx_value = int(page_inputs[port_nr * 4 + 2].text) except (IndexError, ValueError): tx_value = 0 tx.append(tx_value) try: crc_value = int(page_inputs[port_nr * 4 + 3].text) except (IndexError, ValueError): crc_value = 0 crc.append(crc_value) io_zeros = [0] * ports return { "traffic_rx": rx, "traffic_tx": tx, "sum_rx": rx, "sum_tx": tx, "crc_errors": crc, "speed_io": io_zeros, } class GS110EMX(EMxSeries): """Parser for the GS110EMX switch.""" def __init__(self) -> None: """Initialize the GS110EMX parser.""" super().__init__() class XS512EM(EMxSeries): """Parser for the GS110EMX switch.""" def __init__(self) -> None: """Initialize the GS110EMX parser.""" super().__init__() class GS30xSeries(PageParser): """Parser for the GS30x switch series.""" def __init__(self) -> None: """Initialize the GS30xSeries parser.""" super().__init__() def parse_switch_metadata(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse switch info from the html page.""" tree = html.fromstring(page.content) switch_name = get_first_text(tree, '//div[@id="switch_name"]') switch_serial_number = get_text_from_next_parent_element( tree, '//span[text()="ml198"]' ) self._switch_bootloader = "unknown" self._switch_firmware = get_text_from_next_parent_element( tree, '//span[text()="ml089"]' ) return { "switch_name": switch_name, "switch_serial_number": switch_serial_number, "switch_bootloader": self._switch_bootloader, "switch_firmware": self._switch_firmware, } def parse_led_status(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse status of the front panel LEDs from the html page.""" tree = html.fromstring(page.content) led_status = get_first_text(tree, '//span[@id="led_switch"]') return {"led_status": "on" if led_status == "ON" else "off"} def parse_port_status( self, page: Response | BaseResponse, ports: int ) -> dict[int, dict[str, Any]]: """Parse port status from the html page.""" tree = html.fromstring(page.content) status_by_port = {} for port0 in range(ports): port_nr = port0 + 1 xtree_port = tree.xpath(f'//div[@name="isShowPot{port_nr}"]')[0] port_state_text = xtree_port[1][0].text modus_speed_text = tree.xpath('//input[@class="Speed"]')[port0].value if modus_speed_text == "1": modus_speed_text = "Auto" connection_speed_text = strip_duplex( tree.xpath('//input[@class="LinkedSpeed"]')[port0].value ) status_by_port[port_nr] = { "status": port_state_text, "modus_speed": modus_speed_text, "connection_speed": connection_speed_text, } self.port_status = status_by_port _LOGGER.debug("Port Status is %s", self.port_status) return status_by_port def parse_port_statistics( self, page: Response | BaseResponse, ports: int ) -> dict[str, Any]: """Parse port statistics from the html page.""" tree = html.fromstring(page.content) rx = [] tx = [] crc = [] page_inputs = tree.xpath('//*[@id="settingsStatusContainer"]/div/ul/input') for port_nr in range(ports): input_1_text: str = page_inputs[port_nr * 6].value input_2_text: str = page_inputs[port_nr * 6 + 1].value rx_value = convert_gs3xx_to_int(input_1_text, input_2_text) rx.append(rx_value) input_3_text: str = page_inputs[port_nr * 6 + 2].value input_4_text: str = page_inputs[port_nr * 6 + 3].value tx_value = convert_gs3xx_to_int(input_3_text, input_4_text) tx.append(tx_value) input_5_text: str = page_inputs[port_nr * 6 + 4].value input_6_text: str = page_inputs[port_nr * 6 + 5].value crc_value = convert_gs3xx_to_int(input_5_text, input_6_text) crc.append(crc_value) io_zeros = [0] * ports return { "traffic_rx": rx, "traffic_tx": tx, "sum_rx": rx, "sum_tx": tx, "crc_errors": crc, "speed_io": io_zeros, } def parse_poe_port_config(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse PoE port configuration from the html page.""" switch_data = {} tree = html.fromstring(page.content) poe_port_config = {} poe_port_power_x = tree.xpath('//input[@id="hidPortPwr"]') for i, x in enumerate(poe_port_power_x): poe_port_config[i + 1] = "on" if x.value == "1" else "off" for poe_port_nr, poe_power_config in poe_port_config.items(): switch_data[f"port_{poe_port_nr}_poe_power_active"] = poe_power_config return switch_data def parse_poe_port_status(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse PoE port status from the html page.""" switch_data = {} tree = html.fromstring(page.content) poe_output_power = {} # Port name: # //li[contains(@class,"poe_port_list_item")] # //span[contains(@class,"poe_index_li_title")] # Power mode: # //li[contains(@class,"poe_port_list_item")] # //span[contains(@class,"poe-power-mode")] # Port status: # //li[contains(@class,"poe_port_list_item")] # //div[contains(@class,"poe_port_status")] poe_output_power_x = tree.xpath( '//li[contains(@class,"poe_port_list_item")]//div[contains(@class,"poe_port_status")]' ) for i, x in enumerate(poe_output_power_x): try: poe_output_power[i + 1] = float(x.xpath(".//span")[5].text) except ValueError: poe_output_power[i + 1] = 0.0 for poe_port_nr, poe_power_status in poe_output_power.items(): switch_data[f"port_{poe_port_nr}_poe_output_power"] = poe_power_status return switch_data def parse_error(self, page: Response | BaseResponse) -> str | None: """Parse error from the html page.""" tree = html.fromstring(page.content) error_msg = tree.xpath('//div[@class="pwdErrStyle"]') if error_msg: return error_msg[0].text return None def parse_reboot_success(self, page: Response | BaseResponse) -> bool: """Parse if reboot was successful.""" return page.status_code in [ requests.codes.ok, requests.codes.no_response, ] class GS305EP(GS30xSeries): """Parser for the GS305EP switch.""" def __init__(self) -> None: """Initialize the GS305EP parser.""" super().__init__() class GS305EPP(GS30xSeries): """Parser for the GS305EP switch.""" def __init__(self) -> None: """Initialize the GS305EP parser.""" super().__init__() class GS308EP(GS30xSeries): """Parser for the GS108EP switch.""" def __init__(self) -> None: """Initialize the GS308EP parser.""" super().__init__() class GS308EPP(GS30xSeries): """Parser for the GS108EP switch.""" def __init__(self) -> None: """Initialize the GS308EP parser.""" super().__init__() class GS31xSeries(PageParser): """Parser for the GS31x switch series.""" def __init__(self) -> None: """Initialize the GS31xSeries parser.""" super().__init__() def parse_switch_metadata(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse switch info from the html page.""" tree = html.fromstring(page.content) switch_name = get_first_value(tree, '//input[@name="switchName"]') switch_serial_number = get_text_from_next_element( tree, '//p[contains(text(),"Serial Number")]' ) self._switch_bootloader = "unknown" self._switch_firmware = get_text_from_next_element( tree, '//p[contains(text(),"Firmware Version")]' ) return { "switch_name": switch_name, "switch_serial_number": switch_serial_number, "switch_bootloader": self._switch_bootloader, "switch_firmware": self._switch_firmware, } def parse_client_hash(self, page: Response | BaseResponse) -> str | None: """Return None as these switches do not have a hash value.""" del page return None def parse_led_status(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse status of the front panel LEDs from the html page.""" tree = html.fromstring(page.content) xpath = tree.xpath('//input[@id="ledStatus"]') if xpath: led_status = xpath[0].checked return {"led_status": "on" if led_status else "off"} def parse_port_status( self, page: Response | BaseResponse, ports: int ) -> dict[int, dict[str, Any]]: """Parse port status from the html page.""" tree = html.fromstring(page.content) xtree_port_statusses = tree.xpath('//span[contains(@class,"status-on-port")]') xtree_port_attributes = tree.xpath('//div[@class="port-status"]') if len(xtree_port_statusses) != ports or len(xtree_port_attributes) != ports: message = ( "Port count mismatch: Expected %s, got %s (status) and %s (attributes)", ports, len(xtree_port_statusses), len(xtree_port_attributes), ) raise NetgearPlusPageParserError(message) status_by_port = {} for port_nr0 in range(ports): port_nr = port_nr0 + 1 port_state_text = xtree_port_statusses[port_nr0].text port_attributes = xtree_port_attributes[port_nr0].xpath("./div/div/p") modus_speed_text = port_attributes[1].text connection_speed_text = strip_duplex(port_attributes[3].text) status_by_port[port_nr] = { "status": port_state_text, "modus_speed": modus_speed_text, "connection_speed": connection_speed_text, } self.port_status = status_by_port _LOGGER.debug("Port Status is %s", self.port_status) return status_by_port def parse_port_statistics( self, page: Response | BaseResponse, ports: int ) -> dict[str, Any]: """Parse port statistics from the html page.""" tree = html.fromstring(page.content) rx = [] tx = [] crc = [] page_inputs = tree.xpath("//table/tr/td") for port_nr in range(1, ports + 1): try: rx_value = int(page_inputs[port_nr * 4 + 1].text) except (IndexError, ValueError): rx_value = 0 rx.append(rx_value) try: tx_value = int(page_inputs[port_nr * 4 + 2].text) except (IndexError, ValueError): tx_value = 0 tx.append(tx_value) try: crc_value = int(page_inputs[port_nr * 4 + 3].text) except (IndexError, ValueError): crc_value = 0 crc.append(crc_value) io_zeros = [0] * ports return { "traffic_rx": rx, "traffic_tx": tx, "sum_rx": rx, "sum_tx": tx, "crc_errors": crc, "speed_io": io_zeros, } def parse_poe_port_config(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse PoE port configuration from the html page.""" switch_data = {} tree = html.fromstring(page.content) poe_port_config = {} poe_port_admin_state_x = tree.xpath( '//div[@id="devicesContainer"]//div[contains(@class,"port-wrap")]//span[contains(@class,"admin-state")]' ) for i, x in enumerate(poe_port_admin_state_x): poe_port_config[i + 1] = ( "on" if x.text.lower() in POE_PORT_ENABLED_STATUS else "off" ) for poe_port_nr, poe_power_config in poe_port_config.items(): switch_data[f"port_{poe_port_nr}_poe_power_active"] = poe_power_config return switch_data def parse_poe_port_status(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse PoE port status from the html page.""" switch_data = {} tree = html.fromstring(page.content) poe_output_power = {} poe_output_power_x = tree.xpath( '//div[contains(@class,"port-wrap")]//p[contains(@class,"OutputPower-text")]' ) for i, x in enumerate(poe_output_power_x): try: poe_output_power[i + 1] = float(x.text) except ValueError: poe_output_power[i + 1] = 0.0 for poe_port_nr, poe_power_status in poe_output_power.items(): switch_data[f"port_{poe_port_nr}_poe_output_power"] = poe_power_status return switch_data class GS316EP(GS31xSeries): """Parser for the GS316EP switch.""" def __init__(self) -> None: """Initialize the GS316EP parser.""" super().__init__() class GS316EPP(GS31xSeries): """Parser for the GS316EPP switch.""" def __init__(self) -> None: """Initialize the GS316EPP parser.""" super().__init__() class JGSxxxSeries(PageParser): """Parser for the JGSxxx switch models.""" META_DATA_PARTS = 9 META_DATA_NAME = 1 META_DATA_SERIAL_NUMBER = 8 META_DATA_FIRMWARE = 3 def __init__(self) -> None: """Initialize the GS108E parser.""" super().__init__() def parse_switch_metadata(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse switch info from the html page.""" switch_metadata = [] result = re.search("sysGeneInfor = '([^']+)';", page.content.decode("utf8")) if result: switch_metadata = result.group(1).split("?") if len(switch_metadata) != self.META_DATA_PARTS: message = ( "Switch metadata contains" f" {len(switch_metadata)} elements instead of " f"{self.META_DATA_PARTS}: {switch_metadata}" ) raise NetgearPlusPageParserError(message) switch_name = switch_metadata[self.META_DATA_NAME] switch_serial_number = switch_metadata[self.META_DATA_SERIAL_NUMBER] self._switch_bootloader = "unknown" self._switch_firmware = switch_metadata[self.META_DATA_FIRMWARE] return { "switch_name": switch_name, "switch_serial_number": switch_serial_number, "switch_bootloader": self._switch_bootloader, "switch_firmware": self._switch_firmware, } def parse_client_hash(self, page: Response | BaseResponse) -> str | None: """Parse the client hash from the html page.""" result = re.search("secureRand = '([^']+)';", page.content.decode("utf8")) if result and len(result.groups()): return result.group(1) return None def parse_port_status( self, page: Response | BaseResponse, ports: int ) -> dict[int, dict[str, Any]]: """Parse port status from the html page.""" result = re.findall( r"portConfigEntry\[([0-9]+)\] = '([^']+)';", page.content.decode("utf8") ) if len(result) != ports: message = ( "Port count mismatch: Expected %s, got %s", ports, len(result), ) raise NetgearPlusPageParserError(message) status_by_port = {} for status in result: port_nr = int(status[0]) + 1 modus_speed_text = status[1].split("?")[3] port_state_text = status[1].split("?")[2] connection_speed_text = strip_duplex(status[1].split("?")[4]) status_by_port[port_nr] = { "status": port_state_text, "modus_speed": modus_speed_text, "connection_speed": connection_speed_text, } return status_by_port def parse_port_statistics( self, page: Response | BaseResponse, ports: int ) -> dict[str, Any]: """Parse port statistics from the html page.""" result = re.findall( r"StatisticsEntry\[([0-9]+)\] = '([^']+)';", page.content.decode("utf8") ) if len(result) != ports: message = ( "Port count mismatch: Expected %s, got %s", ports, len(result), ) raise NetgearPlusPageParserError(message) rx = [] tx = [] crc = [] for port_nr in range(ports): statistics_entry = result[port_nr][1].split("?") rx.append(int(statistics_entry[1])) tx.append(int(statistics_entry[2])) crc.append(int(statistics_entry[3])) io_zeros = [0] * ports return { "traffic_rx": rx, "traffic_tx": tx, "sum_rx": rx, "sum_tx": tx, "crc_errors": crc, "speed_io": io_zeros, } def parse_error(self, page: Response | BaseResponse) -> str | None: """Parse error from the html page.""" tree = html.fromstring(page.content) error_msg = tree.xpath('//div[@class="pwdErrStyle"]') if error_msg: return error_msg[0].text return None class JGS516PE(JGSxxxSeries): """Parser for the JGS516EP switch.""" def __init__(self) -> None: """Initialize the JGS516EP parser.""" super().__init__() class JGS524Ev2(JGSxxxSeries): """Parser for the JGS524Ev2 switch.""" def __init__(self) -> None: """Initialize the JGS524Ev2 parser.""" super().__init__() class GS116Ev2(JGSxxxSeries): """Parser for the GS116Ev2 switch.""" def __init__(self) -> None: """Initialize the GS116Ev2 parser.""" super().__init__() class MS3xxSeries(PageParser): """Parser for MS3xx series switches (JSON REST API).""" def __init__(self) -> None: """Initialize the MS3xx series parser.""" super().__init__() def parse_switch_metadata(self, page: Response | BaseResponse) -> dict[str, Any]: """Parse switch info from the JSON API response.""" data = json.loads(page.content) system_info = data.get("systemInfo", {}) self._switch_firmware = system_info.get("firmwareVersion", "") self._switch_bootloader = "" return { "switch_name": system_info.get("switchName", ""), "switch_serial_number": system_info.get("serialNumber", ""), "switch_bootloader": self._switch_bootloader, "switch_firmware": self._switch_firmware, } def parse_port_status( self, page: Response | BaseResponse, ports: int ) -> dict[int, dict[str, Any]]: """Parse port status from the JSON API response.""" del ports data = json.loads(page.content) status_by_port: dict[int, dict[str, Any]] = {} for port_conf in data.get("portConfs", []): port_no = int(port_conf["portNo"]) link_speed = str(port_conf.get("linkSpeed", "")) # Strip duplex suffix (e.g. "100M_F" -> "100M") connection_speed = re.sub(r"_[FH]$", "", link_speed) is_connected = bool(link_speed) and link_speed.lower() not in ( "down", "disabled", ) status_by_port[port_no] = { "status": "Up" if is_connected else "Down", "modus_speed": str(port_conf.get("linkSpeedConf", "")), "connection_speed": connection_speed, } self.port_status = status_by_port return status_by_port def parse_port_statistics( self, page: Response | BaseResponse, ports: int ) -> dict[str, Any]: """Parse port statistics from the JSON API response.""" data = json.loads(page.content) rx = [] tx = [] crc = [] for port_stat in data.get("portStatistics", []): rx.append(int(port_stat.get("bytesRecv", 0))) tx.append(int(port_stat.get("bytesSend", 0))) crc.append(int(port_stat.get("crcPackets", 0))) # Pad to expected number of ports in case the API returns fewer # entries than the model's port count (e.g. ports not yet initialised). while len(rx) < ports: rx.append(0) tx.append(0) crc.append(0) # The JSON API only provides cumulative byte counts, not real-time # speed, so speed_io is always zero. The caller computes speed from # the delta between consecutive cumulative readings. io_zeros = [0] * ports return { "traffic_rx": rx, "traffic_tx": tx, "sum_rx": rx, "sum_tx": tx, "crc_errors": crc, "speed_io": io_zeros, } def parse_client_hash(self, page: Response | BaseResponse) -> str | None: """No client hash for JSON REST API switches.""" del page return None def parse_error(self, page: Response | BaseResponse) -> str | None: """Parse error from the JSON API response.""" try: data = json.loads(page.content) if data.get("errCode", 0) != 0: return data.get("message", "Unknown error") except (ValueError, AttributeError): pass return None def has_api_v2(self) -> bool: """JSON REST API switches do not use the v2 HTML API.""" return False class MS305E(MS3xxSeries): """Parser for the MS305E switch.""" def __init__(self) -> None: """Initialize the MS305E parser.""" super().__init__() class MS308E(MS3xxSeries): """Parser for the MS308E switch.""" def __init__(self) -> None: """Initialize the MS308E parser.""" super().__init__() PARSERS = get_all_child_classes_dict(PageParser) foxey-py-netgear-plus-fec1337/src/py_netgear_plus/utils.py000066400000000000000000000047331517216143300240260ustar00rootroot00000000000000"""Utility functions.""" def get_all_child_classes_dict( parent_class: type[object], filter_attr: str | None = None ) -> dict[str, type[object]]: """ Retrieve a dictionary of all subclasses of the given parent class. The key is the subclass's `filter_attr` attribute if provided. Otherwise, it includes all subclasses using their class name. If a subclass does not have the `filter_attr` attribute or it is empty, it is skipped from the dictionary, but its children are still included. :param parent_class: The parent class to find subclasses of. :param filter_attr: The attribute to filter subclasses (default: None, meaning include all). :return: A dictionary {subclass.filter_attr: subclass_object} if filter_attr is provided, otherwise {subclass.__name__: subclass_object}. """ subclasses_dict: dict[str, type[object]] = {} for subclass in parent_class.__subclasses__(): # Recursively get child subclasses first subclasses_dict.update(get_all_child_classes_dict(subclass, filter_attr)) if filter_attr: attr_value = getattr(subclass, filter_attr, None) if isinstance(attr_value, str) and attr_value: subclasses_dict[attr_value] = subclass else: subclasses_dict[subclass.__name__] = ( subclass # Use class name if no filter attribute ) return subclasses_dict def get_all_child_classes_list( parent_class: type[object], filter_attr: str | None = None ) -> list[type[object]]: """ Retrieve a list of all subclasses of the given parent class. If `filter_attr` is provided, only subclasses with a non-empty `filter_attr` value are returned. :param parent_class: The parent class to find subclasses of. :param filter_attr: The attribute to filter subclasses (default: None, meaning include all). :return: A list of subclass objects. """ subclasses_list: list[type[object]] = [] for subclass in parent_class.__subclasses__(): # Recursively get child subclasses first subclasses_list.extend(get_all_child_classes_list(subclass, filter_attr)) if filter_attr: attr_value = getattr(subclass, filter_attr, None) if isinstance(attr_value, str) and attr_value: subclasses_list.append(subclass) else: subclasses_list.append(subclass) # Include all if no filter attribute return subclasses_list foxey-py-netgear-plus-fec1337/tests/000077500000000000000000000000001517216143300174605ustar00rootroot00000000000000foxey-py-netgear-plus-fec1337/tests/.ruff.toml000066400000000000000000000016161517216143300214010ustar00rootroot00000000000000# The contents of this file is based on https://github.com/home-assistant/core/blob/dev/pyproject.toml # and adapted for use with pytest. target-version = "py312" [lint] select = ["ALL"] ignore = [ "ANN401", # Dynamically typed expressions (typing.Any) are disallowed "D203", # no-blank-line-before-class (incompatible with formatter) "D212", # multi-line-summary-first-line (incompatible with formatter) "COM812", # incompatible with formatter "ISC001", # incompatible with formatter, "PLR2004", # Magic value used in comparison "S101", # use of assert detected "S105", # Possible hardcoded password "S106", # Possible hardcoded password assigned to argument "SLF001", # Private member accessed outside class ] [lint.flake8-pytest-style] fixture-parentheses = false [lint.pyupgrade] keep-runtime-typing = true [lint.mccabe] max-complexity = 25 foxey-py-netgear-plus-fec1337/tests/__init__.py000066400000000000000000000000611517216143300215660ustar00rootroot00000000000000"""Unit tests for the py_netgear_plus module.""" foxey-py-netgear-plus-fec1337/tests/test___init__.py000066400000000000000000001062631517216143300226400ustar00rootroot00000000000000"""Unit tests for the py_netgear_plus __init__ module.""" import json from pathlib import Path from typing import TYPE_CHECKING from unittest.mock import Mock, patch import pytest import requests import requests.cookies from py_netgear_plus import ( DEFAULT_PAGE, NetgearSwitchConnector, _from_bytes_to_megabytes, ) from py_netgear_plus.fetcher import URL_REQUEST_TIMEOUT, BaseResponse from py_netgear_plus.models import ( GS105PE, GS110EMX, GS305E, GS308E, GS308EP, GS308EPP, GS316EPP, JGS516PE, MS305E, MS308E, XS512EM, AutodetectedSwitchModel, GS105Ev2, GS108Ev3, GS108Ev4, GS108PEv3, GS308Ev4, JGS524Ev2, ) from py_netgear_plus.netgear_crypt import hex_hmac_md5, merge_hash if TYPE_CHECKING: from http.cookiejar import Cookie # List of models with saved pages, extracted rand values and crypted passwords MODEL_PARAMETERS = [ (GS105Ev2, "897006492", "6e5b60b4082b2ac23103ec2e7caf0284", ""), (GS105PE, "1578591883", "99915f464feee3be4193edd6dcc6b9b3", ""), (GS108Ev3, "1763184457", "c2c905d5d99f592106a378bf709b737a", ""), (GS108PEv3, "1735414426", "2038fc386c5e77ded19b31d7aa14a443", ""), ( GS110EMX, "2055460636", "3e51baecfd84e4c0010662d6d92a1253", '', ), (GS108Ev4, "1798387901", "0b9b21bb5c28b73e300cfb526d468bd9", ""), (GS305E, "1018767543", "c01909066125ac45d275af0a6cd09b5e", ""), (GS308E, "2102219470", "e8e0a9820f683fe8e64da0014a49902c", ""), (GS308EP, "990464497", "43001294a37a3f2e1f919b64072a1a32", ""), (GS308EPP, "1425622205", "e65ad5ee60718843afafeaa03bd1ec49", ""), ( GS316EPP, "1127757600", "3c630eb52109743e94ef671e137b3de0", '', ), ( GS308Ev4, "1467252539", "5f01444681a83b9a39c6e9e1ea2a91db", "", ), ( JGS516PE, None, "26fe7cce1e480dd05e7f76155579d3ed", "", ), ( JGS524Ev2, None, "26fe7cce1e480dd05e7f76155579d3ed", "", ), ( XS512EM, "1113244551", "6ca0965e7a44ee17eec5d575c8c56dd8", '', ), ] # Add models without a full set of pages with pytest.param(GSXYZ, # marks=pytest.mark.xfail(reason="no valid data pages")) MODELS_FOR_GET_SWITCH_INFOS = [ GS105Ev2, GS105PE, GS108Ev3, GS108PEv3, GS108Ev4, GS110EMX, GS305E, GS308E, GS308EP, GS308EPP, GS308Ev4, GS316EPP, JGS516PE, JGS524Ev2, XS512EM, ] # List of models for reboot test, with # reboot response code and if page content is returned MODELS_FOR_REBOOT = [ (GS105Ev2, 200, True), (GS108Ev3, 200, True), (GS308Ev4, 444, False), (GS308EP, 444, False), (GS308EPP, 444, False), ] TEST_MODELS = [model[0] for model in MODEL_PARAMETERS] PORT_SWITCH_MODELS = [ switch_model for switch_model in TEST_MODELS if switch_model.SWITCH_PORT_TEMPLATES ] class PyTestPageFetcher: """A class to fetch pages from a file.""" def __init__(self, switch_model: type[AutodetectedSwitchModel]) -> None: """Initialize the PageFetcher.""" self.switch_model = switch_model self._sequence = 0 def next_sequence(self) -> int: """Get the next sequence number.""" self._sequence += 1 return self._sequence def from_file( self, templates: list[dict[str, str]], client_hash: str = "", ) -> requests.Response: """Fetch a page from a file.""" del client_hash response = Mock() response.status_code = requests.codes.ok response.content = self.get_path(templates).read_bytes() return response def get_path(self, templates: list[dict[str, str]]) -> Path: """Get the path to the first page that exists as a file.""" for template in templates: url = template["url"] page_name = url.split("/")[-1] or DEFAULT_PAGE path = Path( f"pages/{self.switch_model.MODEL_NAME}/{self._sequence}/{page_name}" ) if path.exists(): return path raise FileNotFoundError def test_0_from_bytes_to_megabytes() -> None: """Test cases for _from_bytes_to_megabytes function.""" assert _from_bytes_to_megabytes(1000000) == 1.00 assert _from_bytes_to_megabytes(5000000) == 5.00 assert _from_bytes_to_megabytes(123456789) == 123.46 assert _from_bytes_to_megabytes(0) == 0.00 assert _from_bytes_to_megabytes(-1000000) == -1.00 def test_0_netgear_switch_connector_initialization() -> None: """Test initialization of NetgearSwitchConnector.""" connector = NetgearSwitchConnector(host="192.168.0.1", password="password") assert connector.host == "192.168.0.1" assert connector._password == "password" assert connector.switch_model is not None assert connector.ports == 0 assert connector.poe_ports == [] assert connector._switch_bootloader == "unknown" assert connector.sleep_time == 0.25 assert connector._page_fetcher is not None assert connector._client_hash is None assert connector._gambit is None assert connector._previous_data == {} assert connector._loaded_switch_metadata == {} @pytest.mark.parametrize( "switch_model", TEST_MODELS, ) def test_autodetect_model(switch_model: type[AutodetectedSwitchModel]) -> None: """Test autodetect_model method.""" page_fetcher = PyTestPageFetcher(switch_model) connector = NetgearSwitchConnector(host="192.168.0.1", password="password") with patch("py_netgear_plus.fetcher.requests.request") as mock_request: mock_response = Mock() with page_fetcher.get_path(switch_model.AUTODETECT_TEMPLATES).open() as file: mock_response.content = file.read() mock_response.status_code = requests.codes.ok mock_request.return_value = mock_response connector.autodetect_model() assert isinstance(connector.switch_model, switch_model) @pytest.mark.parametrize( "switch_model", TEST_MODELS, ) def test_check_login_url(switch_model: type[AutodetectedSwitchModel]) -> None: """Test check_login_url method.""" page_fetcher = PyTestPageFetcher(switch_model) connector = NetgearSwitchConnector(host="192.168.0.1", password="password") with patch("py_netgear_plus.fetcher.requests.request") as mock_request: mock_response = Mock() with page_fetcher.get_path(switch_model.AUTODETECT_TEMPLATES).open() as file: mock_response.content = file.read() mock_response.status_code = requests.codes.ok mock_request.return_value = mock_response mock_response.status_code = requests.codes.ok mock_request.return_value = mock_response assert connector._page_fetcher.check_login_url(switch_model) is True assert connector._page_fetcher._login_page_response == mock_response checks = switch_model.CHECKS_AND_RESULTS if True in next( (check[1] for check in checks if check[0] == "check_login_form_rand"), [False], ): rand = connector._page_parser.parse_login_form_rand( connector._page_fetcher._login_page_response ) assert rand is not None @pytest.mark.parametrize( ("switch_model", "rand", "crypted_password", "content"), MODEL_PARAMETERS, ) def test_parse_login_form_rand( switch_model: type[AutodetectedSwitchModel], rand: str, crypted_password: str, content: str, # noqa: ARG001 ) -> None: """Test check_login_form_rand method.""" password = "Password1" connector = NetgearSwitchConnector(host="192.168.0.1", password=password) connector._page_fetcher._login_page_response = Mock() page_fetcher = PyTestPageFetcher(switch_model) with page_fetcher.get_path(switch_model.AUTODETECT_TEMPLATES).open() as file: connector._page_fetcher._login_page_response.content = file.read() connector._page_fetcher._login_page_response.status_code = requests.codes.ok assert ( connector._page_parser.parse_login_form_rand( connector._page_fetcher._login_page_response ) == rand ) crypt_function = switch_model.CRYPT_FUNCTION if crypt_function == "hex_hmac_md5": assert hex_hmac_md5(password) == crypted_password elif crypt_function == "merge_hash": assert merge_hash(password, rand) == crypted_password else: pytest.fail(f"Unknown crypt function {crypt_function}") @pytest.mark.parametrize( "switch_model", TEST_MODELS, ) def test_get_unique_id(switch_model: type[AutodetectedSwitchModel]) -> None: """Test get_unique_id method.""" connector = NetgearSwitchConnector(host="192.168.0.1", password="password") connector.switch_model = switch_model assert ( connector.get_unique_id() == f"{connector.switch_model.__name__.lower()}_192_168_0_1" ) @pytest.mark.parametrize( ("switch_model", "rand", "crypted_password", "content"), MODEL_PARAMETERS, ) def test_get_login_password( switch_model: AutodetectedSwitchModel, rand: str, crypted_password: str, content: str, # noqa: ARG001 ) -> None: """Test get_login_password method.""" password = "Password1" connector = NetgearSwitchConnector(host="192.168.0.1", password=password) with patch("py_netgear_plus.fetcher.requests.request") as mock_request: mock_response = Mock() page_name = switch_model.LOGIN_TEMPLATE["url"].split("/")[-1] or DEFAULT_PAGE with Path(f"pages/{switch_model.MODEL_NAME}/0/{page_name}").open() as file: mock_response.content = file.read() mock_response.status_code = requests.codes.ok mock_request.return_value = mock_response connector._page_fetcher._login_page_response = mock_response crypt_function = switch_model.CRYPT_FUNCTION if crypt_function == "hex_hmac_md5": assert hex_hmac_md5(password) == crypted_password elif crypt_function == "merge_hash": assert merge_hash(password, rand) == crypted_password else: pytest.fail(f"Unknown crypt function {crypt_function}") @pytest.mark.parametrize( ("switch_model", "rand", "crypted_password", "content"), MODEL_PARAMETERS, ) def test_get_login_cookie( switch_model: AutodetectedSwitchModel, rand: str, crypted_password: str, # noqa: ARG001 content: str, ) -> None: """Test get_login_cookie method.""" connector = NetgearSwitchConnector(host="192.168.0.1", password="Password1") connector.turn_on_offline_mode(f"pages/{switch_model.MODEL_NAME}/0") connector.autodetect_model() connector._page_fetcher.check_login_url(connector.switch_model) connector.turn_on_online_mode() key = next( ( k for k, v in connector.switch_model.LOGIN_TEMPLATE["params"].items() if v == "_password_hash" ), None, ) crypt_function = switch_model.CRYPT_FUNCTION if crypt_function == "hex_hmac_md5": data = { "submitId": "pwdLogin", key: hex_hmac_md5(connector._password), "submitEnd": "", } elif crypt_function == "merge_hash": data = { key: merge_hash(connector._password, rand), } else: pytest.fail(f"Unknown crypt function {crypt_function}") with ( patch("py_netgear_plus.fetcher.requests.request") as mock_request, ): mock_response = Mock() mock_response.status_code = requests.codes.ok mock_response.content = content mock_response.cookies.get.return_value = "cookie_value" mock_request.return_value = mock_response assert connector.get_login_cookie() is True mock_request.assert_called() mock_request.assert_called_with( connector.switch_model.LOGIN_TEMPLATE["method"], connector.switch_model.LOGIN_TEMPLATE["url"].format(ip=connector.host), data=data, allow_redirects=True, timeout=URL_REQUEST_TIMEOUT, ) (cookie_name, cookie_value) = connector.get_cookie() assert cookie_name is not None assert cookie_value == "cookie_value" @pytest.mark.parametrize( ("page", "expected"), [ ("GS108Ev3/0/index.htm", True), ("GS308EP/unauthenticated.html", False), ("GS308EP/0/dashboard.cgi", True), ("GS308EP/0/portStatistics.cgi", True), ("GS308EPP/0/dashboard.cgi", True), ("GS308EPP/0/portStatistics.cgi", True), ("GS316EPP/unauthenticated.html", False), ("GS316EPP/0/dashboard.html", True), ], ) def test_is_authenticated(page: str, expected: bool) -> None: # noqa: FBT001 """Test is_authenticated method.""" connector = NetgearSwitchConnector(host="192.168.0.1", password="XXXXXXXX") response = Mock() response.content = Path(f"pages/{page}").read_text() response.status_code = requests.codes.ok assert connector._page_fetcher._is_authenticated(response) is expected @pytest.mark.parametrize( "switch_model", MODELS_FOR_GET_SWITCH_INFOS, ) def test_get_switch_infos(switch_model: type[AutodetectedSwitchModel]) -> None: """Test initialization of NetgearSwitchConnector.""" with ( patch("py_netgear_plus.time.perf_counter", return_value=0), patch( "py_netgear_plus.NetgearSwitchConnector.fetch_page_from_templates" ) as mock_fetch_page_from_templates, ): page_fetcher = PyTestPageFetcher(switch_model) mock_fetch_page_from_templates.side_effect = page_fetcher.from_file connector = NetgearSwitchConnector(host="192.168.0.1", password="password") with patch("py_netgear_plus.fetcher.requests.request") as mock_request: mock_response = Mock() with page_fetcher.get_path( switch_model.AUTODETECT_TEMPLATES ).open() as file: mock_response.content = file.read() mock_response.status_code = requests.codes.ok mock_request.return_value = mock_response connector.autodetect_model() assert isinstance(connector.switch_model, switch_model) connector._page_fetcher._login_page_response = Mock() with page_fetcher.get_path([switch_model.LOGIN_TEMPLATE]).open() as file: connector._page_fetcher._login_page_response.content = file.read() for sequence in range(2): connector._page_fetcher._login_page_response.status_code = requests.codes.ok switch_data = connector.get_switch_infos() with Path( f"pages/{switch_model.MODEL_NAME}/{sequence}/switch_infos.json" ).open() as file: validation_data = json.loads(file.read()) assert switch_data == validation_data page_fetcher.next_sequence() @pytest.mark.parametrize( "switch_model", PORT_SWITCH_MODELS, ) def test_turn_on_and_off_port(switch_model: type[AutodetectedSwitchModel]) -> None: """Test turning on/off a regular port.""" with ( patch( "py_netgear_plus.NetgearSwitchConnector.fetch_page_from_templates" ) as mock_fetch_page_from_templates, ): page_fetcher = PyTestPageFetcher(switch_model) mock_fetch_page_from_templates.side_effect = page_fetcher.from_file connector = NetgearSwitchConnector(host="192.168.0.1", password="password") with patch("py_netgear_plus.fetcher.requests.request") as mock_request: mock_response = Mock() with page_fetcher.get_path( switch_model.AUTODETECT_TEMPLATES ).open() as file: mock_response.content = file.read() mock_response.status_code = requests.codes.ok mock_request.return_value = mock_response connector.autodetect_model() assert isinstance(connector.switch_model, switch_model) connector._client_hash = "client_hash" connector._gambit = "gambit" connector.set_cookie("cookie_name", "cookie_value") response = Mock() response.status_code = requests.codes.ok response.content = b"SUCCESS" with patch( "py_netgear_plus.fetcher.requests.request", return_value=response, ) as mock_request: cookies = requests.cookies.RequestsCookieJar() cookies.set( str(connector.get_cookie()[0]), str(connector.get_cookie()[1]), domain=connector.host, path="/", ) mock_request.return_value = response for state in ["on", "off"]: port = 1 data = connector.switch_model.get_switch_port_data(port, state) # Mocking get_switch_infos because switch_port calls it with patch( "py_netgear_plus.NetgearSwitchConnector.get_switch_infos", return_value={ f"port_{port}_description": "Test", f"port_{port}_flow_control": "enable", }, ): assert connector.switch_port(port, state) is True if state == "on": assert connector.turn_on_port(port) is True else: assert connector.turn_off_port(port) is True mock_request.assert_called() # data will be updated by set_data_from_template inside switch_port # but we can check if it was called with correct url and method expected_data = data.copy() expected_data["DESCRIPTION"] = "Test" expected_data["FLOW_CONTROL"] = 1 if connector._client_hash: expected_data["hash"] = connector._client_hash mock_request.assert_called_with( connector.switch_model.SWITCH_PORT_TEMPLATES[0]["method"], connector.switch_model.SWITCH_PORT_TEMPLATES[0]["url"].format( ip=connector.host ), data=expected_data, cookies=cookies, timeout=URL_REQUEST_TIMEOUT, allow_redirects=False, ) @pytest.mark.parametrize( "switch_model", PORT_SWITCH_MODELS, ) def test_switch_port_uses_model_defaults_when_optional_fields_missing( switch_model: type[AutodetectedSwitchModel], ) -> None: """Test switching a port without description/flow-control data.""" connector = NetgearSwitchConnector(host="192.168.0.1", password="password") connector._set_instance_attributes_by_model(switch_model()) connector._client_hash = "client_hash" connector.set_cookie("cookie_name", "cookie_value") response = Mock() response.status_code = requests.codes.ok response.content = b"SUCCESS" with patch( "py_netgear_plus.fetcher.requests.request", return_value=response, ) as mock_request: cookies = requests.cookies.RequestsCookieJar() cookies.set( str(connector.get_cookie()[0]), str(connector.get_cookie()[1]), domain=connector.host, path="/", ) port = 1 with patch( "py_netgear_plus.NetgearSwitchConnector.get_switch_infos", return_value={}, ): assert connector.switch_port(port, "off") is True expected_data = connector.switch_model.get_switch_port_data(port, "off").copy() expected_data["hash"] = connector._client_hash mock_request.assert_called_with( connector.switch_model.SWITCH_PORT_TEMPLATES[0]["method"], connector.switch_model.SWITCH_PORT_TEMPLATES[0]["url"].format( ip=connector.host ), data=expected_data, cookies=cookies, timeout=URL_REQUEST_TIMEOUT, allow_redirects=False, ) @pytest.mark.parametrize( "switch_model", PORT_SWITCH_MODELS, ) def test_switch_port_autodetects_before_validating_port_range( switch_model: type[AutodetectedSwitchModel], ) -> None: """Test switch_port performs lazy autodetection.""" connector = NetgearSwitchConnector(host="192.168.0.1", password="password") def _autodetect() -> type[AutodetectedSwitchModel]: connector._set_instance_attributes_by_model(switch_model()) return switch_model with patch.object(connector, "autodetect_model", side_effect=_autodetect): connector._client_hash = "client_hash" connector.set_cookie("cookie_name", "cookie_value") response = Mock() response.status_code = requests.codes.ok response.content = b"SUCCESS" with ( patch( "py_netgear_plus.fetcher.requests.request", return_value=response, ), patch( "py_netgear_plus.NetgearSwitchConnector.get_switch_infos", return_value={}, ), ): assert connector.turn_off_port(1) is True @pytest.mark.parametrize( "switch_model", PORT_SWITCH_MODELS, ) def test_switch_port_accepts_pending_apply_page( switch_model: type[AutodetectedSwitchModel], ) -> None: """Test switching a port when the switch replies with a wait page.""" connector = NetgearSwitchConnector(host="192.168.0.1", password="password") connector._set_instance_attributes_by_model(switch_model()) connector._client_hash = "client_hash" connector.set_cookie("cookie_name", "cookie_value") response = Mock() response.status_code = requests.codes.ok response.content = b""" Please wait... """ with ( patch( "py_netgear_plus.fetcher.requests.request", return_value=response, ), patch("py_netgear_plus.time.sleep") as mock_sleep, patch( "py_netgear_plus.NetgearSwitchConnector.get_switch_infos", return_value={}, ), ): assert connector.turn_off_port(1) is True mock_sleep.assert_called_with(4.0) assert connector._client_hash == "4554" @pytest.mark.parametrize( "switch_model", TEST_MODELS, ) def test_turn_on_and_off_poe_port(switch_model: type[AutodetectedSwitchModel]) -> None: """Test turning on/off power on a PoE port.""" with ( patch( "py_netgear_plus.NetgearSwitchConnector.fetch_page_from_templates" ) as mock_fetch_page_from_templates, ): page_fetcher = PyTestPageFetcher(switch_model) mock_fetch_page_from_templates.side_effect = page_fetcher.from_file connector = NetgearSwitchConnector(host="192.168.0.1", password="password") with patch("py_netgear_plus.fetcher.requests.request") as mock_request: mock_response = Mock() with page_fetcher.get_path( switch_model.AUTODETECT_TEMPLATES ).open() as file: mock_response.content = file.read() mock_response.status_code = requests.codes.ok mock_request.return_value = mock_response connector.autodetect_model() assert isinstance(connector.switch_model, switch_model) assert isinstance(connector.switch_model.POE_PORTS, list) if len(connector.switch_model.POE_PORTS) == 0: pytest.skip(f"Model {switch_model.MODEL_NAME} has no PoE ports.") connector._client_hash = "client_hash" connector._gambit = "gambit" connector.set_cookie("cookie_name", "cookie_value") response = BaseResponse() response.status_code = requests.codes.ok response.content = b"SUCCESS" with patch( "py_netgear_plus.fetcher.requests.request", return_value=response, ) as mock_request: cookies = requests.cookies.RequestsCookieJar() cookies.set( str(connector.get_cookie()[0]), str(connector.get_cookie()[1]), domain=connector.host, path="/", ) mock_request.return_value = response for state in ["on", "off"]: poe_port = connector.switch_model.POE_PORTS[0] data = connector.switch_model.get_switch_poe_port_data(poe_port, state) connector._page_fetcher.set_data_from_template( connector.switch_model.SWITCH_POE_PORT_TEMPLATES[0], connector, data ) connector.switch_poe_port(poe_port, state) mock_request.assert_called() mock_request.assert_called_with( connector.switch_model.SWITCH_POE_PORT_TEMPLATES[0]["method"], connector.switch_model.SWITCH_POE_PORT_TEMPLATES[0]["url"].format( ip=connector.host ), data=data, cookies=cookies, timeout=URL_REQUEST_TIMEOUT, allow_redirects=False, ) @pytest.mark.parametrize( ("port_suffix", "expected_cookie_port"), [("", None), (":80", "80"), (":1337", "1337")], ) def test_non_standard_tcp_ports(port_suffix: str, expected_cookie_port: int) -> None: """Test whether cookie port and domain are split correctly.""" response = BaseResponse() response.status_code = requests.codes.ok response.content = b"SUCCESS" with patch( "py_netgear_plus.fetcher.requests.request", return_value=response, ) as mock_request: mock_request.return_value = response host_portion = "192.168.0.1" concatenated = f"{host_portion}{port_suffix}" connector = NetgearSwitchConnector(host=concatenated, password="password") connector.set_cookie("demo", "demo") connector._page_fetcher.request("get", concatenated) mock_request.assert_called_once() assert "cookies" in mock_request.call_args.kwargs cookies = list(mock_request.call_args.kwargs["cookies"]) assert len(cookies) == 1 only_cookie: Cookie = cookies.pop() assert only_cookie.port == expected_cookie_port assert only_cookie.domain == host_portion @pytest.mark.parametrize( ("switch_model", "status_code", "has_content"), MODELS_FOR_REBOOT, ) def test_reboot( switch_model: type[AutodetectedSwitchModel], status_code: int, has_content: bool, # noqa: FBT001 ) -> None: """Test switch reboot.""" if not switch_model.SWITCH_REBOOT_TEMPLATES: pytest.skip(f"Model {switch_model.MODEL_NAME} does not support reboot.") assert switch_model.SWITCH_REBOOT_TEMPLATES with ( patch( "py_netgear_plus.NetgearSwitchConnector.fetch_page_from_templates" ) as mock_fetch_page_from_templates, ): page_fetcher = PyTestPageFetcher(switch_model) mock_fetch_page_from_templates.side_effect = page_fetcher.from_file connector = NetgearSwitchConnector(host="192.168.0.1", password="password") with patch("py_netgear_plus.fetcher.requests.request") as mock_request: mock_response = Mock() with page_fetcher.get_path( switch_model.AUTODETECT_TEMPLATES ).open() as file: mock_response.content = file.read() mock_response.status_code = requests.codes.ok mock_request.return_value = mock_response connector.autodetect_model() assert isinstance(connector.switch_model, switch_model) connector._client_hash = "client_hash" connector._gambit = "gambit" connector.set_cookie("cookie_name", "cookie_value") response = Mock() response.status_code = status_code # some switches don't return any content on a reboot, thus # we need to have the ability to not load a page if has_content: with page_fetcher.get_path( switch_model.SWITCH_REBOOT_TEMPLATES ).open() as file: response.content = file.read() else: response.content = None with patch( "py_netgear_plus.fetcher.requests.request", return_value=response, ) as mock_request: cookies = requests.cookies.RequestsCookieJar() cookies.set( str(connector.get_cookie()[0]), str(connector.get_cookie()[1]), domain=connector.host, path="/", ) mock_request.return_value = response data = {} connector._page_fetcher.set_data_from_template( connector.switch_model.SWITCH_REBOOT_TEMPLATES[0], connector, data ) assert connector.reboot() is True mock_request.assert_called() mock_request.assert_called_with( connector.switch_model.SWITCH_REBOOT_TEMPLATES[0]["method"], connector.switch_model.SWITCH_REBOOT_TEMPLATES[0]["url"].format( ip=connector.host ), data=data, cookies=cookies, timeout=URL_REQUEST_TIMEOUT, allow_redirects=False, ) class JsonApiTestHelper: """Helper for JSON REST API switch tests (MS3xx series).""" def __init__(self, model_name: str) -> None: """Initialize the JSON API test helper.""" self.data_dir = Path(f"pages/{model_name}") self._sequence = 0 def next_sequence(self) -> int: """Get the next sequence number.""" self._sequence += 1 return self._sequence @staticmethod def make_json_response(filepath: Path) -> Mock: """Create a mock response from a JSON file.""" resp = Mock() resp.status_code = requests.codes.ok content = filepath.read_bytes() resp.content = content resp.json.return_value = json.loads(content) return resp def mock_json_request(self, method: str, url: str, **kwargs: dict) -> Mock: # noqa: ARG002 """Mock json_request based on URL.""" if "/api/system/status" in url: return self.make_json_response(self.data_dir / "system_status.json") if "/api/system/login" in url: return self.make_json_response(self.data_dir / "login.json") if "/api/login_session" in url: return self.make_json_response(self.data_dir / "login_session.json") if "/api/ports/statistics" in url: return self.make_json_response( self.data_dir / str(self._sequence) / "ports_statistics.json" ) if "/api/ports" in url: return self.make_json_response( self.data_dir / str(self._sequence) / "ports.json" ) resp = Mock() resp.status_code = requests.codes.not_found return resp JSON_API_MODELS = [ (MS305E, 5), (MS308E, 8), ] @pytest.mark.parametrize( ("switch_model", "expected_ports"), JSON_API_MODELS, ) def test_json_api_autodetect_model( switch_model: type[AutodetectedSwitchModel], expected_ports: int, ) -> None: """Test autodetect_model for JSON REST API switches.""" helper = JsonApiTestHelper(switch_model.MODEL_NAME) connector = NetgearSwitchConnector(host="192.168.0.1", password="password") with patch.object( connector._page_fetcher, "json_request", side_effect=helper.mock_json_request ): connector.autodetect_model() assert isinstance(connector.switch_model, switch_model) assert connector.switch_model.MODEL_NAME == switch_model.MODEL_NAME assert connector.ports == expected_ports @pytest.mark.parametrize( ("switch_model", "expected_ports"), JSON_API_MODELS, ) def test_json_api_get_login_cookie( switch_model: type[AutodetectedSwitchModel], expected_ports: int, # noqa: ARG001 ) -> None: """Test get_login_cookie for JSON REST API switches.""" helper = JsonApiTestHelper(switch_model.MODEL_NAME) connector = NetgearSwitchConnector(host="192.168.0.1", password="password") with patch.object( connector._page_fetcher, "json_request", side_effect=helper.mock_json_request ): connector.autodetect_model() assert connector.get_login_cookie() is True assert connector._page_fetcher.has_bearer_token() is True # Second call should return True without re-login assert connector.get_login_cookie() is True @pytest.mark.parametrize( ("switch_model", "expected_ports"), JSON_API_MODELS, ) def test_json_api_delete_login_cookie( switch_model: type[AutodetectedSwitchModel], expected_ports: int, # noqa: ARG001 ) -> None: """Test delete_login_cookie for JSON REST API switches.""" helper = JsonApiTestHelper(switch_model.MODEL_NAME) connector = NetgearSwitchConnector(host="192.168.0.1", password="password") with patch.object( connector._page_fetcher, "json_request", side_effect=helper.mock_json_request ): connector.autodetect_model() connector.get_login_cookie() assert connector._page_fetcher.has_bearer_token() is True connector.delete_login_cookie() assert connector._page_fetcher.has_bearer_token() is False @pytest.mark.parametrize( ("switch_model", "expected_ports"), JSON_API_MODELS, ) def test_json_api_get_unique_id( switch_model: type[AutodetectedSwitchModel], expected_ports: int, # noqa: ARG001 ) -> None: """Test get_unique_id for JSON REST API switches.""" connector = NetgearSwitchConnector(host="192.168.0.1", password="password") connector.switch_model = switch_model expected = f"{switch_model.MODEL_NAME.lower()}_192_168_0_1" assert connector.get_unique_id() == expected @pytest.mark.parametrize( ("switch_model", "expected_ports"), JSON_API_MODELS, ) def test_json_api_get_switch_infos( switch_model: type[AutodetectedSwitchModel], expected_ports: int, # noqa: ARG001 ) -> None: """Test get_switch_infos for JSON REST API switches.""" helper = JsonApiTestHelper(switch_model.MODEL_NAME) with patch("py_netgear_plus.time.perf_counter", return_value=0): connector = NetgearSwitchConnector(host="192.168.0.1", password="password") with patch.object( connector._page_fetcher, "json_request", side_effect=helper.mock_json_request, ): connector.autodetect_model() connector.get_login_cookie() for sequence in range(2): with patch.object( connector._page_fetcher, "json_request", side_effect=helper.mock_json_request, ): switch_data = connector.get_switch_infos() with Path( f"pages/{switch_model.MODEL_NAME}/{sequence}/switch_infos.json" ).open() as file: validation_data = json.loads(file.read()) assert switch_data == validation_data helper.next_sequence() if __name__ == "__main__": pytest.main()