Giter Club home page Giter Club logo

nmap-log-parse's Introduction

nmap-log-parse

Logs which devices are in your local network and draws graphs

Screenshot:

Screenshot

Setup

  1. Clone this repository and checkout the precompiled branch

    git clone https://github.com/phiresky/nmap-log-parse
    cd nmap-log-parse
    git checkout gh-pages
  2. Add this line to your root crontab on your raspberry pi (or other device that is always on):

    */10 * * * * nmap -sn '192.168.178.*' -oX - >> /var/www/nmap-logs/$(date -I).xml

    You can edit the root crontab by running something like sudo EDITOR=nano crontab -e

    Replace '192.168.178.*' with your network range and /var/www/nmap-logs/ with the target location.

    This takes about ~10MB of storage per month.

    The above command must be put into the root crontab! Otherwise, nmap can't read mac-addresses and the output will be wrong.

  3. create a config.json file in the same folder as the built index.html is in (dist), overriding any of the values in the default config.

    for example:

    config.json

    {
    	"logFilesPath": "/nmap/logs/",
    	"staticLogFiles": ["logs/oldlogs"],
    	"deviceNames": {
    		"AB:CD:EF:01:23": "John's PC"
    	}
    }

    Use staticLogFiles only if you have an undated log file from an older version.

    The logFilesPath is either relative to the root dirctory of the server (if starting with /) or the built index.html file (otherwise)

  4. Wait more than an hour. Make sure the first log file (in the form 2019-06-29.xml) exists and contains XML documents.

  5. Open index.html in a browser. Open it from a server (like a minimal python3 -m http.server) instead of from the filesystem because of Cross-Domain security.

Contributing

Made with React, the Dexie.js database and Highcharts.

Get the dependencies using yarn install, then run yarn build to build the JS into the /dist directory. For development, run yarn dev to start the dev server.

This project is written in TypeScript, which is basically JavaScript (ES6), but strongly typed. I can recommend Visual Studio Code (on linux) for IntelliSense and Refactoring support.

If you have ideas to make this better please open an issue, or even better, send a pull request.

nmap-log-parse's People

Contributors

nakami avatar phiresky avatar

Watchers

 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.