Crates.io | bernard |
lib.rs | bernard |
version | 0.1.0 |
source | src |
created_at | 2018-09-23 20:39:02.653204 |
updated_at | 2018-11-16 21:30:52.492794 |
description | Presence detection in your network, written in Rust |
homepage | https://github.com/max-wittig/bernard |
repository | https://github.com/max-wittig/bernard.git |
max_upload_size | |
id | 86223 |
size | 17,253 |
Bernard is a Rust tool for presence detection in your home network.
It uses a mapping of MAC addresses to labels to accomplish that. Actually it parses the output of nmap scans, so the nmap tool is required to be installed.
Could be used to setup home automation etc.
Inspired by home assistent and written to learn more about the Rust programming language.
cargo build --release
cargo install bernard
Bernard
USAGE:
bernard [FLAGS] [OPTIONS] --config <config> --network <network>
FLAGS:
-h, --help Prints help information
-q, --quiet Quiet mode
-V, --version Prints version information
-v, --verbose Verbose mode (-v, -vv, -vvvvv, etc)
OPTIONS:
-c, --config <config> Path to config file
-o, --output <metrics_path> Output filepath for metrics file, e.g. /var/www/html/metrics.txt [default:
metrics.txt]
-n, --network <network> CIDR notation of the network you want to scan, e.g. 192.168.178.1/24
labels:
some-label:
- "some-valid-mac"
other-label:
- "valid-mac"
- "another-valid-mac"
# HELP devices Devices with status
# TYPE devices gauge
devices{hostname="HP60BAG4",mac="00:00:00:00:00:00"} 1
devices{hostname="BUD2AA99",mac="00:00:00:00:00:00"} 1
devices{hostname="OnePlus_3",mac="00:00:00:00:00:00"} 1
devices{hostname="amazon-fdsfds",mac="00:00:00:00:00:00"} 1
devices{hostname="some.device",mac="00:00:00:00:00:00"} 1
devices{hostname="otherother-device",mac=""} 1
devices{hostname="raspberrypi",mac="00:00:00:00:00:00"} 1
# HELP label Label with status
# TYPE label gauge
labels{name="some-label"} 1