From b5d92c86c8da431c012ef59a075d4d84aae8ba72 Mon Sep 17 00:00:00 2001 From: Cassiano Aquino Date: Tue, 8 Oct 2019 22:31:27 +0100 Subject: [PATCH 1/3] enable bettercap ui on manual mode --- builder/pwnagotchi.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index bdb5761..7ab12d2 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -182,6 +182,9 @@ chdir: /tmp/caplets target: install + - name: install bettercap http ui + command: "/usr/bin/bettercap -eval 'caplets.update; ui.update; q'" + - name: create cpuusage script copy: dest: /usr/bin/cpuusage @@ -239,6 +242,26 @@ /usr/local/bin/pwnagotchi fi + - name: create bettercap-launcher script + copy: + dest: /usr/bin/bettercap-launcher + mode: 0755 + content: | + #!/usr/bin/env bash + # blink 10 times to signal ready state + /usr/bin/bootblink 10 & + if ifconfig | grep usb0 | grep RUNNING; then + # if override file exists, go into auto mode + if [ -f /root/.pwnagotchi-auto ]; then + rm /root/.pwnagotchi-auto + /usr/bin/bettercap -no-colors -caplet pwnagotchi-auto + else + /usr/bin/bettercap -no-colors -caplet pwnagotchi-manual + fi + else + /usr/bin/bettercap -no-colors -caplet pwnagotchi-auto + fi + - name: create monstart script copy: dest: /usr/bin/monstart From 0294eeff5f2b0487aa5be31f9f11071d3e9be708 Mon Sep 17 00:00:00 2001 From: Cassiano Aquino Date: Tue, 8 Oct 2019 22:31:27 +0100 Subject: [PATCH 2/3] enable bettercap ui on manual mode --- builder/pwnagotchi.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index f6d1128..003db66 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -182,6 +182,9 @@ chdir: /tmp/caplets target: install + - name: install bettercap http ui + command: "/usr/bin/bettercap -eval 'caplets.update; ui.update; q'" + - name: create cpuusage script copy: dest: /usr/bin/cpuusage @@ -239,6 +242,26 @@ /usr/local/bin/pwnagotchi fi + - name: create bettercap-launcher script + copy: + dest: /usr/bin/bettercap-launcher + mode: 0755 + content: | + #!/usr/bin/env bash + # blink 10 times to signal ready state + /usr/bin/bootblink 10 & + if ifconfig | grep usb0 | grep RUNNING; then + # if override file exists, go into auto mode + if [ -f /root/.pwnagotchi-auto ]; then + rm /root/.pwnagotchi-auto + /usr/bin/bettercap -no-colors -caplet pwnagotchi-auto + else + /usr/bin/bettercap -no-colors -caplet pwnagotchi-manual + fi + else + /usr/bin/bettercap -no-colors -caplet pwnagotchi-auto + fi + - name: create monstart script copy: dest: /usr/bin/monstart From 7be10e76b98c3dc0d9d3a39574dc90ab49644d1b Mon Sep 17 00:00:00 2001 From: Cassiano Aquino Date: Tue, 8 Oct 2019 22:32:51 +0100 Subject: [PATCH 3/3] enable bettercap ui on manual mode --- builder/pwnagotchi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 003db66..9adee94 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -402,7 +402,7 @@ [Service] Type=simple PermissionsStartOnly=true - ExecStart=/usr/bin/bettercap -no-colors -caplet pwnagotchi + ExecStart=/usr/local/bin/bettercap-launcher Restart=always RestartSec=30