Giter VIP home page Giter VIP logo

devzwf / pi.alert Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jokob-sk/netalertx

0.0 0.0 0.0 170.58 MB

๐Ÿ’ป๐Ÿ” WIFI / LAN intruder detector. Check the devices connected and alert you with unknown devices. It also warns of the disconnection of "always connected" devices

License: GNU General Public License v3.0

Shell 1.79% JavaScript 15.01% Python 4.40% PHP 11.26% CSS 6.13% Hack 0.09% HTML 51.15% Dockerfile 0.05% Less 10.12%

pi.alert's Introduction

Pi.Alert

WIFI / LAN intruder detector.

Scan the devices connected to your WIFI / LAN and alert you the connection of unknown devices. It also warns if a "always connected" devices disconnects.

Main screen (Apologies for my English and my limited knowledge of Python, php and JavaScript)

Docker image ๐Ÿณ

Docker GitHub Committed Docker Size Docker Pulls Docker Pushed

๐Ÿฅ‡ Pi.Alert credit goes to pucherot/Pi.Alert
๐Ÿณ Docker Image: jokobsk/Pi.Alert
๐Ÿ“„ Dockerfile
๐Ÿ“š Dockerfile instructions

Dark mode (and much more) within this fork courtesy of leiweibau

How it works

The system continuously scans the network for:

  • New devices
  • New connections (re-connections)
  • Disconnections
  • "Always Connected" devices down
  • Devices IP changes
  • Internet IP address changes

Scan Methods

Up to three scanning methods are used:

  • Method 1: arp-scan. The arp-scan system utility is used to search for devices on the network using arp frames.
  • Method 2: Pi-hole. This method is optional and complementary to method 1. If the Pi-hole DNS server is active, Pi.Alert examines its activity looking for active devices using DNS that have not been detected by method 1.
  • Method 3. dnsmasq. This method is optional and complementary to the previous methods. If the DHCP server dnsmasq is active, Pi.Alert examines the DHCP leases (addresses assigned) to find active devices that were not discovered by the other methods.

Components

The system consists of two parts:

Back

In charge of:

  • Scan the network searching connected devices using the scanning methods described
  • Store the information in the DB
  • Report the changes detected by e-mail and/or other services (Apprise, Pushsafer, NTFY, Webhooks (sample JSON))
  • Optional speedtest for Device "Internet"
  • DB cleanup tasks via cron
  • a pialert-cli that helps to configure login and password
Report 1 Report 2

Front

There is a configurable login to prevent unauthorized use.

  • Set PIALERT_WEB_PROTECTION = True in pialert.conf to enable. The default password is 123456. To change password run /home/pi/pialert/back/pialert-cli

A web frontend that allows:

  • Manage the devices inventory and the characteristics
  • Display in a visual way all the information collected by the back
    • Sessions
    • Connected devices
    • Favorites
    • Events
    • Presence
    • Concurrent devices
    • Down alerts
    • IP's
    • Manual Nmap scans
    • Optional speedtest for Device "Internet"
    • Simple Network relationship display
  • Maintenance tasks and Settings like:
    • Status Infos (active scans, database size, backup counter)
    • Theme Selection (blue, red, green, yellow, black, purple)
    • Language Selection (english, german, spanish)
    • Light/Dark-Mode Switch
    • Pause arp-scan
    • DB maintenance tools
    • DB Backup and Restore
    • CSV Export / Import (Experimental)
  • Help/FAQ Section
Screen 1 Screen 2
Screen 3 Screen 4
Screen 5 Screen 6

Installation

Initially designed to run on a Raspberry Pi, probably it can run on many other Linux distributions.

โš  Please note, this fork (jokob-sk) is only tested via the docker install method

Instructions for pucherot's original code

  • One-step Automated Install:

    curl -sSL https://github.com/pucherot/Pi.Alert/raw/main/install/pialert_install.sh | bash

Instructions for leiweibau's fork

  • One-step Automated Install:

    curl -sSL https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_install.sh | bash

  • One-step Automated Install without Webserver if another Webserver is already installed. (not recommended):

    curl -sSL https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_install_no_webserver.sh | bash

  • Installation Guide (step by step)

Update

  • One-step Automated Update (pucherot):

    curl -sSL https://github.com/pucherot/Pi.Alert/raw/main/install/pialert_update.sh | bash

  • One-step Automated Update (leiweibau):

    curl -sSL https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh | bash

Uninstall process

Device Management

Other useful info

Powered by:

Product Objetive
Python Programming language for the Back
PHP Programming language for the Front-end
JavaScript Programming language for the Front-end
Bootstrap Front-end framework
Admin.LTE Bootstrap template
FullCalendar Calendar component
Sqlite DB engine
Lighttpd Webserver
arp-scan Scan network using arp commands
Pi.hole DNS Server with Ad-block
dnsmasq DHCP Server
nmap Network Scanner
zip Filecompression Tool
speedtest-cli Python SpeedTest https://github.com/sivel/speedtest-cli

License

GPL 3.0 Read more here

Source of the animated GIF (Loading Animation) https://commons.wikimedia.org/wiki/File:Loading_Animation.gif

Source of the selfhosted Fonts https://github.com/adobe-fonts/source-sans

Contact

[email protected]

Suggestions and comments are welcome

Special thanks ๐Ÿฅ‡

This code is a collaborative body of work, with special thanks to:

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.