Coder Social home page Coder Social logo

khill-fbmc / nmap-pycli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from josevnz/home_nmap

0.0 0.0 0.0 3.63 MB

Extending NMAP using Python by creating a simpler CLI and a Web-service

License: Creative Commons Zero v1.0 Universal

Python 51.46% HTML 48.54%

nmap-pycli's Introduction

home_nmap

Home NMAP is a small collection of scripts to make it easier to NMAP to identify services on your home network (see scripts directory):

  • nmap_scan_rpt.py: Will parse the results of a nmap run with -oX and correlate the results with advisories from NDIS
  • home_scan.py: Will scan your home network automatically and show services, correlated with advisories from NDIS.
  • generate_diagrams.py: A script used to generate the diagrams on the tutorial directory.

The Nmap scanner can be run as a web service (after installation):

uvicorn home_nmap.main:app --host 0.0.0.0 --port 8000 --reload

And on a different terminal (example testing with curl):

curl --fail --silent http://127.0.0.1:8000/docs#

To see what is available

Installation

Developer mode

python3 -m venv ~/virtualenv/home_nmap/
. ~/virtualenv/home_nmap/bin/activate
python setup.py develop --uninstall

Wheel

python3 -m venv ~/virtualenv/home_nmap/
. ~/virtualenv/home_nmap/bin/activate
python setup.py bdist_wheel
pip install dist/home_nmap-0.0.1-py3-none-any.whl

Once installed you can run any of the following scripts:

  • generate_diagrams.py
  • home_nmap_confgen.py
  • home_scan.py
  • nmap_scan_rpt.py

Running the web application

If you have your self-signed certificates then you can run the web application like this (see the included tutorial):

uvicorn home_nmap.main:app \
--host $HOSTNAME \
--port 8443 \
--ssl-keyfile=/etc/pki/ca-trust/source/anchors/$host-server-key.pem \
--ssl-certfile=/etc/pki/ca-trust/source/anchors/$host-server.pem

Or the alternative:

uvicorn home_nmap.main:app \
--host $HOSTNAME \
--port 8000

Tutorial

You can read the tutorial/README.md file from your terminal like this (without installing all the software):

python3 -m venv ~/virtualenv/home_nmap
. ~/virtualenv/home_nmap/bin/activate
python -m pip install --upgrade pip rich
python -m rich.markdown tutorial/README.md

nmap-pycli's People

Contributors

josevnz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.