https://github.com/thevickypedia/NetSec
Python module to analyze devices connected to the router and alert accordingly.
https://github.com/thevickypedia/NetSec
allowlist denylist firewall netgear netsec network-security router-monitor wifi
Last synced: 3 months ago
JSON representation
Python module to analyze devices connected to the router and alert accordingly.
- Host: GitHub
- URL: https://github.com/thevickypedia/NetSec
- Owner: thevickypedia
- License: mit
- Created: 2021-08-23T20:16:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-16T03:54:12.000Z (over 1 year ago)
- Last Synced: 2024-12-01T21:11:59.493Z (3 months ago)
- Topics: allowlist, denylist, firewall, netgear, netsec, network-security, router-monitor, wifi
- Language: Python
- Homepage: https://thevickypedia.github.io/netscan/
- Size: 410 KB
- Stars: 19
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - thevickypedia/NetSec - Python module to analyze devices connected to the router and alert accordingly. (Python)
README
**Platform Supported**


**Deployments**
[](https://github.com/thevickypedia/NetSec/actions/workflows/python-publish.yml)
[](https://github.com/thevickypedia/NetSec/actions/workflows/pages/pages-build-deployment)[](https://pypi.org/project/NetSec/#files)
[](https://pypi.org/project/NetSec)# NetSec (Network Security)
NetSec is a tool to analyze devices connecting to the router and alert accordingly when a new device is connected.This app can display and store intruders' IP address, MAC address, and Block the device.
> Blocking device feature is currently available only for `Netgear` router users.
## Kick off
**Install**
```shell
python3 -m pip install NetSec
```**Initiate**
```python
from netsec import network_monitor, SupportedModulesif __name__ == '__main__':
# SupportedModules.att # for AT&T users
# SupportedModules.netgear # for any network using Netgear router
network_monitor(module=SupportedModules.att, init=True) # Create snapshot
network_monitor(module=SupportedModules.att, init=False) # Scan for threats and alert
```> Notifications will not repeat within an hour.
## ENV Variables
Environment variables are loaded from a `.env` file.- **ROUTER_PASS** - Router password. _Only for `Netgear` users._
- **GMAIL_USER** - Gmail account username to send and email.
- **GMAIL_PASS** - Gmail account password to send and email.
- **RECIPIENT** - Email address to which `NetSec` alerts should be sent.
- **PHONE** - To send an SMS notification - Example: `1234567890`## Coding Standards
Docstring format: [`Google`](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings)
Styling conventions: [`PEP 8`](https://www.python.org/dev/peps/pep-0008/)
Clean code with pre-commit hooks: [`flake8`](https://flake8.pycqa.org/en/latest/) and
[`isort`](https://pycqa.github.io/isort/)## [Release Notes](https://github.com/thevickypedia/NetSec/blob/master/release_notes.rst)
**Requirement**
```shell
python -m pip install gitverse
```**Usage**
```shell
gitverse-release reverse -f release_notes.rst -t 'Release Notes'
```## Linting
`PreCommit` will ensure linting, and the doc creation are run on every commit.**Requirement**
```shell
pip install sphinx==5.1.1 pre-commit recommonmark
```**Usage**
```shell
pre-commit run --all-files
```## Pypi Package
[](https://packaging.python.org/tutorials/packaging-projects/)[https://pypi.org/project/NetSec/](https://pypi.org/project/NetSec/)
## Runbook
[](https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html)[https://thevickypedia.github.io/NetSec/](https://thevickypedia.github.io/NetSec/)
## License & copyright
© Vignesh Rao, NetSec
Licensed under the [MIT License](https://github.com/thevickypedia/NetSec/blob/main/LICENSE)