docs
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" /> <title>NetSec (Network Security) — NetSec documentation</title> <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/classic.css" /> <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script> <script src="_static/jquery.js"></script> <script src="_static/underscore.js"></script> <script src="_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="_static/doctools.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="prev" title="Welcome to NetSec’s documentation!" href="index.html" /> </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="index.html" title="Welcome to NetSec’s documentation!" accesskey="P">previous</a> |</li> <li class="nav-item nav-item-0"><a href="index.html">NetSec documentation</a> »</li> <li class="nav-item nav-item-this"><a href="">NetSec (Network Security)</a></li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <p><strong>Platform Supported</strong></p> <p><img alt="Generic badge" src="https://img.shields.io/badge/Platform-Linux%7CMacOS%7CWindows-1f425f.svg" /></p> <p><img alt="Python" src="https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue" /></p> <p><strong>Deployments</strong></p> <p><a class="reference external" href="https://github.com/thevickypedia/NetSec/actions/workflows/python-publish.yml"><img alt="pypi" src="https://github.com/thevickypedia/NetSec/actions/workflows/python-publish.yml/badge.svg" /></a> <a class="reference external" href="https://github.com/thevickypedia/NetSec/actions/workflows/pages/pages-build-deployment"><img alt="pages-build-deployment" src="https://github.com/thevickypedia/NetSec/actions/workflows/pages/pages-build-deployment/badge.svg" /></a></p> <p><a class="reference external" href="https://pypi.org/project/NetSec/#files"><img alt="Pypi-format" src="https://img.shields.io/pypi/format/NetSec" /></a> <a class="reference external" href="https://pypi.org/project/NetSec"><img alt="Pypi-status" src="https://img.shields.io/pypi/status/NetSec" /></a></p> <section id="netsec-network-security"> <h1>NetSec (Network Security)<a class="headerlink" href="#netsec-network-security" title="Permalink to this heading">¶</a></h1> <p>NetSec is a tool to analyze devices connecting to the router and alert accordingly when a new device is connected.</p> <p>This app can display and store intruders’ IP address, MAC address, and Block the device.</p> <blockquote> <div><p>Blocking device feature is currently available only for <code class="docutils literal notranslate"><span class="pre">Netgear</span></code> router users.</p> </div></blockquote> <section id="kick-off"> <h2>Kick off<a class="headerlink" href="#kick-off" title="Permalink to this heading">¶</a></h2> <p><strong>Install</strong></p> <div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>python3<span class="w"> </span>-m<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>NetSec </pre></div> </div> <p><strong>Initiate</strong></p> <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">netsec</span> <span class="kn">import</span> <span class="n">network_monitor</span><span class="p">,</span> <span class="n">SupportedModules</span> <span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">'__main__'</span><span class="p">:</span> <span class="c1"># SupportedModules.att # for AT&T users</span> <span class="c1"># SupportedModules.netgear # for any network using Netgear router</span> <span class="n">network_monitor</span><span class="p">(</span><span class="n">module</span><span class="o">=</span><span class="n">SupportedModules</span><span class="o">.</span><span class="n">att</span><span class="p">,</span> <span class="n">init</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> <span class="c1"># Create snapshot</span> <span class="n">network_monitor</span><span class="p">(</span><span class="n">module</span><span class="o">=</span><span class="n">SupportedModules</span><span class="o">.</span><span class="n">att</span><span class="p">,</span> <span class="n">init</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> <span class="c1"># Scan for threats and alert</span> </pre></div> </div> <blockquote> <div><p>Notifications will not repeat within an hour.</p> </div></blockquote> </section> <section id="env-variables"> <h2>ENV Variables<a class="headerlink" href="#env-variables" title="Permalink to this heading">¶</a></h2> <p>Environment variables are loaded from a <code class="docutils literal notranslate"><span class="pre">.env</span></code> file.</p> <ul class="simple"> <li><p><strong>ROUTER_PASS</strong> - Router password. <em>Only for <code class="docutils literal notranslate"><span class="pre">Netgear</span></code> users.</em></p></li> <li><p><strong>GMAIL_USER</strong> - Gmail account username to send and email.</p></li> <li><p><strong>GMAIL_PASS</strong> - Gmail account password to send and email.</p></li> <li><p><strong>RECIPIENT</strong> - Email address to which <code class="docutils literal notranslate"><span class="pre">NetSec</span></code> alerts should be sent.</p></li> <li><p><strong>PHONE</strong> - To send an SMS notification - Example: <code class="docutils literal notranslate"><span class="pre">1234567890</span></code></p></li> </ul> </section> <section id="coding-standards"> <h2>Coding Standards<a class="headerlink" href="#coding-standards" title="Permalink to this heading">¶</a></h2> <p>Docstring format: <a class="reference external" href="https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings"><code class="docutils literal notranslate"><span class="pre">Google</span></code></a> <br> Styling conventions: <a class="reference external" href="https://www.python.org/dev/peps/pep-0008/"><code class="docutils literal notranslate"><span class="pre">PEP</span> <span class="pre">8</span></code></a> <br> Clean code with pre-commit hooks: <a class="reference external" href="https://flake8.pycqa.org/en/latest/"><code class="docutils literal notranslate"><span class="pre">flake8</span></code></a> and <a class="reference external" href="https://pycqa.github.io/isort/"><code class="docutils literal notranslate"><span class="pre">isort</span></code></a></p> </section> <section id="release-notes"> <h2><a class="reference external" href="https://github.com/thevickypedia/NetSec/blob/master/release_notes.rst">Release Notes</a><a class="headerlink" href="#release-notes" title="Permalink to this heading">¶</a></h2> <p><strong>Requirement</strong></p> <div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>-m<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>gitverse </pre></div> </div> <p><strong>Usage</strong></p> <div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>gitverse-release<span class="w"> </span>reverse<span class="w"> </span>-f<span class="w"> </span>release_notes.rst<span class="w"> </span>-t<span class="w"> </span><span class="s1">'Release Notes'</span> </pre></div> </div> </section> <section id="linting"> <h2>Linting<a class="headerlink" href="#linting" title="Permalink to this heading">¶</a></h2> <p><code class="docutils literal notranslate"><span class="pre">PreCommit</span></code> will ensure linting, and the doc creation are run on every commit.</p> <p><strong>Requirement</strong></p> <div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span><span class="nv">sphinx</span><span class="o">==</span><span class="m">5</span>.1.1<span class="w"> </span>pre-commit<span class="w"> </span>recommonmark </pre></div> </div> <p><strong>Usage</strong></p> <div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>pre-commit<span class="w"> </span>run<span class="w"> </span>--all-files </pre></div> </div> </section> <section id="pypi-package"> <h2>Pypi Package<a class="headerlink" href="#pypi-package" title="Permalink to this heading">¶</a></h2> <p><a class="reference external" href="https://packaging.python.org/tutorials/packaging-projects/"><img alt="pypi-module" src="https://img.shields.io/badge/Software%20Repository-pypi-1f425f.svg" /></a></p> <p><a class="reference external" href="https://pypi.org/project/NetSec/">https://pypi.org/project/NetSec/</a></p> </section> <section id="runbook"> <h2>Runbook<a class="headerlink" href="#runbook" title="Permalink to this heading">¶</a></h2> <p><a class="reference external" href="https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html"><img alt="made-with-sphinx-doc" src="https://img.shields.io/badge/Code%20Docs-Sphinx-1f425f.svg" /></a></p> <p><a class="reference external" href="https://thevickypedia.github.io/NetSec/">https://thevickypedia.github.io/NetSec/</a></p> </section> <section id="license-copyright"> <h2>License & copyright<a class="headerlink" href="#license-copyright" title="Permalink to this heading">¶</a></h2> <p>© Vignesh Rao, NetSec</p> <p>Licensed under the <a class="reference external" href="https://github.com/thevickypedia/NetSec/blob/main/LICENSE">MIT License</a></p> </section> </section> <div class="clearer"></div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <div> <h3><a href="index.html">Table of Contents</a></h3> <ul> <li><a class="reference internal" href="#">NetSec (Network Security)</a><ul> <li><a class="reference internal" href="#kick-off">Kick off</a></li> <li><a class="reference internal" href="#env-variables">ENV Variables</a></li> <li><a class="reference internal" href="#coding-standards">Coding Standards</a></li> <li><a class="reference internal" href="#release-notes">Release Notes</a></li> <li><a class="reference internal" href="#linting">Linting</a></li> <li><a class="reference internal" href="#pypi-package">Pypi Package</a></li> <li><a class="reference internal" href="#runbook">Runbook</a></li> <li><a class="reference internal" href="#license-copyright">License & copyright</a></li> </ul> </li> </ul> </div> <div> <h4>Previous topic</h4> <p class="topless"><a href="index.html" title="previous chapter">Welcome to NetSec’s documentation!</a></p> </div> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/README.md.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> <input type="submit" value="Go" /> </form> </div> </div> <script>document.getElementById('searchbox').style.display = "block"</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="index.html" title="Welcome to NetSec’s documentation!" >previous</a> |</li> <li class="nav-item nav-item-0"><a href="index.html">NetSec documentation</a> »</li> <li class="nav-item nav-item-this"><a href="">NetSec (Network Security)</a></li> </ul> </div> <div class="footer" role="contentinfo"> © Copyright 2021, Vignesh Sivanandha Rao. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.1.1. </div> </body> </html>