From c720797834d2a54a310933ae5a4a71afff041be8 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 11:18:23 +0200 Subject: [PATCH 01/34] v2.4.2 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/internet-connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/internet-connection.py b/pwnagotchi/plugins/default/internet-connection.py index f3825875..082c0a7e 100644 --- a/pwnagotchi/plugins/default/internet-connection.py +++ b/pwnagotchi/plugins/default/internet-connection.py @@ -10,7 +10,7 @@ import socket class InternetConnectionPlugin(plugins.Plugin): __author__ = 'adi1708, edited by jayofelony' - __version__ = '1.0.1' + __version__ = '1.1' __license__ = 'GPL3' __description__ = 'A plugin that displays the Internet connection status on the pwnagotchi display.' __name__ = 'InternetConnectionPlugin' From 00d16ff41803d6a106317d32dd52b8598a0a1980 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 11:27:21 +0200 Subject: [PATCH 02/34] version: 2.4.2 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/_version.py b/pwnagotchi/_version.py index 5cd7abf8..cb9dc8a9 100644 --- a/pwnagotchi/_version.py +++ b/pwnagotchi/_version.py @@ -1 +1 @@ -__version__ = '2.4.1' +__version__ = '2.4.2' From c600de932e74bf00831fcf1519f21a5f95b9581a Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 15:48:56 +0200 Subject: [PATCH 03/34] version: 2.4.2 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/bt-tether.py | 6 +++--- pwnagotchi/plugins/default/internet-connection.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pwnagotchi/plugins/default/bt-tether.py b/pwnagotchi/plugins/default/bt-tether.py index a65c603b..67a95a9b 100644 --- a/pwnagotchi/plugins/default/bt-tether.py +++ b/pwnagotchi/plugins/default/bt-tether.py @@ -151,7 +151,6 @@ class BTNap: return None - def is_paired(self): """ Check if already connected @@ -579,8 +578,9 @@ class BTTether(plugins.Plugin): def on_ui_setup(self, ui): with ui._lock: - ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', position=(ui.width() / 2 - 15, 0), - label_font=fonts.Bold, text_font=fonts.Medium)) + ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', + position=(ui.width() / 3 - 15, 0), + label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): ui.set('bluetooth', self.status) diff --git a/pwnagotchi/plugins/default/internet-connection.py b/pwnagotchi/plugins/default/internet-connection.py index 082c0a7e..92045c68 100644 --- a/pwnagotchi/plugins/default/internet-connection.py +++ b/pwnagotchi/plugins/default/internet-connection.py @@ -31,8 +31,8 @@ class InternetConnectionPlugin(plugins.Plugin): with ui._lock: # add a LabeledValue element to the UI with the given label and value # the position and font can also be specified - ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='', value='', - position=(0, 30), label_font=fonts.Small, + ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='WWW', value='-', + position=(0, 30), label_font=fonts.Bold, text_font=fonts.Small)) def on_ui_update(self, ui): @@ -44,10 +44,10 @@ class InternetConnectionPlugin(plugins.Plugin): # Connect to the host - tells us if the host is actually reachable s = socket.create_connection((host, 80), 2) s.close() - ui.set('connection_status', 'connected') + ui.set('connection_status', 'C') except: # if the command failed, it means there is no active Internet connection - ui.set('connection_status', 'disconnected') + ui.set('connection_status', 'D') def on_unload(self, ui): with ui._lock: From e11622ef7ea2daeed3ef60ebecb2513686d4b694 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 15:49:56 +0200 Subject: [PATCH 04/34] version: 2.4.2 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/internet-connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/internet-connection.py b/pwnagotchi/plugins/default/internet-connection.py index 92045c68..ccde13bb 100644 --- a/pwnagotchi/plugins/default/internet-connection.py +++ b/pwnagotchi/plugins/default/internet-connection.py @@ -33,7 +33,7 @@ class InternetConnectionPlugin(plugins.Plugin): # the position and font can also be specified ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='WWW', value='-', position=(0, 30), label_font=fonts.Bold, - text_font=fonts.Small)) + text_font=fonts.Medium)) def on_ui_update(self, ui): # check if there is an active Internet connection From 5784e9f18f23fd5cf7b8b89b84b646990d6c4ab6 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 15:53:06 +0200 Subject: [PATCH 05/34] version: 2.4.2 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/bt-tether.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/bt-tether.py b/pwnagotchi/plugins/default/bt-tether.py index 67a95a9b..b577b678 100644 --- a/pwnagotchi/plugins/default/bt-tether.py +++ b/pwnagotchi/plugins/default/bt-tether.py @@ -579,7 +579,7 @@ class BTTether(plugins.Plugin): def on_ui_setup(self, ui): with ui._lock: ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', - position=(ui.width() / 3 - 15, 0), + position=(ui.width() / 2 + 45, 0), label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): From 893edf6f6e458675f56cd6c524f4980afe060845 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 15:55:54 +0200 Subject: [PATCH 06/34] version: 2.4.2 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/bt-tether.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/bt-tether.py b/pwnagotchi/plugins/default/bt-tether.py index b577b678..02b32034 100644 --- a/pwnagotchi/plugins/default/bt-tether.py +++ b/pwnagotchi/plugins/default/bt-tether.py @@ -579,7 +579,7 @@ class BTTether(plugins.Plugin): def on_ui_setup(self, ui): with ui._lock: ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', - position=(ui.width() / 2 + 45, 0), + position=(ui.width() / 2 + 30, 0), label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): From 07c61c6a7a596358bce172fcc81024fdc97acddc Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 15:59:05 +0200 Subject: [PATCH 07/34] version: 2.4.2 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/internet-connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/internet-connection.py b/pwnagotchi/plugins/default/internet-connection.py index ccde13bb..66995217 100644 --- a/pwnagotchi/plugins/default/internet-connection.py +++ b/pwnagotchi/plugins/default/internet-connection.py @@ -32,7 +32,7 @@ class InternetConnectionPlugin(plugins.Plugin): # add a LabeledValue element to the UI with the given label and value # the position and font can also be specified ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='WWW', value='-', - position=(0, 30), label_font=fonts.Bold, + position=(ui.width() / 2 - 10, 0), label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): From ce1eb4c4f51219e0277006334023c43b24352fde Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 16:07:25 +0200 Subject: [PATCH 08/34] version: 2.4.2 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/defaults.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/defaults.toml b/pwnagotchi/defaults.toml index 297f5bcb..6988ef77 100644 --- a/pwnagotchi/defaults.toml +++ b/pwnagotchi/defaults.toml @@ -40,7 +40,7 @@ main.plugins.pisugar2.enabled = false main.plugins.pisugar2.shutdown = 5 main.plugins.pisugar2.sync_rtc_on_boot = false -main.plugins.internet-connection.enabled = false +main.plugins.internet-connection.enabled = true main.plugins.grid.enabled = true main.plugins.grid.report = true From 86df02416308d103c2f5791948049fd7df31606c Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 16:17:06 +0200 Subject: [PATCH 09/34] version: 2.4.2 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/bt-tether.py | 2 +- pwnagotchi/plugins/default/internet-connection.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/plugins/default/bt-tether.py b/pwnagotchi/plugins/default/bt-tether.py index 02b32034..6e2e1e25 100644 --- a/pwnagotchi/plugins/default/bt-tether.py +++ b/pwnagotchi/plugins/default/bt-tether.py @@ -579,7 +579,7 @@ class BTTether(plugins.Plugin): def on_ui_setup(self, ui): with ui._lock: ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', - position=(ui.width() / 2 + 30, 0), + position=(ui.width() / 2 + 20, 0), label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): diff --git a/pwnagotchi/plugins/default/internet-connection.py b/pwnagotchi/plugins/default/internet-connection.py index 66995217..042dd3a1 100644 --- a/pwnagotchi/plugins/default/internet-connection.py +++ b/pwnagotchi/plugins/default/internet-connection.py @@ -32,7 +32,7 @@ class InternetConnectionPlugin(plugins.Plugin): # add a LabeledValue element to the UI with the given label and value # the position and font can also be specified ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='WWW', value='-', - position=(ui.width() / 2 - 10, 0), label_font=fonts.Bold, + position=(ui.width() / 2 - 20, 0), label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): From 967870f5e19c3e148bdab608a8118fcefbd74cb6 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 16:37:37 +0200 Subject: [PATCH 10/34] waveshare35lcd.py: small bug fix to show face immediately Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/ui/hw/waveshare35lcd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/ui/hw/waveshare35lcd.py b/pwnagotchi/ui/hw/waveshare35lcd.py index 1c67634c..2769b503 100644 --- a/pwnagotchi/ui/hw/waveshare35lcd.py +++ b/pwnagotchi/ui/hw/waveshare35lcd.py @@ -41,7 +41,7 @@ class Waveshare35lcd(DisplayImpl): from pwnagotchi.ui.hw.libs.fb import fb self._display = fb logging.info("initializing waveshare 3,5inch lcd display") - self._display.ready_fb(i=1) + self._display.ready_fb(i=0) self._display.black_scr() def render(self, canvas): From 06dbf0f92635056586ff45730d27a07eaf482683 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 20:57:19 +0200 Subject: [PATCH 11/34] waveshare35lcd.py: small bug fix to show face immediately Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/ui/faces.py | 1 + pwnagotchi/ui/hw/waveshare35lcd.py | 4 ++-- pwnagotchi/ui/view.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pwnagotchi/ui/faces.py b/pwnagotchi/ui/faces.py index 66874d0e..963e6967 100644 --- a/pwnagotchi/ui/faces.py +++ b/pwnagotchi/ui/faces.py @@ -24,6 +24,7 @@ UPLOAD = '(1__0)' UPLOAD1 = '(1__1)' UPLOAD2 = '(0__1)' + def load_from_config(config): for face_name, face_value in config.items(): globals()[face_name.upper()] = face_value diff --git a/pwnagotchi/ui/hw/waveshare35lcd.py b/pwnagotchi/ui/hw/waveshare35lcd.py index 2769b503..91470e56 100644 --- a/pwnagotchi/ui/hw/waveshare35lcd.py +++ b/pwnagotchi/ui/hw/waveshare35lcd.py @@ -15,7 +15,7 @@ class Waveshare35lcd(DisplayImpl): fonts.setup(12, 10, 12, 70, 25, 9) self._layout['width'] = 480 self._layout['height'] = 320 - self._layout['face'] = (110, 60) + self._layout['face'] = (110, 100) self._layout['name'] = (10, 30) self._layout['channel'] = (0, 0) self._layout['aps'] = (80, 0) @@ -27,7 +27,7 @@ class Waveshare35lcd(DisplayImpl): self._layout['shakes'] = (10, 300) self._layout['mode'] = (440, 300) self._layout['status'] = { - 'pos': (80, 180), + 'pos': (80, 200), 'font': fonts.status_font(fonts.Medium), 'max': 100 } diff --git a/pwnagotchi/ui/view.py b/pwnagotchi/ui/view.py index 4d05894f..7647ca23 100644 --- a/pwnagotchi/ui/view.py +++ b/pwnagotchi/ui/view.py @@ -40,7 +40,7 @@ class View(object): self._width = self._layout['width'] self._height = self._layout['height'] self._state = State(state={ - 'channel': LabeledValue(color=BLACK, label='CH', value='00', position=self._layout['channel'], + 'channel': LabeledValue(color=BLACK, label='CH', value='000', position=self._layout['channel'], label_font=fonts.Bold, text_font=fonts.Medium), 'aps': LabeledValue(color=BLACK, label='APS', value='0 (00)', position=self._layout['aps'], From 2ba439d8dac204c89ffc796fdd8c4e7194d6412f Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 21:08:18 +0200 Subject: [PATCH 12/34] internet-connection.py: change position of the label Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/internet-connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/internet-connection.py b/pwnagotchi/plugins/default/internet-connection.py index 042dd3a1..3390a077 100644 --- a/pwnagotchi/plugins/default/internet-connection.py +++ b/pwnagotchi/plugins/default/internet-connection.py @@ -32,7 +32,7 @@ class InternetConnectionPlugin(plugins.Plugin): # add a LabeledValue element to the UI with the given label and value # the position and font can also be specified ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='WWW', value='-', - position=(ui.width() / 2 - 20, 0), label_font=fonts.Bold, + position=(ui.width() / 2 - 25, 0), label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): From c285a43e1c8f512cf7fefc420267048732255fec Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Tue, 19 Sep 2023 19:49:20 +0200 Subject: [PATCH 13/34] internet-connection.py: change position of the label Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/bt-tether.py | 2 +- pwnagotchi/plugins/default/internet-connection.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pwnagotchi/plugins/default/bt-tether.py b/pwnagotchi/plugins/default/bt-tether.py index 6e2e1e25..a06ed20e 100644 --- a/pwnagotchi/plugins/default/bt-tether.py +++ b/pwnagotchi/plugins/default/bt-tether.py @@ -579,7 +579,7 @@ class BTTether(plugins.Plugin): def on_ui_setup(self, ui): with ui._lock: ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', - position=(ui.width() / 2 + 20, 0), + position=(ui.width() / 2 - 15, 0), label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): diff --git a/pwnagotchi/plugins/default/internet-connection.py b/pwnagotchi/plugins/default/internet-connection.py index 3390a077..c970e9c5 100644 --- a/pwnagotchi/plugins/default/internet-connection.py +++ b/pwnagotchi/plugins/default/internet-connection.py @@ -32,8 +32,8 @@ class InternetConnectionPlugin(plugins.Plugin): # add a LabeledValue element to the UI with the given label and value # the position and font can also be specified ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='WWW', value='-', - position=(ui.width() / 2 - 25, 0), label_font=fonts.Bold, - text_font=fonts.Medium)) + position=(ui.width() / 2 - 30, 0), + label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): # check if there is an active Internet connection From 14ba17095a6101b7fa5d8a01a4892320e2aa7742 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Tue, 19 Sep 2023 19:52:16 +0200 Subject: [PATCH 14/34] internet-connection.py: change position of the label Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/internet-connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/plugins/default/internet-connection.py b/pwnagotchi/plugins/default/internet-connection.py index c970e9c5..0f23c5ce 100644 --- a/pwnagotchi/plugins/default/internet-connection.py +++ b/pwnagotchi/plugins/default/internet-connection.py @@ -44,10 +44,10 @@ class InternetConnectionPlugin(plugins.Plugin): # Connect to the host - tells us if the host is actually reachable s = socket.create_connection((host, 80), 2) s.close() - ui.set('connection_status', 'C') + ui.set('connection_status', '✓') except: # if the command failed, it means there is no active Internet connection - ui.set('connection_status', 'D') + ui.set('connection_status', '✗') def on_unload(self, ui): with ui._lock: From 98d3f519e44b3e672e99743f19350e863329fe11 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Tue, 19 Sep 2023 19:55:09 +0200 Subject: [PATCH 15/34] internet-connection.py: change position of the label Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/internet-connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/internet-connection.py b/pwnagotchi/plugins/default/internet-connection.py index 0f23c5ce..f418f663 100644 --- a/pwnagotchi/plugins/default/internet-connection.py +++ b/pwnagotchi/plugins/default/internet-connection.py @@ -32,7 +32,7 @@ class InternetConnectionPlugin(plugins.Plugin): # add a LabeledValue element to the UI with the given label and value # the position and font can also be specified ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='WWW', value='-', - position=(ui.width() / 2 - 30, 0), + position=(ui.width() / 2 - 40, 0), label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): From c5778bb56d4df196a98c74542e160007a7489975 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Tue, 19 Sep 2023 20:20:05 +0200 Subject: [PATCH 16/34] internet-connection.py: change position of the label Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/bt-tether.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/bt-tether.py b/pwnagotchi/plugins/default/bt-tether.py index a06ed20e..fa7c867f 100644 --- a/pwnagotchi/plugins/default/bt-tether.py +++ b/pwnagotchi/plugins/default/bt-tether.py @@ -579,7 +579,7 @@ class BTTether(plugins.Plugin): def on_ui_setup(self, ui): with ui._lock: ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', - position=(ui.width() / 2 - 15, 0), + position=(ui.width() / 2 - 10, 0), label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): From faf3af1774a8b627f6359345709a886d65179f11 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 08:34:48 +0200 Subject: [PATCH 17/34] motd: testing if this will work Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/motd | 1 + 1 file changed, 1 insertion(+) create mode 100644 builder/data/etc/motd diff --git a/builder/data/etc/motd b/builder/data/etc/motd new file mode 100644 index 00000000..793aa682 --- /dev/null +++ b/builder/data/etc/motd @@ -0,0 +1 @@ +This is a test \ No newline at end of file From 5cba5a431c201e5627bf0b6cb7b6c7245cc8dd6e Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 08:42:14 +0200 Subject: [PATCH 18/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/motd | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/builder/data/etc/motd b/builder/data/etc/motd index 793aa682..7e45f641 100644 --- a/builder/data/etc/motd +++ b/builder/data/etc/motd @@ -1 +1,27 @@ -This is a test \ No newline at end of file +(◕‿‿◕) {{pwnagotchi.hostname}} + + Hi! I'm a pwnagotchi {{pwnagotchi.version}}, please take good care of me! + Here are some basic things you need to know to raise me properly! + + If you want to change my configuration, use /etc/pwnagotchi/config.toml + + All the configuration options can be found on /etc/pwnagotchi/default.toml, + but don't change this file because I will recreate it every time I'm restarted! + + I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz + + I'm managed by systemd. Here are some basic commands. + + If you want to know what I'm doing, you can check my logs with the command + - pwnlog + - pwnver, to check the current version + - sudo pwnagotchi --donate, to see how you can donate to this project + - sudo pwnagotchi --check-updat, to see if there is a new version available + + If you want to know if I'm running, you can use + systemctl status pwnagotchi + + You can restart me using + systemctl restart pwnagotchi + + You learn more about me at https://pwnagotchi.ai/ \ No newline at end of file From 18dc86aa9abd444032980f035fa88c0d644a14a0 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 08:43:11 +0200 Subject: [PATCH 19/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/motd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/data/etc/motd b/builder/data/etc/motd index 7e45f641..4ce19a1e 100644 --- a/builder/data/etc/motd +++ b/builder/data/etc/motd @@ -16,7 +16,7 @@ - pwnlog - pwnver, to check the current version - sudo pwnagotchi --donate, to see how you can donate to this project - - sudo pwnagotchi --check-updat, to see if there is a new version available + - sudo pwnagotchi --check-update, to see if there is a new version available If you want to know if I'm running, you can use systemctl status pwnagotchi From d2d5b08d5ce5b619d8fd2a64f06ee76133571c18 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 08:55:48 +0200 Subject: [PATCH 20/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/motd | 27 ---------------------- builder/data/etc/update-motd.d/motd.sh | 31 ++++++++++++++++++++++++++ builder/pwnagotchi.yml | 4 ++-- 3 files changed, 33 insertions(+), 29 deletions(-) delete mode 100644 builder/data/etc/motd create mode 100644 builder/data/etc/update-motd.d/motd.sh diff --git a/builder/data/etc/motd b/builder/data/etc/motd deleted file mode 100644 index 4ce19a1e..00000000 --- a/builder/data/etc/motd +++ /dev/null @@ -1,27 +0,0 @@ -(◕‿‿◕) {{pwnagotchi.hostname}} - - Hi! I'm a pwnagotchi {{pwnagotchi.version}}, please take good care of me! - Here are some basic things you need to know to raise me properly! - - If you want to change my configuration, use /etc/pwnagotchi/config.toml - - All the configuration options can be found on /etc/pwnagotchi/default.toml, - but don't change this file because I will recreate it every time I'm restarted! - - I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz - - I'm managed by systemd. Here are some basic commands. - - If you want to know what I'm doing, you can check my logs with the command - - pwnlog - - pwnver, to check the current version - - sudo pwnagotchi --donate, to see how you can donate to this project - - sudo pwnagotchi --check-update, to see if there is a new version available - - If you want to know if I'm running, you can use - systemctl status pwnagotchi - - You can restart me using - systemctl restart pwnagotchi - - You learn more about me at https://pwnagotchi.ai/ \ No newline at end of file diff --git a/builder/data/etc/update-motd.d/motd.sh b/builder/data/etc/update-motd.d/motd.sh new file mode 100644 index 00000000..272d122f --- /dev/null +++ b/builder/data/etc/update-motd.d/motd.sh @@ -0,0 +1,31 @@ +#!/bin/sh +_hostname=$(hostname) +_version=$(shell cut -d"'" -f2 < /usr/local/lib/python3.9/dist-packages/pwnagotchi/_version.py) + +echo "(◕‿‿◕) $_hostname" +echo"" +echo" Hi! I'm a pwnagotchi $_version, please take good care of me!" +echo" Here are some basic things you need to know to raise me properly!" +echo"" +echo" If you want to change my configuration, use /etc/pwnagotchi/config.toml" +echo" " +echo" All the configuration options can be found on /etc/pwnagotchi/default.toml," +echo" but don't change this file because I will recreate it every time I'm restarted!" +echo"" +echo" I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" +echo"" +echo" I'm managed by systemd. Here are some basic commands." +echo"" +echo" If you want to know what I'm doing, you can check my logs with the command" +echo" - pwnlog" +echo" - pwnver, to check the current version" +echo" - sudo pwnagotchi --donate, to see how you can donate to this project" +echo" - sudo pwnagotchi --check-update, to see if there is a new version available" +echo"" +echo" If you want to know if I'm running, you can use" +echo" systemctl status pwnagotchi" +echo"" +echo" You can restart me using" +echo" systemctl restart pwnagotchi" +echo"" +echo" You learn more about me at https://pwnagotchi.ai/" \ No newline at end of file diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 4ed9eac5..372b68ba 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -489,10 +489,10 @@ regexp: '(.*)$' line: '\1 modules-load=dwc2,g_ether' - - name: configure motd + - name: configure motd.sh become_user: root copy: - dest: /etc/motd + dest: /etc/motd.sh content: | (◕‿‿◕) {{pwnagotchi.hostname}} From c5865d61f38579e818027ebf3e0a5b6b9bd11422 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 09:02:37 +0200 Subject: [PATCH 21/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/update-motd.d/{motd.sh => 01-motd} | 0 builder/pwnagotchi.yml | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename builder/data/etc/update-motd.d/{motd.sh => 01-motd} (100%) diff --git a/builder/data/etc/update-motd.d/motd.sh b/builder/data/etc/update-motd.d/01-motd similarity index 100% rename from builder/data/etc/update-motd.d/motd.sh rename to builder/data/etc/update-motd.d/01-motd diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 372b68ba..39b52d39 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -489,10 +489,10 @@ regexp: '(.*)$' line: '\1 modules-load=dwc2,g_ether' - - name: configure motd.sh + - name: configure 01-motd become_user: root copy: - dest: /etc/motd.sh + dest: /etc/01-motd content: | (◕‿‿◕) {{pwnagotchi.hostname}} From 158145b1211b6f4964321fbe8e2236421b5d9f4c Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 10:30:44 +0200 Subject: [PATCH 22/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/update-motd.d/01-motd | 56 +++++++++++++------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/builder/data/etc/update-motd.d/01-motd b/builder/data/etc/update-motd.d/01-motd index 272d122f..bdf19df3 100644 --- a/builder/data/etc/update-motd.d/01-motd +++ b/builder/data/etc/update-motd.d/01-motd @@ -1,31 +1,31 @@ #!/bin/sh _hostname=$(hostname) -_version=$(shell cut -d"'" -f2 < /usr/local/lib/python3.9/dist-packages/pwnagotchi/_version.py) - +_version=$(cut -d"'" -f2 < /usr/local/lib/python3.9/dist-packages/pwnagotchi/_version.py) +echo echo "(◕‿‿◕) $_hostname" -echo"" -echo" Hi! I'm a pwnagotchi $_version, please take good care of me!" -echo" Here are some basic things you need to know to raise me properly!" -echo"" -echo" If you want to change my configuration, use /etc/pwnagotchi/config.toml" -echo" " -echo" All the configuration options can be found on /etc/pwnagotchi/default.toml," -echo" but don't change this file because I will recreate it every time I'm restarted!" -echo"" -echo" I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" -echo"" -echo" I'm managed by systemd. Here are some basic commands." -echo"" -echo" If you want to know what I'm doing, you can check my logs with the command" -echo" - pwnlog" -echo" - pwnver, to check the current version" -echo" - sudo pwnagotchi --donate, to see how you can donate to this project" -echo" - sudo pwnagotchi --check-update, to see if there is a new version available" -echo"" -echo" If you want to know if I'm running, you can use" -echo" systemctl status pwnagotchi" -echo"" -echo" You can restart me using" -echo" systemctl restart pwnagotchi" -echo"" -echo" You learn more about me at https://pwnagotchi.ai/" \ No newline at end of file +echo +echo "Hi! I'm a pwnagotchi $_version, please take good care of me!" +echo "Here are some basic things you need to know to raise me properly!" +echo +echo "If you want to change my configuration, use /etc/pwnagotchi/config.toml" +echo +echo "All the configuration options can be found on /etc/pwnagotchi/default.toml," +echo "but don't change this file because I will recreate it every time I'm restarted!" +echo +echo "I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" +echo +echo "I'm managed by systemd. Here are some basic commands." +echo +echo "If you want to know what I'm doing, you can check my logs with the command" +echo "- pwnlog" +echo "- pwnver, to check the current version" +echo "- sudo pwnagotchi --donate, to see how you can donate to this project" +echo "- sudo pwnagotchi --check-update, to see if there is a new version available" +echo +echo "If you want to know if I'm running, you can use" +echo "systemctl status pwnagotchi" +echo +echo "You can restart me using" +echo "systemctl restart pwnagotchi" +echo +echo "You learn more about me at https://pwnagotchi.ai/" \ No newline at end of file From 8c38641e1dcce2e06aeb195c6817cde77836e59f Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 10:42:13 +0200 Subject: [PATCH 23/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/update-motd.d/01-motd | 0 builder/pwnagotchi.yml | 59 ++++++++++++++------------ 2 files changed, 32 insertions(+), 27 deletions(-) mode change 100644 => 100755 builder/data/etc/update-motd.d/01-motd diff --git a/builder/data/etc/update-motd.d/01-motd b/builder/data/etc/update-motd.d/01-motd old mode 100644 new mode 100755 diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 39b52d39..fcdabbe5 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -492,34 +492,39 @@ - name: configure 01-motd become_user: root copy: - dest: /etc/01-motd + dest: /etc/update-motd.d/01-motd content: | - (◕‿‿◕) {{pwnagotchi.hostname}} - - Hi! I'm a pwnagotchi {{pwnagotchi.version}}, please take good care of me! - Here are some basic things you need to know to raise me properly! - - If you want to change my configuration, use /etc/pwnagotchi/config.toml - - All the configuration options can be found on /etc/pwnagotchi/default.toml, - but don't change this file because I will recreate it every time I'm restarted! - - I'm managed by systemd. Here are some basic commands. - - If you want to know what I'm doing, you can check my logs with the command - tail -f /var/log/pwnagotchi.log - - If you want to know if I'm running, you can use - systemctl status pwnagotchi - - You can restart me using - systemctl restart pwnagotchi - - But be aware I will go into MANUAL mode when restarted! - You can put me back into AUTO mode using - touch /root/.pwnagotchi-auto && systemctl restart pwnagotchi - - You learn more about me at https://pwnagotchi.ai/ + #!/bin/sh + _hostname=$(hostname) + _version=$(cut -d"'" -f2 < /usr/local/lib/python3.9/dist-packages/pwnagotchi/_version.py) + echo + echo "(◕‿‿◕) $_hostname" + echo + echo "Hi! I'm a pwnagotchi $_version, please take good care of me!" + echo "Here are some basic things you need to know to raise me properly!" + echo + echo "If you want to change my configuration, use /etc/pwnagotchi/config.toml" + echo + echo "All the configuration options can be found on /etc/pwnagotchi/default.toml," + echo "but don't change this file because I will recreate it every time I'm restarted!" + echo + echo "I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" + echo + echo "I'm managed by systemd. Here are some basic commands." + echo + echo "If you want to know what I'm doing, you can check my logs with the command" + echo "- pwnlog" + echo "- pwnver, to check the current version" + echo "- sudo pwnagotchi --donate, to see how you can donate to this project" + echo "- sudo pwnagotchi --check-update, to see if there is a new version available" + echo + echo "If you want to know if I'm running, you can use" + echo "systemctl status pwnagotchi" + echo + echo "You can restart me using" + echo "systemctl restart pwnagotchi" + echo + echo "You learn more about me at https://pwnagotchi.ai/" when: hostname.changed - name: Add pwnlog alias From 0d89b3ba2b262eae7a9bce0171f830591ac8572a Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 10:46:04 +0200 Subject: [PATCH 24/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/builder/pwnagotchi.json b/builder/pwnagotchi.json index 28766b6e..c051a4d5 100644 --- a/builder/pwnagotchi.json +++ b/builder/pwnagotchi.json @@ -95,6 +95,12 @@ "chmod +x /usr/bin/*" ] }, + { + "type": "shell", + "inline": [ + "chmod +x /etc/update-motd.d/*" + ] + }, { "type": "shell", "inline": [ From 3ba3fb818c99fd7dd3b6d8cb44afb98257ab7d13 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 10:47:49 +0200 Subject: [PATCH 25/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d42c8bdc..5591f8a4 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ def install_file(source_filename, dest_filename): if not os.path.isdir(dest_folder): os.makedirs(dest_folder) - shutil.copyfile(source_filename, dest_filename) + shutil.copy2(source_filename, dest_filename) except Exception as e: print("error installing %s: %s" % (source_filename, e)) From d89094ccce0667f94fdb14bd88f5eae33c33c5de Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 10:56:24 +0200 Subject: [PATCH 26/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/update-motd.d/01-motd | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/builder/data/etc/update-motd.d/01-motd b/builder/data/etc/update-motd.d/01-motd index bdf19df3..57cfc59d 100755 --- a/builder/data/etc/update-motd.d/01-motd +++ b/builder/data/etc/update-motd.d/01-motd @@ -2,30 +2,30 @@ _hostname=$(hostname) _version=$(cut -d"'" -f2 < /usr/local/lib/python3.9/dist-packages/pwnagotchi/_version.py) echo -echo "(◕‿‿◕) $_hostname" +echo"(◕‿‿◕) $_hostname" echo -echo "Hi! I'm a pwnagotchi $_version, please take good care of me!" -echo "Here are some basic things you need to know to raise me properly!" +echo" Hi! I'm a pwnagotchi $_version, please take good care of me!" +echo" Here are some basic things you need to know to raise me properly!" echo -echo "If you want to change my configuration, use /etc/pwnagotchi/config.toml" +echo" If you want to change my configuration, use /etc/pwnagotchi/config.toml" echo -echo "All the configuration options can be found on /etc/pwnagotchi/default.toml," -echo "but don't change this file because I will recreate it every time I'm restarted!" +echo" All the configuration options can be found on /etc/pwnagotchi/default.toml," +echo" but don't change this file because I will recreate it every time I'm restarted!" echo -echo "I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" +echo" I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" echo -echo "I'm managed by systemd. Here are some basic commands." +echo" I'm managed by systemd. Here are some basic commands." echo -echo "If you want to know what I'm doing, you can check my logs with the command" -echo "- pwnlog" -echo "- pwnver, to check the current version" -echo "- sudo pwnagotchi --donate, to see how you can donate to this project" -echo "- sudo pwnagotchi --check-update, to see if there is a new version available" +echo" If you want to know what I'm doing, you can check my logs with the command" +echo" - pwnlog" +echo" - pwnver, to check the current version" +echo" - sudo pwnagotchi --donate, to see how you can donate to this project" +echo" - sudo pwnagotchi --check-update, to see if there is a new version available" echo -echo "If you want to know if I'm running, you can use" -echo "systemctl status pwnagotchi" +echo" If you want to know if I'm running, you can use" +echo" systemctl status pwnagotchi" echo -echo "You can restart me using" -echo "systemctl restart pwnagotchi" +echo" You can restart me using" +echo" systemctl restart pwnagotchi" echo -echo "You learn more about me at https://pwnagotchi.ai/" \ No newline at end of file +echo" You learn more about me at https://pwnagotchi.ai/" \ No newline at end of file From bd16af050c8c5c098bbf1423483f93b3eab8c8ed Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 10:59:35 +0200 Subject: [PATCH 27/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/update-motd.d/01-motd | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/builder/data/etc/update-motd.d/01-motd b/builder/data/etc/update-motd.d/01-motd index 57cfc59d..bdf19df3 100755 --- a/builder/data/etc/update-motd.d/01-motd +++ b/builder/data/etc/update-motd.d/01-motd @@ -2,30 +2,30 @@ _hostname=$(hostname) _version=$(cut -d"'" -f2 < /usr/local/lib/python3.9/dist-packages/pwnagotchi/_version.py) echo -echo"(◕‿‿◕) $_hostname" +echo "(◕‿‿◕) $_hostname" echo -echo" Hi! I'm a pwnagotchi $_version, please take good care of me!" -echo" Here are some basic things you need to know to raise me properly!" +echo "Hi! I'm a pwnagotchi $_version, please take good care of me!" +echo "Here are some basic things you need to know to raise me properly!" echo -echo" If you want to change my configuration, use /etc/pwnagotchi/config.toml" +echo "If you want to change my configuration, use /etc/pwnagotchi/config.toml" echo -echo" All the configuration options can be found on /etc/pwnagotchi/default.toml," -echo" but don't change this file because I will recreate it every time I'm restarted!" +echo "All the configuration options can be found on /etc/pwnagotchi/default.toml," +echo "but don't change this file because I will recreate it every time I'm restarted!" echo -echo" I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" +echo "I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" echo -echo" I'm managed by systemd. Here are some basic commands." +echo "I'm managed by systemd. Here are some basic commands." echo -echo" If you want to know what I'm doing, you can check my logs with the command" -echo" - pwnlog" -echo" - pwnver, to check the current version" -echo" - sudo pwnagotchi --donate, to see how you can donate to this project" -echo" - sudo pwnagotchi --check-update, to see if there is a new version available" +echo "If you want to know what I'm doing, you can check my logs with the command" +echo "- pwnlog" +echo "- pwnver, to check the current version" +echo "- sudo pwnagotchi --donate, to see how you can donate to this project" +echo "- sudo pwnagotchi --check-update, to see if there is a new version available" echo -echo" If you want to know if I'm running, you can use" -echo" systemctl status pwnagotchi" +echo "If you want to know if I'm running, you can use" +echo "systemctl status pwnagotchi" echo -echo" You can restart me using" -echo" systemctl restart pwnagotchi" +echo "You can restart me using" +echo "systemctl restart pwnagotchi" echo -echo" You learn more about me at https://pwnagotchi.ai/" \ No newline at end of file +echo "You learn more about me at https://pwnagotchi.ai/" \ No newline at end of file From 4cd0c82b6f409f304d628850a0a15c319886c6da Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 11:03:17 +0200 Subject: [PATCH 28/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/update-motd.d/01-motd | 35 +++++++++++++------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/builder/data/etc/update-motd.d/01-motd b/builder/data/etc/update-motd.d/01-motd index bdf19df3..c0397dc4 100755 --- a/builder/data/etc/update-motd.d/01-motd +++ b/builder/data/etc/update-motd.d/01-motd @@ -1,31 +1,32 @@ #!/bin/sh +#!/bin/sh _hostname=$(hostname) _version=$(cut -d"'" -f2 < /usr/local/lib/python3.9/dist-packages/pwnagotchi/_version.py) echo echo "(◕‿‿◕) $_hostname" echo -echo "Hi! I'm a pwnagotchi $_version, please take good care of me!" -echo "Here are some basic things you need to know to raise me properly!" +echo " Hi! I'm a pwnagotchi $_version, please take good care of me!" +echo " Here are some basic things you need to know to raise me properly!" echo -echo "If you want to change my configuration, use /etc/pwnagotchi/config.toml" +echo " If you want to change my configuration, use /etc/pwnagotchi/config.toml" echo -echo "All the configuration options can be found on /etc/pwnagotchi/default.toml," -echo "but don't change this file because I will recreate it every time I'm restarted!" +echo " All the configuration options can be found on /etc/pwnagotchi/default.toml," +echo " but don't change this file because I will recreate it every time I'm restarted!" echo -echo "I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" +echo " I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" echo -echo "I'm managed by systemd. Here are some basic commands." +echo " I'm managed by systemd. Here are some basic commands." echo -echo "If you want to know what I'm doing, you can check my logs with the command" -echo "- pwnlog" -echo "- pwnver, to check the current version" -echo "- sudo pwnagotchi --donate, to see how you can donate to this project" -echo "- sudo pwnagotchi --check-update, to see if there is a new version available" +echo " If you want to know what I'm doing, you can check my logs with the command" +echo " - pwnlog" +echo " - pwnver, to check the current version" +echo " - sudo pwnagotchi --donate, to see how you can donate to this project" +echo " - sudo pwnagotchi --check-update, to see if there is a new version available" echo -echo "If you want to know if I'm running, you can use" -echo "systemctl status pwnagotchi" +echo " If you want to know if I'm running, you can use" +echo " systemctl status pwnagotchi" echo -echo "You can restart me using" -echo "systemctl restart pwnagotchi" +echo " You can restart me using" +echo " systemctl restart pwnagotchi" echo -echo "You learn more about me at https://pwnagotchi.ai/" \ No newline at end of file +echo " You learn more about me at https://pwnagotchi.ai/" \ No newline at end of file From 1de6dc6c0e3190bc446eb37253f5e44139d78a72 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 11:04:05 +0200 Subject: [PATCH 29/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/update-motd.d/01-motd | 1 - 1 file changed, 1 deletion(-) diff --git a/builder/data/etc/update-motd.d/01-motd b/builder/data/etc/update-motd.d/01-motd index c0397dc4..7d2fe212 100755 --- a/builder/data/etc/update-motd.d/01-motd +++ b/builder/data/etc/update-motd.d/01-motd @@ -1,5 +1,4 @@ #!/bin/sh -#!/bin/sh _hostname=$(hostname) _version=$(cut -d"'" -f2 < /usr/local/lib/python3.9/dist-packages/pwnagotchi/_version.py) echo From 83a8e4a2db4df099f74f03b769c787f55ddf218a Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 11:04:47 +0200 Subject: [PATCH 30/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/internet-connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/plugins/default/internet-connection.py b/pwnagotchi/plugins/default/internet-connection.py index f418f663..2678d27f 100644 --- a/pwnagotchi/plugins/default/internet-connection.py +++ b/pwnagotchi/plugins/default/internet-connection.py @@ -44,10 +44,10 @@ class InternetConnectionPlugin(plugins.Plugin): # Connect to the host - tells us if the host is actually reachable s = socket.create_connection((host, 80), 2) s.close() - ui.set('connection_status', '✓') + ui.set('connection_status', 'C') except: # if the command failed, it means there is no active Internet connection - ui.set('connection_status', '✗') + ui.set('connection_status', 'D') def on_unload(self, ui): with ui._lock: From 32e878dc4dfc9b7e36fabeb0674bb6e7e5f15de6 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 11:20:13 +0200 Subject: [PATCH 31/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/update-motd.d/01-motd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/data/etc/update-motd.d/01-motd b/builder/data/etc/update-motd.d/01-motd index 7d2fe212..0f26121b 100755 --- a/builder/data/etc/update-motd.d/01-motd +++ b/builder/data/etc/update-motd.d/01-motd @@ -18,7 +18,7 @@ echo " I'm managed by systemd. Here are some basic commands." echo echo " If you want to know what I'm doing, you can check my logs with the command" echo " - pwnlog" -echo " - pwnver, to check the current version" +echo " - sudo pwnagotchi --version, to check the current version" echo " - sudo pwnagotchi --donate, to see how you can donate to this project" echo " - sudo pwnagotchi --check-update, to see if there is a new version available" echo From 5040b4a490361d94c05182be0a799b0b46823700 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 11:31:49 +0200 Subject: [PATCH 32/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/__init__.py b/pwnagotchi/__init__.py index d0b1ed41..cce048cd 100644 --- a/pwnagotchi/__init__.py +++ b/pwnagotchi/__init__.py @@ -140,7 +140,7 @@ def restart(mode): os.system("service pwnagotchi restart") -def reboot(mode=None): +def reboot(mode="Auto"): if mode is not None: mode = mode.upper() logging.warning("rebooting in %s mode ...", mode) From f97978318856002cde133df81f7c34b1054edca3 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 11:32:53 +0200 Subject: [PATCH 33/34] motd: If there are any major changes, I can now edit MOTD! Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/__init__.py b/pwnagotchi/__init__.py index cce048cd..d0b1ed41 100644 --- a/pwnagotchi/__init__.py +++ b/pwnagotchi/__init__.py @@ -140,7 +140,7 @@ def restart(mode): os.system("service pwnagotchi restart") -def reboot(mode="Auto"): +def reboot(mode=None): if mode is not None: mode = mode.upper() logging.warning("rebooting in %s mode ...", mode) From 0c4328fc25515800b31b32d77d249c71ff4b66eb Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 20 Sep 2023 11:38:32 +0200 Subject: [PATCH 34/34] fix_services.py: small edits Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/fix_services.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pwnagotchi/plugins/default/fix_services.py b/pwnagotchi/plugins/default/fix_services.py index 9ff4cba3..208f6036 100644 --- a/pwnagotchi/plugins/default/fix_services.py +++ b/pwnagotchi/plugins/default/fix_services.py @@ -99,8 +99,7 @@ class FixServices(plugins.Plugin): if hasattr(agent, 'view'): display = agent.view() if display: - display.update(force=True, new_data={"status": "Wifi recon flipped!", - "face": faces.COOL}) + display.update(force=True, new_data={"status": "Wifi recon flipped!", "face": faces.COOL}) else: print("Wifi recon flipped") else: @@ -229,8 +228,7 @@ class FixServices(plugins.Plugin): display = connection.view() if display: display.update(force=True, new_data={"status": "I'm blind! Try turning it off and on again", - "brcmfmac_status": self._status, - "face": faces.BORED}) + "brcmfmac_status": self._status, "face": faces.BORED}) else: display = None