From 0c77776ee5cd6c34f1eda0ed27c80c5292ac6c32 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 7 Dec 2021 15:36:02 +0100 Subject: [PATCH 1/5] Update Readme.md --- arpspoof/Readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arpspoof/Readme.md b/arpspoof/Readme.md index 0f0cc15e6..8225212ed 100644 --- a/arpspoof/Readme.md +++ b/arpspoof/Readme.md @@ -17,6 +17,8 @@ _Thanks to everyone having starred my repo! To star it click on the image below, [arpspoof](https://github.com/t0mer/Arpspoof-Docker) adds ability to block internet connection for local network devices This addon is based on the docker image https://hub.docker.com/r/techblog/arpspoof-docker +See all informations here : https://en.techblog.co.il/2021/03/15/home-assistant-cut-internet-connection-using-arpspoof/ + ## Installation The installation of this add-on is pretty straightforward and not different in comparison to installing any other add-on. From 21081441c7fefbdac7c6ed8a2e5db8e70c94be56 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 7 Dec 2021 15:37:45 +0100 Subject: [PATCH 2/5] Update 99-run.sh --- arpspoof/rootfs/scripts/99-run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arpspoof/rootfs/scripts/99-run.sh b/arpspoof/rootfs/scripts/99-run.sh index 58a8ddd23..0a0c77d51 100644 --- a/arpspoof/rootfs/scripts/99-run.sh +++ b/arpspoof/rootfs/scripts/99-run.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bashio +INTERFACE_NAME=$(ip route get 8.8.8.8 | sed -nr 's/.*dev ([^\ ]+).*/\1/p') +bashio::log.blue "INTERFACE_NAME=$INTERFACE_NAME" + bashio::log.info "Starting..." -/usr/bin/python3 /opt/arpspoof/arpspoof.py \ No newline at end of file +/usr/bin/python3 /opt/arpspoof/arpspoof.py From 0569cb412ea83935ef5bfe70ca269059e644dcd0 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 7 Dec 2021 15:38:10 +0100 Subject: [PATCH 3/5] Update config.json --- arpspoof/config.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arpspoof/config.json b/arpspoof/config.json index dbd38e118..fd32f288d 100644 --- a/arpspoof/config.json +++ b/arpspoof/config.json @@ -11,8 +11,7 @@ "host_network": true, "name": "Arpspoof", "options": { - "ROUTER_IP": "yourip", - "INTERFACE_NAME": "interface name" + "ROUTER_IP": "yourip" }, "ports": { "7022/tcp": 7022 @@ -23,7 +22,7 @@ "privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"], "schema": { "ROUTER_IP": "str", - "INTERFACE_NAME": "str" + "INTERFACE_NAME": "str?" }, "slug": "arpspoof", "upstream": "1.0", From 17cbb2f987df66bac60143fc4e33169e41a09f23 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 7 Dec 2021 15:39:28 +0100 Subject: [PATCH 4/5] Update 99-run.sh --- arpspoof/rootfs/scripts/99-run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arpspoof/rootfs/scripts/99-run.sh b/arpspoof/rootfs/scripts/99-run.sh index 0a0c77d51..9011010d1 100644 --- a/arpspoof/rootfs/scripts/99-run.sh +++ b/arpspoof/rootfs/scripts/99-run.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bashio +# Autodefine if not defined +if [ -z INTERFACE_NAME ]; then INTERFACE_NAME=$(ip route get 8.8.8.8 | sed -nr 's/.*dev ([^\ ]+).*/\1/p') -bashio::log.blue "INTERFACE_NAME=$INTERFACE_NAME" +bashio::log.blue "Autodetection : INTERFACE_NAME=$INTERFACE_NAME" +fi bashio::log.info "Starting..." /usr/bin/python3 /opt/arpspoof/arpspoof.py From 3d09c1fc6090478b60f8d8dc1fb74c123e1e95fe Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 7 Dec 2021 15:42:34 +0100 Subject: [PATCH 5/5] Update Readme.md --- arpspoof/Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arpspoof/Readme.md b/arpspoof/Readme.md index 8225212ed..6d0adabdf 100644 --- a/arpspoof/Readme.md +++ b/arpspoof/Readme.md @@ -39,7 +39,7 @@ Webui can be found at . ```yaml ROUTER_IP: 127.0.0.1 #Required Router IP -INTERFACE_NAME: name #Required Interface name, can use this command to get it: ip route get 8.8.8.8 | sed -nr 's/.*dev ([^\ ]+).*/\1/p' +INTERFACE_NAME: name #Required Interface name. Autofilled if empty. ``` ## Support