From 37342c06858b31515709681df12a52a4192b75a2 Mon Sep 17 00:00:00 2001 From: grokbeer <1428380+grokbeer@users.noreply.github.com> Date: Fri, 8 May 2020 21:58:26 +1200 Subject: [PATCH 01/31] Have watchdog plugin reboot system rather than restart application Signed-off-by: grokbeer <1428380+grokbeer@users.noreply.github.com> --- pwnagotchi/plugins/default/watchdog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/watchdog.py b/pwnagotchi/plugins/default/watchdog.py index 6a370eb..8ebb6b8 100644 --- a/pwnagotchi/plugins/default/watchdog.py +++ b/pwnagotchi/plugins/default/watchdog.py @@ -33,4 +33,4 @@ class Watchdog(plugins.Plugin): logging.info('[WATCHDOG] Blind-Bug detected. Restarting.') mode = 'MANU' if agent.mode == 'manual' else 'AUTO' import pwnagotchi - pwnagotchi.restart(mode=mode) + pwnagotchi.reboot(mode=mode) From 6111ee9d9de4113e760a5ac5cd4ad81c09400564 Mon Sep 17 00:00:00 2001 From: Sergio Ruiz Date: Tue, 25 Aug 2020 23:07:34 +0200 Subject: [PATCH 02/31] Improved Spanish translation Signed-off-by: Sergio Ruiz --- pwnagotchi/locale/es/LC_MESSAGES/voice.mo | Bin 4380 -> 4424 bytes pwnagotchi/locale/es/LC_MESSAGES/voice.po | 73 +++++++++++----------- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/pwnagotchi/locale/es/LC_MESSAGES/voice.mo b/pwnagotchi/locale/es/LC_MESSAGES/voice.mo index 25567cc39b93d57019116eec843f97cf542c388e..9cadc3240f9becfd1922d52aa17b4c41d4b81cc7 100644 GIT binary patch delta 1173 zcmXxiO>7fK6bJALgfGXAfi#IiAbRE_rJ>%sCIqk$5Qs&P2nt{#Bo5VMcUZRF-7(%> zJ{qhDapJrjxoj>7q)15II8fC_&`O8{+_{u;N}&G7*(i~IGdu6iyf@?f+yB`9 z_0;CGlW!cFiM)Hm=B>H|MPo!E!n z^}+k$D4c=1;1CkL3w7s@pl;}Qx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Wc)WXNUWyT3zJ z2l~XtKw}N&$Z-6%NLa9W($3jPB;rn>{s@`Q$|8jer8cKCE+@lTu~ObE{s#I3dpAvy Hzt`VCxFhgJ diff --git a/pwnagotchi/locale/es/LC_MESSAGES/voice.po b/pwnagotchi/locale/es/LC_MESSAGES/voice.po index fbf182c..ca69331 100644 --- a/pwnagotchi/locale/es/LC_MESSAGES/voice.po +++ b/pwnagotchi/locale/es/LC_MESSAGES/voice.po @@ -8,25 +8,26 @@ msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-10-09 17:42+0200\n" -"PO-Revision-Date: 2019-10-09 21:07+0000\n" -"Last-Translator: diegopastor \n" -"Language-Team: LANGUAGE \n" -"Language: spanish\n" +"PO-Revision-Date: 2020-08-25 23:06+0200\n" +"Last-Translator: Sergio Ruiz \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language-Team: \n" +"X-Generator: Poedit 2.4.1\n" msgid "ZzzzZZzzzzZzzz" msgstr "ZzzzZZzzzzZzzz" msgid "Hi, I'm Pwnagotchi! Starting ..." -msgstr "Hola, soy Pwnagotchi! Empezando ..." +msgstr "¡Hola, soy Pwnagotchi! Empezando ..." msgid "New day, new hunt, new pwns!" -msgstr "Nuevo día, nueva cazería, nuevos pwns!" +msgstr "¡Nuevo día, nueva cacería, nuevos pwns!" msgid "Hack the Planet!" -msgstr "Hackea el planeta!" +msgstr "¡Hackea el planeta!" msgid "AI ready." msgstr "IA lista." @@ -36,16 +37,16 @@ msgstr "La red neuronal está lista." #, python-brace-format msgid "Hey, channel {channel} is free! Your AP will say thanks." -msgstr "Oye, el canal {channel} está libre! Tú AP lo agradecerá." +msgstr "¡Oye, el canal {channel} está libre! Tu AP lo agradecerá." msgid "I'm bored ..." msgstr "Estoy aburrido ..." msgid "Let's go for a walk!" -msgstr "Vamos por un paseo!" +msgstr "¡Vamos por un paseo!" msgid "This is the best day of my life!" -msgstr "Este es el mejor día de mi vida!" +msgstr "¡Este es el mejor día de mi vida!" msgid "Shitty day :/" msgstr "Día de mierda :/" @@ -57,30 +58,30 @@ msgid "I'm very sad ..." msgstr "Estoy muy triste ..." msgid "I'm sad" -msgstr "Estoy triste." +msgstr "Estoy triste" msgid "I'm living the life!" -msgstr "Estoy viviendo la vida!" +msgstr "¡Estoy viviendo la vida!" msgid "I pwn therefore I am." -msgstr "Pwneo, por lo tanto, existo" +msgstr "Pwneo, luego existo." msgid "So many networks!!!" -msgstr "Cuantas redes!!!" +msgstr "¡¡¡Cuántas redes!!!" msgid "I'm having so much fun!" -msgstr "Me estoy divirtiendo mucho!" +msgstr "¡Me estoy divirtiendo mucho!" msgid "My crime is that of curiosity ..." -msgstr "Mi único crimen es la curiosidad ..." +msgstr "Mi crimen es la curiosidad ..." #, python-brace-format msgid "Hello {name}! Nice to meet you. {name}" -msgstr "Hola {name}! encantado de conocerte." +msgstr "¡Hola {name}! Encantado de conocerte. {name}" #, python-brace-format msgid "Unit {name} is nearby! {name}" -msgstr "La unidad {name} está cerca!" +msgstr "¡La unidad {name} está cerca! {name}" #, python-brace-format msgid "Uhm ... goodbye {name}" @@ -92,14 +93,14 @@ msgstr "{name} se fue ..." #, python-brace-format msgid "Whoops ... {name} is gone." -msgstr "Uy ... {name} se fue" +msgstr "Ups ... {name} se fue." #, python-brace-format msgid "{name} missed!" -msgstr "{name} perdido!" +msgstr "¡{name} perdido!" msgid "Missed!" -msgstr "Perdido!" +msgstr "¡Perdido!" msgid "Nobody wants to play with me ..." msgstr "Nadie quiere jugar conmigo ..." @@ -108,7 +109,7 @@ msgid "I feel so alone ..." msgstr "Me siento tan solo ..." msgid "Where's everybody?!" -msgstr "Dónde está todo el mundo?" +msgstr "¡¿Dónde está todo el mundo?!" #, python-brace-format msgid "Napping for {secs}s ..." @@ -133,23 +134,23 @@ msgstr "Esperando {secs}s .." #, python-brace-format msgid "Looking around ({secs}s)" -msgstr "Mirando al rededor ({secs}s)" +msgstr "Mirando alrededor ({secs}s)" #, python-brace-format msgid "Hey {what} let's be friends!" -msgstr "Oye {what} seamos amigos!" +msgstr "¡Oye {what} seamos amigos!" #, python-brace-format msgid "Associating to {what}" -msgstr "Asociando a {what}" +msgstr "Asociándome a {what}" #, python-brace-format msgid "Yo {what}!" -msgstr "Ey {what}!" +msgstr "¡Ey {what}!" #, python-brace-format msgid "Just decided that {mac} needs no WiFi!" -msgstr "Acabo de decidir que {mac} no necesita WiFi!" +msgstr "¡Acabo de decidir que {mac} no necesita WiFi!" #, python-brace-format msgid "Deauthenticating {mac}" @@ -157,14 +158,14 @@ msgstr "Desautenticando a {mac}" #, python-brace-format msgid "Kickbanning {mac}!" -msgstr "Expulsando y banneando a {mac}!" +msgstr "¡Expulsando y baneando a {mac}!" #, python-brace-format msgid "Cool, we got {num} new handshake{plural}!" -msgstr "Genial, obtuvimos {num} nuevo{plural} handshake{plural}!" +msgstr "¡Genial, obtuvimos {num} nuevo{plural} handshake{plural}!" msgid "Oops, something went wrong ... Rebooting ..." -msgstr "Oops, algo salió mal ... Reiniciándo ..." +msgstr "Oops, algo salió mal ... Reiniciando ..." #, python-brace-format msgid "Kicked {num} stations\n" @@ -179,20 +180,20 @@ msgid "Got {num} handshakes\n" msgstr "Obtuvimos {num} handshakes\n" msgid "Met 1 peer" -msgstr "Conocí 1 igual" +msgstr "Conocí 1 colega" #, python-brace-format msgid "Met {num} peers" -msgstr "Conocí {num} iguales" +msgstr "Conocí {num} colegas" #, python-brace-format msgid "" "I've been pwning for {duration} and kicked {deauthed} clients! I've also met " -"{associated} new friends and ate {handshakes} handshakes! #pwnagotchi " -"#pwnlog #pwnlife #hacktheplanet #skynet" +"{associated} new friends and ate {handshakes} handshakes! #pwnagotchi #pwnlog " +"#pwnlife #hacktheplanet #skynet" msgstr "" -"He estado pwneando por {duration} y expulsé {deauthed} clientes! También conocí" -"{associated} nuevos amigos y me comí {handshakes} handshakes! #pwnagotchi " +"¡He estado pwneando por {duration} y expulsé {deauthed} clientes! También " +"conocí {associated} nuevos amigos y comí {handshakes} handshakes! #pwnagotchi " "#pwnlog #pwnlife #hacktheplanet #skynet" msgid "hours" From 2db8f143eb6733af2a6c7bc4393f4564ce0eac36 Mon Sep 17 00:00:00 2001 From: Sam Keating-Fry Date: Sat, 29 Aug 2020 14:40:44 +0100 Subject: [PATCH 03/31] Display UPS-Lite charging status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the '%' in the battery indicator with '⚡' when the UPS-Lite is connected to an external power source. Suggestions welcome for a different character as '⚡' is a little hard to read on e-ink displays. --- pwnagotchi/plugins/default/ups_lite.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/ups_lite.py b/pwnagotchi/plugins/default/ups_lite.py index 482472f..3df7685 100644 --- a/pwnagotchi/plugins/default/ups_lite.py +++ b/pwnagotchi/plugins/default/ups_lite.py @@ -7,6 +7,8 @@ # For Raspberry Pi Zero Ups Power Expansion Board with Integrated Serial Port S3U4 # https://www.ebay.de/itm/For-Raspberry-Pi-Zero-Ups-Power-Expansion-Board-with-Integrated-Serial-Port-S3U4/323873804310 # https://www.aliexpress.com/item/32888533624.html +# +# To display external power supply status you need to bridge the necessary pins on the UPS-Lite board. See instructions in the UPS-Lite repo. import logging import struct @@ -15,6 +17,7 @@ from pwnagotchi.ui.view import BLACK import pwnagotchi.ui.fonts as fonts import pwnagotchi.plugins as plugins import pwnagotchi +import RPi.GPIO as GPIO # TODO: add enable switch in config.yml an cleanup all to the best place @@ -43,6 +46,17 @@ class UPS: except: return 0.0 + def charging(self): + try: + GPIO.setmode(GPIO.BCM) + GPIO.setup(4, GPIO.IN) + if (GPIO.input(4) == GPIO.HIGH): + return '⚡' + if (GPIO.input(4) == GPIO.LOW): + return '%' + except: + return '%' + class UPSLite(plugins.Plugin): __author__ = 'evilsocket@gmail.com' @@ -66,7 +80,8 @@ class UPSLite(plugins.Plugin): def on_ui_update(self, ui): capacity = self.ups.capacity() - ui.set('ups', "%2i%%" % capacity) + charging = self.ups.charging() + ui.set('ups', "%2i%s" % (capacity, charging)) if capacity <= self.options['shutdown']: logging.info('[ups_lite] Empty battery (<= %s%%): shuting down' % self.options['shutdown']) ui.update(force=True, new_data={'status': 'Battery exhausted, bye ...'}) From 552df65422627c7efb53b75bb52629a91d7f3f24 Mon Sep 17 00:00:00 2001 From: Yeri Tiete Date: Fri, 4 Sep 2020 17:49:41 +0800 Subject: [PATCH 04/31] Make sure IPv4 works when eth0 is connected Resolves an issue where IPv4 traffic would not work when eth0 is connected (i.e. usb-ethernet adapter over OTG). The static route for usb0 precedes the DHCP route for eth0. Only IPv6 traffic would work, but not IPv4 until the metric for usb0 is increase and thus lowered in priority. If no eth0 is plugged in, internet works fine over usb0. --- builder/data/etc/network/interfaces.d/usb0-cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/data/etc/network/interfaces.d/usb0-cfg b/builder/data/etc/network/interfaces.d/usb0-cfg index 445ed90..18c428d 100644 --- a/builder/data/etc/network/interfaces.d/usb0-cfg +++ b/builder/data/etc/network/interfaces.d/usb0-cfg @@ -4,4 +4,5 @@ iface usb0 inet static netmask 255.255.255.0 network 10.0.0.0 broadcast 10.0.0.255 - gateway 10.0.0.1 \ No newline at end of file + gateway 10.0.0.1 + metric 20 From ef4fbd96cc68ed120c80c12952b244f1a7ddef93 Mon Sep 17 00:00:00 2001 From: MannyLama Date: Fri, 11 Sep 2020 15:42:47 +0200 Subject: [PATCH 05/31] Updated dutch & fixed typos --- pwnagotchi/locale/nl/LC_MESSAGES/voice.po | 60 +++++++++++------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/pwnagotchi/locale/nl/LC_MESSAGES/voice.po b/pwnagotchi/locale/nl/LC_MESSAGES/voice.po index 57a129f..469360b 100644 --- a/pwnagotchi/locale/nl/LC_MESSAGES/voice.po +++ b/pwnagotchi/locale/nl/LC_MESSAGES/voice.po @@ -20,7 +20,7 @@ msgid "ZzzzZZzzzzZzzz" msgstr "ZzzzZZzzzzZzzz" msgid "Hi, I'm Pwnagotchi! Starting ..." -msgstr "Hoi, Ik ben Pwnagotchi! Opstarten ..." +msgstr "Hoi, Ik ben Pwnagotchi! Aan het opstarten ..." msgid "New day, new hunt, new pwns!" msgstr "Nieuwe dag, nieuwe jacht, nieuwe pwns!" @@ -32,7 +32,7 @@ msgid "AI ready." msgstr "AI is klaar." msgid "The neural network is ready." -msgstr "Neuronen netwerkis klaar voor gebruik." +msgstr "Neuronen netwerk is klaar." #, python-brace-format msgid "Hey, channel {channel} is free! Your AP will say thanks." @@ -42,37 +42,37 @@ msgid "I'm bored ..." msgstr "Ik verveel me ..." msgid "Let's go for a walk!" -msgstr "Laten we een rondje lopen!" +msgstr "Laten we gaan wandelen!" msgid "This is the best day of my life!" msgstr "Dit is de beste dag van mijn leven!" msgid "Shitty day :/" -msgstr "Ruk dag :/" +msgstr "Wat een rotdag :/" msgid "I'm extremely bored ..." msgstr "Ik verveel me kapot ..." msgid "I'm very sad ..." -msgstr "Ik ben ergverdrietig ..." +msgstr "Ik ben erg verdrietig ..." msgid "I'm sad" msgstr "Ik ben verdrietig" msgid "I'm living the life!" -msgstr "Beter kan het levenniet worden!" +msgstr "Beter kan het leven niet worden!" msgid "I pwn therefore I am." -msgstr "Ik pwn daarom besta ik." +msgstr "Ik pwn daarom ben ik er." msgid "So many networks!!!" msgstr "Zo veel netwerken!!!" msgid "I'm having so much fun!" -msgstr "Dit is zo leuk!" +msgstr "Ik heb zoveel plezier!" msgid "My crime is that of curiosity ..." -msgstr "Mijn enige misdrijf is mijn nieuwsgierigheid ..." +msgstr "Mijn misdrijf is mijn nieuwsgierigheid ..." #, python-brace-format msgid "Hello {name}! Nice to meet you. {name}" @@ -88,11 +88,11 @@ msgstr "Uhm ...tot ziens {name}" #, python-brace-format msgid "{name} is gone ..." -msgstr "{name} is weg" +msgstr "{name} is weg ..." #, python-brace-format msgid "Whoops ... {name} is gone." -msgstr "Whoopsie ...{name} is weg" +msgstr "Whoopsie ...{name} is weg." #, python-brace-format msgid "{name} missed!" @@ -102,10 +102,10 @@ msgid "Missed!" msgstr "Gemist!" msgid "Nobody wants to play with me ..." -msgstr "Niemand wil metmij spelen ..." +msgstr "Niemand wil met mij spelen ..." msgid "I feel so alone ..." -msgstr "Zo alleen ..." +msgstr "Ik voel me zo alleen ..." msgid "Where's everybody?!" msgstr "Waar is iedereen?!" @@ -119,11 +119,11 @@ msgstr "Zzzzz" #, python-brace-format msgid "ZzzZzzz ({secs}s)" -msgstr "" +msgstr "ZzzZzzz ({secs}s)" #, python-brace-format msgid "Waiting for {secs}s ..." -msgstr "Even {secs}s wachten ..." +msgstr "Ik wacht voor {secs}s ..." #, python-brace-format msgid "Looking around ({secs}s)" @@ -131,7 +131,7 @@ msgstr "Rond kijken ({secs}s)" #, python-brace-format msgid "Hey {what} let's be friends!" -msgstr "Hey {what}, laten we vriendenworden!" +msgstr "Hey {what}, laten we vrienden worden!" #, python-brace-format msgid "Associating to {what}" @@ -139,26 +139,26 @@ msgstr "Verbinden met {what}" #, python-brace-format msgid "Yo {what}!" -msgstr "" +msgstr "Yo {what}!" #, python-brace-format msgid "Just decided that {mac} needs no WiFi!" -msgstr "Ik vind dat {mac} genoeg WiFiheeft gehad!" +msgstr "Ik besloot dat {mac} geen WiFi meer nodig heeft!" #, python-brace-format msgid "Deauthenticating {mac}" -msgstr "De-autoriseren {mac}" +msgstr "Deauthenticatie van {mac}" #, python-brace-format msgid "Kickbanning {mac}!" -msgstr "Ik ga {mac} even kicken!" +msgstr "Kickbanning {mac}!" #, python-brace-format msgid "Cool, we got {num} new handshake{plural}!" -msgstr "Gaaf, we hebben {num} nieuwe handshake{plural}!" +msgstr "Cool, we hebben {num} nieuwe handshake{plural}!" msgid "Oops, something went wrong ... Rebooting ..." -msgstr "Oops, iets ging fout ...Rebooting ..." +msgstr "Oops, er ging iets fout ...Rebooting ..." #, python-brace-format msgid "Kicked {num} stations\n" @@ -166,11 +166,11 @@ msgstr "{num} stations gekicked\n" #, python-brace-format msgid "Made {num} new friends\n" -msgstr "{num} nieuwe vrienden\n" +msgstr "{num} nieuwe vrienden gemaakt.\n" #, python-brace-format msgid "Got {num} handshakes\n" -msgstr "{num} nieuwe handshakes\n" +msgstr "Ik heb {num} nieuwe handshakes\n" msgid "Met 1 peer" msgstr "1 peer ontmoet" @@ -190,19 +190,19 @@ msgstr "" "gegeten! #pwnagotchi #pwnlog #pwnlife #hacktheplanet #skynet" msgid "hours" -msgstr "" +msgstr "uren" msgid "minutes" -msgstr "" +msgstr "minuten" msgid "seconds" -msgstr "" +msgstr "seconden" msgid "hour" -msgstr "" +msgstr "uur" msgid "minute" -msgstr "" +msgstr "minuut" msgid "second" -msgstr "" +msgstr "seconde" From fddee8708ebc9e2f60c376aaba9329050facc1c6 Mon Sep 17 00:00:00 2001 From: MannyLama Date: Fri, 11 Sep 2020 15:43:44 +0200 Subject: [PATCH 06/31] Updated dutch & fixed typos --- pwnagotchi/locale/nl/LC_MESSAGES/voice.mo | Bin 3999 -> 4088 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/pwnagotchi/locale/nl/LC_MESSAGES/voice.mo b/pwnagotchi/locale/nl/LC_MESSAGES/voice.mo index 562f7f453e27d5ccc9080565f9067c7c977a6149..fdb52a95104a21de8bb5cf22b3ddeea3cc1aecf1 100644 GIT binary patch delta 1534 zcmb8uPiz!b9Ki9{unO&Vw-i}W5%)D>X{Ec&HdOgzAO=GMB=w>Y8bk8BeeRCCJJZh0 zc6Cbaff!BHOGh;7fy6{YqIj^Pi4iUmjTgc}Q(~f!crqHjc<8}{-`_HZvrTtD@4cD# z`~BYUwdad##id_1WzH#np5XHkpC5W;rqrA3?%K=nE#?J$7f10DZo$=b{ZHJ;Jd;ss z7z-%zp2WR)3Ng9;rp0L1L-1 z>HLj!zKqg=_fg_p!bXo$Ut>S>5wb}~CU7?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tyAr!J1aUHI{sr}F+X(;w From 1aea0b95b156ba7a6fe8660ea0afb27e4e1d89c8 Mon Sep 17 00:00:00 2001 From: Thomas Bouve Date: Fri, 18 Sep 2020 02:11:37 +0200 Subject: [PATCH 07/31] Small gps fixes + memtemp rework --- pwnagotchi/plugins/default/gps.py | 19 ++-- pwnagotchi/plugins/default/memtemp.py | 132 +++++++++++++++++++++----- 2 files changed, 117 insertions(+), 34 deletions(-) diff --git a/pwnagotchi/plugins/default/gps.py b/pwnagotchi/plugins/default/gps.py index d9c992b..1fb7030 100644 --- a/pwnagotchi/plugins/default/gps.py +++ b/pwnagotchi/plugins/default/gps.py @@ -57,7 +57,7 @@ class GPS(plugins.Plugin): def on_ui_setup(self, ui): # add coordinates for other displays if ui.is_waveshare_v2(): - lat_pos = (127, 75) + lat_pos = (127, 74) lon_pos = (122, 84) alt_pos = (127, 94) elif ui.is_waveshare_v1(): @@ -66,21 +66,21 @@ class GPS(plugins.Plugin): alt_pos = (130, 90) elif ui.is_inky(): lat_pos = (127, 60) - lon_pos = (127, 70) + lon_pos = (122, 70) alt_pos = (127, 80) elif ui.is_waveshare144lcd(): # guessed values, add tested ones if you can lat_pos = (67, 73) lon_pos = (62, 83) alt_pos = (67, 93) - elif ui.is_dfrobot_v2: - lat_pos = (127, 75) + elif ui.is_dfrobot_v2(): + lat_pos = (127, 74) lon_pos = (122, 84) alt_pos = (127, 94) elif ui.is_waveshare27inch(): - lat_pos = (6,120) - lon_pos = (1,135) - alt_pos = (6,150) + lat_pos = (6, 120) + lon_pos = (1, 135) + alt_pos = (6, 150) else: # guessed values, add tested ones if you can lat_pos = (127, 51) @@ -126,7 +126,6 @@ class GPS(plugins.Plugin): ), ) - def on_unload(self, ui): with ui._lock: ui.remove_element('latitude') @@ -141,5 +140,5 @@ class GPS(plugins.Plugin): # last char is sometimes not completely drawn ¯\_(ツ)_/¯ # using an ending-whitespace as workaround on each line ui.set("latitude", f"{self.coordinates['Latitude']:.4f} ") - ui.set("longitude", f" {self.coordinates['Longitude']:.4f} ") - ui.set("altitude", f" {self.coordinates['Altitude']:.1f}m ") + ui.set("longitude", f"{self.coordinates['Longitude']:.4f} ") + ui.set("altitude", f"{self.coordinates['Altitude']:.1f}m ") diff --git a/pwnagotchi/plugins/default/memtemp.py b/pwnagotchi/plugins/default/memtemp.py index f64e287..4f00ccc 100644 --- a/pwnagotchi/plugins/default/memtemp.py +++ b/pwnagotchi/plugins/default/memtemp.py @@ -17,7 +17,7 @@ # - Added horizontal and vertical orientation # ############################################################### -from pwnagotchi.ui.components import LabeledValue +from pwnagotchi.ui.components import LabeledValue, Text from pwnagotchi.ui.view import BLACK import pwnagotchi.ui.fonts as fonts import pwnagotchi.plugins as plugins @@ -40,39 +40,118 @@ class MemTemp(plugins.Plugin): def cpu_load(self): return int(pwnagotchi.cpu_load() * 100) + @staticmethod + def pad_text(width, data, symbol): + data = str(data) + symbol + return " " * (width - len(data)) + data + def on_ui_setup(self, ui): if ui.is_waveshare_v2(): - h_pos = (180, 80) - v_pos = (180, 61) + h_pos_line1 = (178, 84) + h_pos_line2 = (178, 94) + v_pos_line1 = (202, 74) # (127, 75) + v_pos_line2 = (202, 84) # (122, 84) + v_pos_line3 = (197, 94) # (127, 94) elif ui.is_waveshare_v1(): - h_pos = (170, 80) - v_pos = (170, 61) + h_pos_line1 = (170, 80) + h_pos_line2 = (170, 90) + v_pos_line1 = (170, 61) # (130, 70) + v_pos_line2 = (170, 71) # (125, 80) + v_pos_line3 = (165, 81) # (130, 90) elif ui.is_waveshare144lcd(): - h_pos = (53, 77) - v_pos = (78, 67) + h_pos_line1 = (53, 77) + h_pos_line2 = (53, 87) + v_pos_line1 = (78, 67) # (67, 73) + v_pos_line2 = (78, 77) # (62, 83) + v_pos_line3 = (73, 87) # (67, 93) elif ui.is_inky(): - h_pos = (140, 68) - v_pos = (165, 54) + h_pos_line1 = (140, 68) + h_pos_line2 = (140, 78) + v_pos_line1 = (165, 54) # (127, 60) + v_pos_line2 = (165, 64) # (122, 70) + v_pos_line3 = (160, 74) # (127, 80) elif ui.is_waveshare27inch(): - h_pos = (192, 138) - v_pos = (216, 122) + h_pos_line1 = (192, 138) + h_pos_line2 = (192, 148) + v_pos_line1 = (216, 122) # (6,120) + v_pos_line2 = (216, 132) # (1,135) + v_pos_line3 = (211, 142) # (6,150) else: - h_pos = (155, 76) - v_pos = (180, 61) + h_pos_line1 = (155, 76) + h_pos_line2 = (155, 86) + v_pos_line1 = (180, 61) # (127, 51) + v_pos_line2 = (180, 71) # (127, 56) + v_pos_line3 = (175, 81) # (102, 71) + + label_spacing = 0 if self.options['orientation'] == "vertical": - ui.add_element('memtemp', LabeledValue(color=BLACK, label='', value=' mem:-\n cpu:-\ntemp:-', - position=v_pos, - label_font=fonts.Small, text_font=fonts.Small)) + ui.add_element( + 'memtemp_line1', + LabeledValue( + color=BLACK, + label='mem:', + value='-', + position=v_pos_line1, + label_font=fonts.Small, + text_font=fonts.Small, + label_spacing=label_spacing, + ) + ) + ui.add_element( + 'memtemp_line2', + LabeledValue( + color=BLACK, + label='cpu:', + value='-', + position=v_pos_line2, + label_font=fonts.Small, + text_font=fonts.Small, + label_spacing=label_spacing, + ) + ) + ui.add_element( + 'memtemp_line3', + LabeledValue( + color=BLACK, + label='temp:', + value='-', + position=v_pos_line3, + label_font=fonts.Small, + text_font=fonts.Small, + label_spacing=label_spacing, + ) + ) else: # default to horizontal - ui.add_element('memtemp', LabeledValue(color=BLACK, label='', value='mem cpu temp\n - - -', - position=h_pos, - label_font=fonts.Small, text_font=fonts.Small)) + ui.add_element( + 'memtemp_line1', + Text( + color=BLACK, + value=' mem cpu temp', + position=h_pos_line1, + font=fonts.Small, + ) + ) + ui.add_element( + 'memtemp_line2', + Text( + color=BLACK, + value=' - - -', + position=h_pos_line2, + font=fonts.Small, + ) + ) def on_unload(self, ui): with ui._lock: - ui.remove_element('memtemp') + if self.options['orientation'] == "vertical": + ui.remove_element('memtemp_line1') + ui.remove_element('memtemp_line2') + ui.remove_element('memtemp_line3') + else: + ui.remove_element('memtemp_line1') + ui.remove_element('memtemp_line2') def on_ui_update(self, ui): if self.options['scale'] == "fahrenheit": @@ -87,9 +166,14 @@ class MemTemp(plugins.Plugin): symbol = "c" if self.options['orientation'] == "vertical": - ui.set('memtemp', - " mem:%s%%\n cpu:%s%%\ntemp:%s%s" % (self.mem_usage(), self.cpu_load(), temp, symbol)) + ui.set('memtemp_line1', f"{self.mem_usage()}%") + ui.set('memtemp_line2', f"{self.cpu_load()}%") + ui.set('memtemp_line3', f"{temp}{symbol}") else: # default to horizontal - ui.set('memtemp', - " mem cpu temp\n %s%% %s%% %s%s" % (self.mem_usage(), self.cpu_load(), temp, symbol)) + ui.set( + 'memtemp_line2', + self.pad_text(4, self.mem_usage(), "%") + + self.pad_text(5, self.cpu_load(), "%") + + self.pad_text(5, temp, symbol) + ) From 6d0e29527691b8c00df77c6fdfb8c6e72878829f Mon Sep 17 00:00:00 2001 From: Thomas Bouve Date: Fri, 18 Sep 2020 02:12:36 +0200 Subject: [PATCH 08/31] Version bumps --- pwnagotchi/plugins/default/gps.py | 2 +- pwnagotchi/plugins/default/memtemp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/plugins/default/gps.py b/pwnagotchi/plugins/default/gps.py index 1fb7030..7b6b8f6 100644 --- a/pwnagotchi/plugins/default/gps.py +++ b/pwnagotchi/plugins/default/gps.py @@ -10,7 +10,7 @@ from pwnagotchi.ui.view import BLACK class GPS(plugins.Plugin): __author__ = "evilsocket@gmail.com" - __version__ = "1.0.0" + __version__ = "1.0.1" __license__ = "GPL3" __description__ = "Save GPS coordinates whenever an handshake is captured." diff --git a/pwnagotchi/plugins/default/memtemp.py b/pwnagotchi/plugins/default/memtemp.py index 4f00ccc..b8d4e81 100644 --- a/pwnagotchi/plugins/default/memtemp.py +++ b/pwnagotchi/plugins/default/memtemp.py @@ -27,7 +27,7 @@ import logging class MemTemp(plugins.Plugin): __author__ = 'https://github.com/xenDE' - __version__ = '1.0.1' + __version__ = '1.0.2' __license__ = 'GPL3' __description__ = 'A plugin that will display memory/cpu usage and temperature' From b886b4e6739d986f96411dcf1a2d70162c591475 Mon Sep 17 00:00:00 2001 From: Thomas Bouve Date: Sat, 19 Sep 2020 23:43:24 +0200 Subject: [PATCH 09/31] Added more configurable fields --- pwnagotchi/plugins/default/memtemp.py | 255 +++++++++++++------------- 1 file changed, 130 insertions(+), 125 deletions(-) diff --git a/pwnagotchi/plugins/default/memtemp.py b/pwnagotchi/plugins/default/memtemp.py index b8d4e81..3450562 100644 --- a/pwnagotchi/plugins/default/memtemp.py +++ b/pwnagotchi/plugins/default/memtemp.py @@ -1,6 +1,6 @@ # memtemp shows memory infos and cpu temperature # -# mem usage, cpu load, cpu temp +# mem usage, cpu load, cpu temp, cpu frequency # ############################################################### # @@ -16,6 +16,13 @@ # - Added CPU load # - Added horizontal and vertical orientation # +# 19-09-2020 by crahan +# - Added CPU frequency +# - Made field types and order configurable (max 3 fields) +# - Made line spacing and position configurable +# - Refactored to dynamically generate UI elements +# - Changed horizontal UI elements to Text +# - Updated to version 1.0.2 ############################################################### from pwnagotchi.ui.components import LabeledValue, Text from pwnagotchi.ui.view import BLACK @@ -31,129 +38,27 @@ class MemTemp(plugins.Plugin): __license__ = 'GPL3' __description__ = 'A plugin that will display memory/cpu usage and temperature' + ALLOWED_FIELDS = { + 'mem': 'mem_usage', + 'cpu': 'cpu_load', + 'temp': 'cpu_temp', + 'freq': 'cpu_freq' + } + DEFAULT_FIELDS = ['mem', 'cpu', 'temp'] + LINE_SPACING = 10 + LABEL_SPACING = 0 + FIELD_WIDTH = 4 + def on_loaded(self): logging.info("memtemp plugin loaded.") def mem_usage(self): - return int(pwnagotchi.mem_usage() * 100) + return f"{int(pwnagotchi.mem_usage() * 100)}%" def cpu_load(self): - return int(pwnagotchi.cpu_load() * 100) + return f"{int(pwnagotchi.cpu_load() * 100)}%" - @staticmethod - def pad_text(width, data, symbol): - data = str(data) + symbol - return " " * (width - len(data)) + data - - def on_ui_setup(self, ui): - if ui.is_waveshare_v2(): - h_pos_line1 = (178, 84) - h_pos_line2 = (178, 94) - v_pos_line1 = (202, 74) # (127, 75) - v_pos_line2 = (202, 84) # (122, 84) - v_pos_line3 = (197, 94) # (127, 94) - elif ui.is_waveshare_v1(): - h_pos_line1 = (170, 80) - h_pos_line2 = (170, 90) - v_pos_line1 = (170, 61) # (130, 70) - v_pos_line2 = (170, 71) # (125, 80) - v_pos_line3 = (165, 81) # (130, 90) - elif ui.is_waveshare144lcd(): - h_pos_line1 = (53, 77) - h_pos_line2 = (53, 87) - v_pos_line1 = (78, 67) # (67, 73) - v_pos_line2 = (78, 77) # (62, 83) - v_pos_line3 = (73, 87) # (67, 93) - elif ui.is_inky(): - h_pos_line1 = (140, 68) - h_pos_line2 = (140, 78) - v_pos_line1 = (165, 54) # (127, 60) - v_pos_line2 = (165, 64) # (122, 70) - v_pos_line3 = (160, 74) # (127, 80) - elif ui.is_waveshare27inch(): - h_pos_line1 = (192, 138) - h_pos_line2 = (192, 148) - v_pos_line1 = (216, 122) # (6,120) - v_pos_line2 = (216, 132) # (1,135) - v_pos_line3 = (211, 142) # (6,150) - else: - h_pos_line1 = (155, 76) - h_pos_line2 = (155, 86) - v_pos_line1 = (180, 61) # (127, 51) - v_pos_line2 = (180, 71) # (127, 56) - v_pos_line3 = (175, 81) # (102, 71) - - label_spacing = 0 - - if self.options['orientation'] == "vertical": - ui.add_element( - 'memtemp_line1', - LabeledValue( - color=BLACK, - label='mem:', - value='-', - position=v_pos_line1, - label_font=fonts.Small, - text_font=fonts.Small, - label_spacing=label_spacing, - ) - ) - ui.add_element( - 'memtemp_line2', - LabeledValue( - color=BLACK, - label='cpu:', - value='-', - position=v_pos_line2, - label_font=fonts.Small, - text_font=fonts.Small, - label_spacing=label_spacing, - ) - ) - ui.add_element( - 'memtemp_line3', - LabeledValue( - color=BLACK, - label='temp:', - value='-', - position=v_pos_line3, - label_font=fonts.Small, - text_font=fonts.Small, - label_spacing=label_spacing, - ) - ) - else: - # default to horizontal - ui.add_element( - 'memtemp_line1', - Text( - color=BLACK, - value=' mem cpu temp', - position=h_pos_line1, - font=fonts.Small, - ) - ) - ui.add_element( - 'memtemp_line2', - Text( - color=BLACK, - value=' - - -', - position=h_pos_line2, - font=fonts.Small, - ) - ) - - def on_unload(self, ui): - with ui._lock: - if self.options['orientation'] == "vertical": - ui.remove_element('memtemp_line1') - ui.remove_element('memtemp_line2') - ui.remove_element('memtemp_line3') - else: - ui.remove_element('memtemp_line1') - ui.remove_element('memtemp_line2') - - def on_ui_update(self, ui): + def cpu_temp(self): if self.options['scale'] == "fahrenheit": temp = (pwnagotchi.temperature() * 9 / 5) + 32 symbol = "f" @@ -164,16 +69,116 @@ class MemTemp(plugins.Plugin): # default to celsius temp = pwnagotchi.temperature() symbol = "c" + return f"{temp}{symbol}" + + def cpu_freq(self): + with open('/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq', 'rt') as fp: + return f"{round(float(fp.readline())/1000000, 1)}G" + + def pad_text(self, data): + return " " * (self.FIELD_WIDTH - len(data)) + data + + def on_ui_setup(self, ui): + try: + # Configure field list + self.fields = self.options['fields'].split(',') + self.fields = [x.strip() for x in self.fields if x.strip() in self.ALLOWED_FIELDS.keys()] + self.fields = self.fields[:3] # limit to the first 3 fields + except Exception: + # Set default value + self.fields = self.DEFAULT_FIELDS + + try: + # Configure line_spacing + line_spacing = int(self.options['linespacing']) + except Exception: + # Set default value + line_spacing = self.LINE_SPACING + + try: + # Configure position + pos = self.options['position'].split(',') + pos = [int(x.strip()) for x in pos] + if self.options['orientation'] == "vertical": + v_pos = (pos[0], pos[1]) + else: + h_pos = (pos[0], pos[1]) + except Exception: + # Set default position based on screen type + if ui.is_waveshare_v2(): + h_pos = (178, 84) + v_pos = (197, 74) + elif ui.is_waveshare_v1(): + h_pos = (170, 80) + v_pos = (165, 61) + elif ui.is_waveshare144lcd(): + h_pos = (53, 77) + v_pos = (73, 67) + elif ui.is_inky(): + h_pos = (140, 68) + v_pos = (160, 54) + elif ui.is_waveshare27inch(): + h_pos = (192, 138) + v_pos = (211, 122) + else: + h_pos = (155, 76) + v_pos = (175, 61) if self.options['orientation'] == "vertical": - ui.set('memtemp_line1', f"{self.mem_usage()}%") - ui.set('memtemp_line2', f"{self.cpu_load()}%") - ui.set('memtemp_line3', f"{temp}{symbol}") + for idx, field in enumerate(self.fields): + v_pos_x = v_pos[0] + v_pos_y = v_pos[1] + ((len(self.fields) - 3) * -1 * line_spacing) + ui.add_element( + f"memtemp_{field}", + LabeledValue( + color=BLACK, + label=f"{self.pad_text(field)}:", + value="-", + position=(v_pos_x, v_pos_y + (idx * line_spacing)), + label_font=fonts.Small, + text_font=fonts.Small, + label_spacing=self.LABEL_SPACING, + ) + ) + logging.info(f"memtemp: created '{field}'") else: # default to horizontal - ui.set( - 'memtemp_line2', - self.pad_text(4, self.mem_usage(), "%") + - self.pad_text(5, self.cpu_load(), "%") + - self.pad_text(5, temp, symbol) + h_pos_x = h_pos[0] + h_pos_y = h_pos[1] + ui.add_element( + 'memtemp_header', + Text( + color=BLACK, + value=" ".join([self.pad_text(x) for x in self.fields]), + position=(h_pos_x, h_pos_y), + font=fonts.Small, + ) ) + ui.add_element( + 'memtemp_data', + Text( + color=BLACK, + value=" ".join([self.pad_text("-") for x in self.fields]), + position=(h_pos_x, h_pos_y + line_spacing), + font=fonts.Small, + ) + ) + + def on_unload(self, ui): + with ui._lock: + if self.options['orientation'] == "vertical": + for idx, field in enumerate(self.fields): + ui.remove_element(f"memtemp_{field}") + else: + # default to horizontal + ui.remove_element('memtemp_header') + ui.remove_element('memtemp_data') + + def on_ui_update(self, ui): + if self.options['orientation'] == "vertical": + for idx, field in enumerate(self.fields): + ui.set(f"memtemp_{field}", getattr(self, self.ALLOWED_FIELDS[field])()) + else: + # default to horizontal + data = " ".join([self.pad_text(getattr(self, self.ALLOWED_FIELDS[x])()) for x in self.fields]) + ui.set('memtemp_data', data) From c124a9751478ca8c0bc2d21828c4d0b8edbce0cc Mon Sep 17 00:00:00 2001 From: Thomas Bouve Date: Sun, 20 Sep 2020 00:25:52 +0200 Subject: [PATCH 10/31] Changelog update. --- pwnagotchi/plugins/default/memtemp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/memtemp.py b/pwnagotchi/plugins/default/memtemp.py index 3450562..5b8f3eb 100644 --- a/pwnagotchi/plugins/default/memtemp.py +++ b/pwnagotchi/plugins/default/memtemp.py @@ -20,7 +20,7 @@ # - Added CPU frequency # - Made field types and order configurable (max 3 fields) # - Made line spacing and position configurable -# - Refactored to dynamically generate UI elements +# - Updated code to dynamically generate UI elements # - Changed horizontal UI elements to Text # - Updated to version 1.0.2 ############################################################### From 1c4df7a1c43daa407f8177d89965ac6a606bfbc8 Mon Sep 17 00:00:00 2001 From: Thomas Bouve Date: Sun, 20 Sep 2020 00:27:26 +0200 Subject: [PATCH 11/31] Additional comments --- pwnagotchi/plugins/default/memtemp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pwnagotchi/plugins/default/memtemp.py b/pwnagotchi/plugins/default/memtemp.py index 5b8f3eb..d7be552 100644 --- a/pwnagotchi/plugins/default/memtemp.py +++ b/pwnagotchi/plugins/default/memtemp.py @@ -125,6 +125,7 @@ class MemTemp(plugins.Plugin): v_pos = (175, 61) if self.options['orientation'] == "vertical": + # Dynamically create the required LabeledValue objects for idx, field in enumerate(self.fields): v_pos_x = v_pos[0] v_pos_y = v_pos[1] + ((len(self.fields) - 3) * -1 * line_spacing) From 72878454f91f4837e914e7d53b49b93f0abf5959 Mon Sep 17 00:00:00 2001 From: Thomas Bouve Date: Sun, 20 Sep 2020 00:29:33 +0200 Subject: [PATCH 12/31] Removed debug line. --- pwnagotchi/plugins/default/memtemp.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pwnagotchi/plugins/default/memtemp.py b/pwnagotchi/plugins/default/memtemp.py index d7be552..59bac6d 100644 --- a/pwnagotchi/plugins/default/memtemp.py +++ b/pwnagotchi/plugins/default/memtemp.py @@ -141,7 +141,6 @@ class MemTemp(plugins.Plugin): label_spacing=self.LABEL_SPACING, ) ) - logging.info(f"memtemp: created '{field}'") else: # default to horizontal h_pos_x = h_pos[0] From 1a0083eb382db12a2fd6d58f02fd44ca493bee82 Mon Sep 17 00:00:00 2001 From: Thomas Bouve Date: Sun, 20 Sep 2020 01:43:52 +0200 Subject: [PATCH 13/31] Fix correct x positioning Align fields right when less than 3 fields are shown in horizontal mode, using a 5-pixel character width with a 5-character width for each field (i.e. 25 pixels per field). --- pwnagotchi/plugins/default/memtemp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/memtemp.py b/pwnagotchi/plugins/default/memtemp.py index 59bac6d..898df2f 100644 --- a/pwnagotchi/plugins/default/memtemp.py +++ b/pwnagotchi/plugins/default/memtemp.py @@ -143,7 +143,7 @@ class MemTemp(plugins.Plugin): ) else: # default to horizontal - h_pos_x = h_pos[0] + h_pos_x = h_pos[0] + ((len(self.fields) - 3) * -1 * 25) h_pos_y = h_pos[1] ui.add_element( 'memtemp_header', From 7da3cc5565283b3e5bae403fc204275adec60b07 Mon Sep 17 00:00:00 2001 From: Thomas Bouve Date: Sun, 20 Sep 2020 20:25:25 +0200 Subject: [PATCH 14/31] Revert. Changes are handled in a separate branch --- pwnagotchi/plugins/default/gps.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pwnagotchi/plugins/default/gps.py b/pwnagotchi/plugins/default/gps.py index 7b6b8f6..d9c992b 100644 --- a/pwnagotchi/plugins/default/gps.py +++ b/pwnagotchi/plugins/default/gps.py @@ -10,7 +10,7 @@ from pwnagotchi.ui.view import BLACK class GPS(plugins.Plugin): __author__ = "evilsocket@gmail.com" - __version__ = "1.0.1" + __version__ = "1.0.0" __license__ = "GPL3" __description__ = "Save GPS coordinates whenever an handshake is captured." @@ -57,7 +57,7 @@ class GPS(plugins.Plugin): def on_ui_setup(self, ui): # add coordinates for other displays if ui.is_waveshare_v2(): - lat_pos = (127, 74) + lat_pos = (127, 75) lon_pos = (122, 84) alt_pos = (127, 94) elif ui.is_waveshare_v1(): @@ -66,21 +66,21 @@ class GPS(plugins.Plugin): alt_pos = (130, 90) elif ui.is_inky(): lat_pos = (127, 60) - lon_pos = (122, 70) + lon_pos = (127, 70) alt_pos = (127, 80) elif ui.is_waveshare144lcd(): # guessed values, add tested ones if you can lat_pos = (67, 73) lon_pos = (62, 83) alt_pos = (67, 93) - elif ui.is_dfrobot_v2(): - lat_pos = (127, 74) + elif ui.is_dfrobot_v2: + lat_pos = (127, 75) lon_pos = (122, 84) alt_pos = (127, 94) elif ui.is_waveshare27inch(): - lat_pos = (6, 120) - lon_pos = (1, 135) - alt_pos = (6, 150) + lat_pos = (6,120) + lon_pos = (1,135) + alt_pos = (6,150) else: # guessed values, add tested ones if you can lat_pos = (127, 51) @@ -126,6 +126,7 @@ class GPS(plugins.Plugin): ), ) + def on_unload(self, ui): with ui._lock: ui.remove_element('latitude') @@ -140,5 +141,5 @@ class GPS(plugins.Plugin): # last char is sometimes not completely drawn ¯\_(ツ)_/¯ # using an ending-whitespace as workaround on each line ui.set("latitude", f"{self.coordinates['Latitude']:.4f} ") - ui.set("longitude", f"{self.coordinates['Longitude']:.4f} ") - ui.set("altitude", f"{self.coordinates['Altitude']:.1f}m ") + ui.set("longitude", f" {self.coordinates['Longitude']:.4f} ") + ui.set("altitude", f" {self.coordinates['Altitude']:.1f}m ") From 3bd9cd4f183b7a33d02eb07a0d2cb2410c6b10ee Mon Sep 17 00:00:00 2001 From: HeroCC Date: Sat, 3 Oct 2020 17:01:42 +0200 Subject: [PATCH 15/31] Tweak Wigle plugin Adds a new 'donate' option to allow Wigle to include data for commercial use. Also changes data header to reflect this is a pwnagotchi plugin. Signed-off-by: HeroCC --- pwnagotchi/defaults.toml | 1 + pwnagotchi/plugins/default/wigle.py | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pwnagotchi/defaults.toml b/pwnagotchi/defaults.toml index 40a4240..e471659 100644 --- a/pwnagotchi/defaults.toml +++ b/pwnagotchi/defaults.toml @@ -52,6 +52,7 @@ main.plugins.wpa-sec.whitelist = [] main.plugins.wigle.enabled = false main.plugins.wigle.api_key = "" main.plugins.wigle.whitelist = [] +main.plugins.wigle.donate = true main.plugins.bt-tether.enabled = false diff --git a/pwnagotchi/plugins/default/wigle.py b/pwnagotchi/plugins/default/wigle.py index f281757..103e7db 100644 --- a/pwnagotchi/plugins/default/wigle.py +++ b/pwnagotchi/plugins/default/wigle.py @@ -9,6 +9,7 @@ from datetime import datetime from pwnagotchi.utils import WifiInfo, FieldNotFoundError, extract_from_pcap, StatusFile, remove_whitelisted from threading import Lock from pwnagotchi import plugins +from pwnagotchi._version import __version__ as __pwnagotchi_version__ def _extract_gps_data(path): @@ -34,14 +35,14 @@ def _format_auth(data): return out -def _transform_wigle_entry(gps_data, pcap_data): +def _transform_wigle_entry(gps_data, pcap_data, plugin_version): """ Transform to wigle entry in file """ dummy = StringIO() # write kismet header dummy.write( - "WigleWifi-1.4,appRelease=20190201,model=Kismet,release=2019.02.01.{},device=kismet,display=kismet,board=kismet,brand=kismet\n") + "WigleWifi-1.4,appRelease={},model=pwnagotchi,release={},device=pwnagotchi,display=kismet,board=kismet,brand=pwnagotchi\n".format(plugin_version, __pwnagotchi_version__)) dummy.write( "MAC,SSID,AuthMode,FirstSeen,Channel,RSSI,CurrentLatitude,CurrentLongitude,AltitudeMeters,AccuracyMeters,Type") @@ -62,7 +63,7 @@ def _transform_wigle_entry(gps_data, pcap_data): return dummy.getvalue() -def _send_to_wigle(lines, api_key, timeout=30): +def _send_to_wigle(lines, api_key, donate=True, timeout=30): """ Uploads the file to wigle-net """ @@ -76,7 +77,7 @@ def _send_to_wigle(lines, api_key, timeout=30): headers = {'Authorization': f"Basic {api_key}", 'Accept': 'application/json'} - data = {'donate': 'false'} + data = {'donate': 'on' if donate else 'false'} payload = {'file': dummy, 'type': 'text/csv'} try: @@ -112,6 +113,9 @@ class Wigle(plugins.Plugin): if not 'whitelist' in self.options: self.options['whitelist'] = list() + if not 'donate' in self.options: + self.options['donate'] = True + self.ready = True def on_internet_available(self, agent): @@ -172,14 +176,14 @@ class Wigle(plugins.Plugin): logging.debug("WIGLE: %s", sc_e) self.skip.append(gps_file) continue - new_entry = _transform_wigle_entry(gps_data, pcap_data) + new_entry = _transform_wigle_entry(gps_data, pcap_data, self.__version__) csv_entries.append(new_entry) no_err_entries.append(gps_file) if csv_entries: display.set('status', "Uploading gps-data to wigle.net ...") display.update(force=True) try: - _send_to_wigle(csv_entries, self.options['api_key']) + _send_to_wigle(csv_entries, self.options['api_key'], donate=self.options['donate']) reported += no_err_entries self.report.update(data={'reported': reported}) logging.info("WIGLE: Successfully uploaded %d files", len(no_err_entries)) From 2ddf040facb1485d9dc6e928bb548d25b515428c Mon Sep 17 00:00:00 2001 From: Andrew Jaswa Date: Fri, 9 Oct 2020 21:13:31 -0600 Subject: [PATCH 16/31] swap out header file for one that doesn't tie up gpio pins 14 and 15 for waveshare_2 Signed-off-by: Andrew Jaswa --- builder/pwnagotchi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index a294153..6625e50 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -178,7 +178,7 @@ chdir: /usr/local/src/gratis target: rpi params: - EPD_IO: epd_io.h + EPD_IO: epd_io_free_uart.h PANEL_VERSION: 'V231_G2' when: gratisgit.changed @@ -187,7 +187,7 @@ chdir: /usr/local/src/gratis target: rpi-install params: - EPD_IO: epd_io.h + EPD_IO: epd_io_free_uart.h PANEL_VERSION: 'V231_G2' when: gratisgit.changed From f701390d5ae98ef4c012e5a66aef90d603101eae Mon Sep 17 00:00:00 2001 From: ShaqKSmith <71436730+ShaqKSmith@users.noreply.github.com> Date: Mon, 2 Nov 2020 15:01:12 +0800 Subject: [PATCH 17/31] Create voice.po --- pwnagotchi/locale/tw/LC_MESSAGES/voice.po | 227 ++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 pwnagotchi/locale/tw/LC_MESSAGES/voice.po diff --git a/pwnagotchi/locale/tw/LC_MESSAGES/voice.po b/pwnagotchi/locale/tw/LC_MESSAGES/voice.po new file mode 100644 index 0000000..360890c --- /dev/null +++ b/pwnagotchi/locale/tw/LC_MESSAGES/voice.po @@ -0,0 +1,227 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , 2020. +# 有很多翻譯不到味,如果有繁體愛好者,歡迎之後大家一起翻譯! + +msgid "" +msgstr "" +"Project-Id-Version: 0.0.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-10-21 15:56+0200\n" +"PO-Revision-Date: 2020-10-22 10:00+0008\n" +"Last-Translator: ShaqKSmith \n" +"Language-Team: LANGUAGE \n" +"Language: traditional chinese\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "ZzzzZZzzzzZzzz" +msgstr "ZzzzZZzzzzZzzz" + +msgid "Hi, I'm Pwnagotchi! Starting ..." +msgstr "HI!我是Pwnagotchi!\n程式啟動..." + +msgid "New day, new hunt, new pwns!" +msgstr "新的一天!\n新的狩獵!新的入侵!" + +msgid "Hack the Planet!" +msgstr "我要駭入\n地球的所有人!" + +msgid "AI ready." +msgstr "人工智慧已啟動." + +msgid "The neural network is ready." +msgstr "神經網路已啟動." + +msgid "Generating keys, do not turn off ..." +msgstr "產生金鑰中,\n請勿關閉..." + +#, python-brace-format +msgid "Hey, channel {channel} is free! Your AP will say thanks." +msgstr "嘿,{channel}很順暢!\n你的WIFI會感謝你的." + +msgid "I'm bored ..." +msgstr "我好無聊..." + +msgid "Let's go for a walk!" +msgstr "我們出去走走吧!" + +msgid "This is the best day of my life!" +msgstr "這是我生命中最美好的一天!" + +msgid "Shitty day :/" +msgstr "糟糕的一天 :/" + +msgid "I'm extremely bored ..." +msgstr "我超無聊的..." + +msgid "I'm very sad ..." +msgstr "我好難過..." + +msgid "I'm sad" +msgstr "傷心。" + +msgid "I'm living the life!" +msgstr "真是充實的一生!" + +msgid "I pwn therefore I am." +msgstr "我駭故我在." + +msgid "So many networks!!!" +msgstr "好多網路啊!!!" + +msgid "I'm having so much fun!" +msgstr "我玩的超級開心!" + +msgid "My crime is that of curiosity ..." +msgstr "我的缺點就是\n太好奇了..." + +#, python-brace-format +msgid "Hello {name}! Nice to meet you." +msgstr "Hello{name}!\n很高興認識你." + +#, python-brace-format +msgid "Unit {name} is nearby!" +msgstr "{name}\n就在附近!" + +#, python-brace-format +msgid "Uhm ... goodbye {name}" +msgstr "啊 ... \n拜拜{name}" + +#, python-brace-format +msgid "{name} is gone ..." +msgstr "{name}\n不見了 ..." + +#, python-brace-format +msgid "Whoops ... {name} is gone." +msgstr "歐哦...\n{name}\n不見了." + +#, python-brace-format +msgid "{name} missed!" +msgstr "我剛剛錯過了{name}!" + +msgid "Missed!" +msgstr "又錯過了!" + +msgid "Good friends are a blessing!" +msgstr "有個好朋友\n真幸福!" + +msgid "I love my friends!" +msgstr "我喜歡\n我的朋友!" + +msgid "Nobody wants to play with me ..." +msgstr "沒人想跟我玩..." + +msgid "I feel so alone ..." +msgstr "我感覺好孤單..." + +msgid "Where's everybody?!" +msgstr "大家都去哪裡了?!" + +#, python-brace-format +msgid "Napping for {secs}s ..." +msgstr "我想瞇{secs}秒一下..." + +msgid "Zzzzz" +msgstr "Zzzzz" + +#, python-brace-format +msgid "ZzzZzzz ({secs}s)" +msgstr "ZzzZzzz({secs}秒)" + +msgid "Good night." +msgstr "晚安." + +msgid "Zzz" +msgstr "Zzz" + +#, python-brace-format +msgid "Waiting for {secs}s ..." +msgstr "等我{secs}秒..." + +#, python-brace-format +msgid "Looking around ({secs}s)" +msgstr "環顧四周({secs}秒)" + +#, python-brace-format +msgid "Hey {what} let's be friends!" +msgstr "嗨\n{what}\n讓我我們來當朋友吧!" + +#, python-brace-format +msgid "Associating to {what}" +msgstr "正在連接\n{what}" + +#, python-brace-format +msgid "Yo {what}!" +msgstr "喲,\n{what}!" + +#, python-brace-format +msgid "Just decided that {mac} needs no WiFi!" +msgstr "我要讓\n{mac}\n斷線!\n他不需要上網!" + +#, python-brace-format +msgid "Deauthenticating {mac}" +msgstr "解除\n{mac}\n的授權中" + +#, python-brace-format +msgid "Kickbanning {mac}!" +msgstr "把\n{mac}\n踢出中!" + +#, python-brace-format +msgid "Cool, we got {num} new handshake{plural}!" +msgstr "酷哦,我們抓到{num}個\n新的握手包{plural}!" + +#, python-brace-format +msgid "You have {count} new message{plural}!" +msgstr "你有{count}個新訊息{plural}!" + +msgid "Oops, something went wrong ... Rebooting ..." +msgstr "喔歐,有些地方出錯了...\n重新啟動中..." + +#, python-brace-format +msgid "Kicked {num} stations\n" +msgstr "踢了 {num} 個設備\n" + +#, python-brace-format +msgid "Made {num} new friends\n" +msgstr "交了 {num} 個新朋友\n" + +#, python-brace-format +msgid "Got {num} handshakes\n" +msgstr "捕獲了 {num} 個握手包\n" + +msgid "Met 1 peer 同好" +msgstr "遇到了 1 個" + +#, python-brace-format +msgid "Met {num} peers" +msgstr "遇到了 {num} 個同好" + +#, python-brace-format +msgid "" +"I've been pwning for {duration} and kicked {deauthed} clients! I've also met " +"{associated} new friends and ate {handshakes} handshakes! #pwnagotchi " +"#pwnlog #pwnlife #hacktheplanet #skynet" +msgstr "我花了{duration}的時間\n駭入和踢了{deauthed}好多設備.\n" +"我還交了好多{associated}新朋友,\n而且抓到了{handshakes}握手包!" +"#pwnagotchi#入侵日志 #駭客人生 #入侵整個星球 #天網" + +msgid "hours" +msgstr "時" + +msgid "minutes" +msgstr "分" + +msgid "seconds" +msgstr "秒" + +msgid "hour" +msgstr "時" + +msgid "minute" +msgstr "分" + +msgid "second" +msgstr "秒" From 819be761ed53ced59c9b5767a8b7f9092733466c Mon Sep 17 00:00:00 2001 From: theusu5k Date: Mon, 9 Nov 2020 20:25:22 +0100 Subject: [PATCH 18/31] Update voice.po Some words were translated too literal. Some menor corrections --- pwnagotchi/locale/es/LC_MESSAGES/voice.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pwnagotchi/locale/es/LC_MESSAGES/voice.po b/pwnagotchi/locale/es/LC_MESSAGES/voice.po index fbf182c..9ecffa8 100644 --- a/pwnagotchi/locale/es/LC_MESSAGES/voice.po +++ b/pwnagotchi/locale/es/LC_MESSAGES/voice.po @@ -23,7 +23,7 @@ msgid "Hi, I'm Pwnagotchi! Starting ..." msgstr "Hola, soy Pwnagotchi! Empezando ..." msgid "New day, new hunt, new pwns!" -msgstr "Nuevo día, nueva cazería, nuevos pwns!" +msgstr "Nuevo día, nueva caceria, nuevos pwns!" msgid "Hack the Planet!" msgstr "Hackea el planeta!" @@ -51,7 +51,7 @@ msgid "Shitty day :/" msgstr "Día de mierda :/" msgid "I'm extremely bored ..." -msgstr "Estoy extremadamente aburrido ..." +msgstr "Estoy muy aburrido ..." msgid "I'm very sad ..." msgstr "Estoy muy triste ..." @@ -63,7 +63,7 @@ msgid "I'm living the life!" msgstr "Estoy viviendo la vida!" msgid "I pwn therefore I am." -msgstr "Pwneo, por lo tanto, existo" +msgstr "Pwneo y luego existo" msgid "So many networks!!!" msgstr "Cuantas redes!!!" @@ -112,7 +112,7 @@ msgstr "Dónde está todo el mundo?" #, python-brace-format msgid "Napping for {secs}s ..." -msgstr "Tomándo una siesta por {secs}s ..." +msgstr "Descansando durante {secs}s ..." msgid "Zzzzz" msgstr "Zzzzz" @@ -164,7 +164,7 @@ msgid "Cool, we got {num} new handshake{plural}!" msgstr "Genial, obtuvimos {num} nuevo{plural} handshake{plural}!" msgid "Oops, something went wrong ... Rebooting ..." -msgstr "Oops, algo salió mal ... Reiniciándo ..." +msgstr "Oops, algo salió mal ... Reiniciando ..." #, python-brace-format msgid "Kicked {num} stations\n" @@ -172,11 +172,11 @@ msgstr "Expulsamos {num} estaciones\n" #, python-brace-format msgid "Made {num} new friends\n" -msgstr "Hicimos {num} nuevos amigos\n" +msgstr "Hice {num} nuevos amigos\n" #, python-brace-format msgid "Got {num} handshakes\n" -msgstr "Obtuvimos {num} handshakes\n" +msgstr "Consegui {num} handshakes\n" msgid "Met 1 peer" msgstr "Conocí 1 igual" From ba13b125932c43e41f20790cc099d356ab253023 Mon Sep 17 00:00:00 2001 From: MatthewNunu <39465039+MatthewNunu@users.noreply.github.com> Date: Thu, 12 Nov 2020 12:05:29 +0200 Subject: [PATCH 19/31] added afrikaans lang --- pwnagotchi/locale/af/LC_MESSAGES/voice.mo | Bin 0 -> 5010 bytes pwnagotchi/locale/af/LC_MESSAGES/voice.po | 248 ++++++++++++++++++++++ 2 files changed, 248 insertions(+) create mode 100644 pwnagotchi/locale/af/LC_MESSAGES/voice.mo create mode 100644 pwnagotchi/locale/af/LC_MESSAGES/voice.po diff --git a/pwnagotchi/locale/af/LC_MESSAGES/voice.mo b/pwnagotchi/locale/af/LC_MESSAGES/voice.mo new file mode 100644 index 0000000000000000000000000000000000000000..d55da598c7007b0b7ab46e551dfd49976867722f GIT binary patch literal 5010 zcmbW4O^h5z6~{Xye0YH*IOZdSj~bg`o9yf+*uiG=Vb7; zHR|f#$#@uX04WDJfpXwvA%Or#f^di;J}(9V0uc~MTo3{T2<1!^BslPU)jhjo0}-O- z+Fy5db=9l){`KDYcl&R9Cg3_ldl&8aYl2`KuH42SuIFAG1pDAO;alN%;8FNX_%`?t z_&&J*b>;Ub;2U|~f-?T&@J_e`-wU6H?}lH2vfdBjN%%*o;61Mog1g|ua6jCDGEWn} z84lpv;nNkb!UH_N0Plc5gZvAA%O6?yPw?CDW%z#h+#AYye*?w-m#XJm*rd#J0KNkr zg|g0RI0Y|3ncqN}zkoG3f->$Zl>NK_75p`vhA+b-@F0`OzRyG1M+9Y`eJ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_82@4K|Vwm7vy=<8dVPFN6ra9`ZZw-1_m6Jnfk$aRrBq=|0CV!;J zTlJHBkL&o&4U&~BFj#<)^m376$F-F*~x{N+a&bSXdDAY?@N8^Li zv4+x0dAK~FxcV1mb&dH@e9$)>{mMdFLQ^VZoobHm4HdR66@^THj>Rakj`tzO75m)v zYh{Hsv7F0|-AYhX^E%x@3*HxtvD(4&WsOawVu^?7L+i zvIdgNokY2`k{-XtP2Fg~jVrHwKT&zvpx4)4)s2&g&=aY)ak1^y6syY+%F#G@H_X0_c8^NmD&u^Q79@3qw8N&s8Xdx;m~i!uUiw9TDp*E-SehZzX`nEYZ8V~ zw<*kWcX{`&s?iaa@;icGo&Hx8J9hjy*vkTCjgAZ@T*8e^V}unFGVcjoqn1p@($V-x zc;Vbwr*nRNhlS%~zC*=jDPEBqzI3R{*J*@3F4G&9cjO~6y)4xJC`g?a3#3jja1hEm zE%g23qH*?IAaLGeWuf*?@UCNv<@p(xYOEvVq?58d1&b#2PAwnHdacW9&Hr%7+yCa| ziyU)VOebBP{I^owH>Ar~snq8N<(V7TX$coUfI`x8uO`L!f34631zMVv=OQ0hX&hui WLv@Z(tC=j%80KSFRp)joyng{H5GNu4 literal 0 HcmV?d00001 diff --git a/pwnagotchi/locale/af/LC_MESSAGES/voice.po b/pwnagotchi/locale/af/LC_MESSAGES/voice.po new file mode 100644 index 0000000..1efce8b --- /dev/null +++ b/pwnagotchi/locale/af/LC_MESSAGES/voice.po @@ -0,0 +1,248 @@ +# Afrikaans translation of pwnagotchi. +# Copyright (C) 2020. +# This file is distributed under the same license as the pwnagotchi package. +# FIRST AUTHOR MatthewNunu https://github.com/MatthewNunu, 2020. +# +msgid "" +msgstr "" +"Project-Id-Version: 1.5.3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-29 21:50+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: MatthewNunu https://github.com/MatthewNunu\n" +"Language-Team: \n" +"Language: Afrikaans\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "ZzzzZZzzzzZzzz" +msgstr "ZzzzZZzzzzZzzz" + +msgid "Hi, I'm Pwnagotchi! Starting ..." +msgstr "Hi, ek is Pwnagotchi! Aanvang ..." + +msgid "New day, new hunt, new pwns!" +msgstr "Nuwe dag, nuwe jag, nuwe pwns!" + +msgid "Hack the Planet!" +msgstr "Hack die wêreld!" + +msgid "AI ready." +msgstr "AI gereed." + +msgid "The neural network is ready." +msgstr "Die neurale netwerk is gereed." + +msgid "Generating keys, do not turn off ..." +msgstr "Genereer wagwoord, moenie afskakel nie ..." + +#, python-brace-format +msgid "Hey, channel {channel} is free! Your AP will say thanks." +msgstr "Haai, kanaal {channel} is gratis! Jou AP sal dankie sê." + +msgid "Reading last session logs ..." +msgstr "Lees laaste sessie logs ..." + +#, python-brace-format +msgid "Read {lines_so_far} log lines so far ..." +msgstr "Ek het {lines_so_far} tot dusver gelees ..." + +msgid "I'm bored ..." +msgstr "Ek's verveeld ..." + +msgid "Let's go for a walk!" +msgstr "Kom ons gaan vir 'n loopie!" + +msgid "This is the best day of my life!" +msgstr "Dit is die beste dag van my lewe!" + +msgid "Shitty day :/" +msgstr "Poes kak dag :/" + +msgid "I'm extremely bored ..." +msgstr "Ek's baie verveeld ..." + +msgid "I'm very sad ..." +msgstr "Ek's baie hartseer ..." + +msgid "I'm sad" +msgstr "Ek's hartseer ..." + +msgid "Leave me alone ..." +msgstr "Los my uit ..." + +msgid "I'm mad at you!" +msgstr "Ek is kwaad vir jou!" + +msgid "I'm living the life!" +msgstr "Ek leef die lewe!" + +msgid "I pwn therefore I am." +msgstr "Ek pwn daarom is ek." + +msgid "So many networks!!!" +msgstr "Soveel netwerke!!!" + +msgid "I'm having so much fun!" +msgstr "Ek het soveel pret!" + +msgid "My crime is that of curiosity ..." +msgstr "My misdaad is dié van nuuskierigheid ..." + +#, python-brace-format +msgid "Hello {name}! Nice to meet you." +msgstr "Hallo {name}! Lekker om jou te ontmoet." + +#, python-brace-format +msgid "Yo {name}! Sup?" +msgstr "Yo {name}! Sup?" + +#, python-brace-format +msgid "Hey {name} how are you doing?" +msgstr "Haai {name} hoe doen jy?" + +#, python-brace-format +msgid "Unit {name} is nearby!" +msgstr "Eenheid {name}} is naby!" + +#, python-brace-format +msgid "Uhm ... goodbye {name}" +msgstr "Uhm ... totsiens {name}" + +#, python-brace-format +msgid "{name} is gone ..." +msgstr "{name} is weg ..." + +#, python-brace-format +msgid "Whoops ... {name} is gone." +msgstr "Whoops ... {name} is weg." + +#, python-brace-format +msgid "{name} missed!" +msgstr "{name} gemis!" + +msgid "Missed!" +msgstr "Gemis!" + +msgid "Good friends are a blessing!" +msgstr "Goeie vriende is 'n seën!" + +msgid "I love my friends!" +msgstr "Ek is lief vir my vriende!" + +msgid "Nobody wants to play with me ..." +msgstr "Niemand wil met my speel nie ..." + +msgid "I feel so alone ..." +msgstr "Ek voel so alleen ..." + +msgid "Where's everybody?!" +msgstr "Waar is almal?!" + +#, python-brace-format +msgid "Napping for {secs}s ..." +msgstr "Slaap vir {secs}s ..." + +msgid "Zzzzz" +msgstr "Zzzzz" + +#, python-brace-format +msgid "ZzzZzzz ({secs}s)" +msgstr "ZzzZzzz ({secs}s)" + +msgid "Good night." +msgstr "Goeie nag." + +msgid "Zzz" +msgstr "Zzz" + +#, python-brace-format +msgid "Waiting for {secs}s ..." +msgstr "Wag tans vir {secs}s ..." + +#, python-brace-format +msgid "Looking around ({secs}s)" +msgstr "Rondkyk ({secs}s)" + +#, python-brace-format +msgid "Hey {what} let's be friends!" +msgstr "Haai {what} kom ons wees vriende!" + +#, python-brace-format +msgid "Associating to {what}" +msgstr "Assosieer na {what}" + +#, python-brace-format +msgid "Yo {what}!" +msgstr "Yo {what}!" + +#, python-brace-format +msgid "Just decided that {mac} needs no WiFi!" +msgstr "Net besluit dat {mac} geen WiFi nodig het nie!" + +#, python-brace-format +msgid "Deauthenticating {mac}" +msgstr "Deauthenticating {mac}" + +#, python-brace-format +msgid "Kickbanning {mac}!" +msgstr "Kickbanning {mac}!" + +#, python-brace-format +msgid "Cool, we got {num} new handshake{plural}!" +msgstr "Koel, ons het {num} nuwe handdruk gekry!" + +#, python-brace-format +msgid "You have {count} new message{plural}!" +msgstr "Jy het {count} nuwe boodskap!" + +msgid "Oops, something went wrong ... Rebooting ..." +msgstr "Oops, iets het verkeerd gegaan ... Herlaai ..." + +#, python-brace-format +msgid "Kicked {num} stations\n" +msgstr "Geskop {num} stasies\n" + +#, python-brace-format +msgid "Made {num} new friends\n" +msgstr "Gemaak {num} nuwe vriende\n" + +#, python-brace-format +msgid "Got {num} handshakes\n" +msgstr "Het {num} handdrukke\n" + +msgid "Met 1 peer" +msgstr "Ontmoet 1 eweknie" + +#, python-brace-format +msgid "Met {num} peers" +msgstr "Ontmoet {num} eweknie" + +#, python-brace-format +msgid "" +"I've been pwning for {duration} and kicked {deauthed} clients! I've also met " +"{associated} new friends and ate {handshakes} handshakes! #pwnagotchi " +"#pwnlog #pwnlife #hacktheplanet #skynet" +msgstr "" +"Ek was pwning vir {duration} en het {deauthed} kliënte geskop! Ek het ook ontmoet " +"{associated} nuwe vriende en het {handshakes} handdrukke geëet! #pwnagotchi " +"#pwnlog #pwnlife #hacktheplanet #skynet" + +msgid "hours" +msgstr "uur" + +msgid "minutes" +msgstr "minute" + +msgid "seconds" +msgstr "sekondes" + +msgid "hour" +msgstr "uur" + +msgid "minute" +msgstr "minuut" + +msgid "second" +msgstr "tweede" From 6430a408473551ae7dada49fddc02fa1445ef7c2 Mon Sep 17 00:00:00 2001 From: centraliota Date: Tue, 17 Nov 2020 18:01:52 -0700 Subject: [PATCH 20/31] Update wpa-sec.py logging Added logging.info message for plugin loading, to keep consistent with behaviour of other plugins. --- pwnagotchi/plugins/default/wpa-sec.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pwnagotchi/plugins/default/wpa-sec.py b/pwnagotchi/plugins/default/wpa-sec.py index 5c14018..53ff3c3 100644 --- a/pwnagotchi/plugins/default/wpa-sec.py +++ b/pwnagotchi/plugins/default/wpa-sec.py @@ -82,6 +82,7 @@ class WpaSec(plugins.Plugin): self.options['whitelist'] = list() self.ready = True + logging.info("WPA_SEC: plugin loaded") def on_webhook(self, path, request): from flask import make_response, redirect From ea061d473b5ebb09b0cffc03983c1ee9454e12e0 Mon Sep 17 00:00:00 2001 From: FoxFromDarkness66 <46557274+FoxFromDarkness66@users.noreply.github.com> Date: Mon, 25 Jan 2021 20:00:21 +0300 Subject: [PATCH 21/31] Fix broken link in README Default file is .toml now, not .yml --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ddd00c..9a2f652 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ full and half WPA handshakes. ![ui](https://i.imgur.com/X68GXrn.png) -Instead of merely playing [Super Mario or Atari games](https://becominghuman.ai/getting-mario-back-into-the-gym-setting-up-super-mario-bros-in-openais-gym-8e39a96c1e41?gi=c4b66c3d5ced) like most reinforcement learning-based "AI" *(yawn)*, Pwnagotchi tunes [its parameters](https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/defaults.yml#L73) over time to **get better at pwning WiFi things to** in the environments you expose it to. +Instead of merely playing [Super Mario or Atari games](https://becominghuman.ai/getting-mario-back-into-the-gym-setting-up-super-mario-bros-in-openais-gym-8e39a96c1e41?gi=c4b66c3d5ced) like most reinforcement learning-based "AI" *(yawn)*, Pwnagotchi tunes [its parameters](https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/defaults.toml) over time to **get better at pwning WiFi things to** in the environments you expose it to. More specifically, Pwnagotchi is using an [LSTM with MLP feature extractor](https://stable-baselines.readthedocs.io/en/master/modules/policies.html#stable_baselines.common.policies.MlpLstmPolicy) as its policy network for the [A2C agent](https://stable-baselines.readthedocs.io/en/master/modules/a2c.html). If you're unfamiliar with A2C, here is [a very good introductory explanation](https://hackernoon.com/intuitive-rl-intro-to-advantage-actor-critic-a2c-4ff545978752) (in comic form!) of the basic principles behind how Pwnagotchi learns. (You can read more about how Pwnagotchi learns in the [Usage](https://www.pwnagotchi.ai/usage/#training-the-ai) doc.) From c472e60615d602963c40f9fabc4b3c237f1ad9fa Mon Sep 17 00:00:00 2001 From: Brigham Campbell Date: Sun, 14 Mar 2021 11:46:04 -0600 Subject: [PATCH 22/31] Fix bug in gps module Fix a bug caused by using a function in a conditional instead of the return value of the function itself. Signed-off-by: Brigham Campbell --- pwnagotchi/plugins/default/gps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/gps.py b/pwnagotchi/plugins/default/gps.py index d9c992b..2caa35b 100644 --- a/pwnagotchi/plugins/default/gps.py +++ b/pwnagotchi/plugins/default/gps.py @@ -73,7 +73,7 @@ class GPS(plugins.Plugin): lat_pos = (67, 73) lon_pos = (62, 83) alt_pos = (67, 93) - elif ui.is_dfrobot_v2: + elif ui.is_dfrobot_v2(): lat_pos = (127, 75) lon_pos = (122, 84) alt_pos = (127, 94) From 0fd09878dbec5ec883b2a9607274c7bc7a43bebd Mon Sep 17 00:00:00 2001 From: Jon Spraggins Date: Thu, 18 Mar 2021 11:47:25 -0400 Subject: [PATCH 23/31] Update faces.py Added upload faces. --- pwnagotchi/ui/faces.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pwnagotchi/ui/faces.py b/pwnagotchi/ui/faces.py index c47a5e9..66874d0 100644 --- a/pwnagotchi/ui/faces.py +++ b/pwnagotchi/ui/faces.py @@ -20,7 +20,9 @@ ANGRY = "(-_-')" FRIEND = '(♥‿‿♥)' BROKEN = '(☓‿‿☓)' DEBUG = '(#__#)' - +UPLOAD = '(1__0)' +UPLOAD1 = '(1__1)' +UPLOAD2 = '(0__1)' def load_from_config(config): for face_name, face_value in config.items(): From 88a15528d6d21142f96543fda26d68ba60234ce0 Mon Sep 17 00:00:00 2001 From: xhrzg2017 <34803905+xhrzg2017@users.noreply.github.com> Date: Fri, 9 Apr 2021 10:06:58 +0800 Subject: [PATCH 24/31] Update voice.po --- pwnagotchi/locale/ch/LC_MESSAGES/voice.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pwnagotchi/locale/ch/LC_MESSAGES/voice.po b/pwnagotchi/locale/ch/LC_MESSAGES/voice.po index 3e464d2..74e61b5 100644 --- a/pwnagotchi/locale/ch/LC_MESSAGES/voice.po +++ b/pwnagotchi/locale/ch/LC_MESSAGES/voice.po @@ -40,7 +40,7 @@ msgstr "创建密钥中, 请勿断电..." #, python-brace-format msgid "Hey, channel {channel} is free! Your AP will say thanks." -msgstr "" +msgstr "嘿,频道{channel}是免费的!你的AP会说谢谢。" msgid "I'm bored ..." msgstr "我无聊了..." @@ -84,7 +84,7 @@ msgstr "你好{name}!很高兴认识你." #, python-brace-format msgid "Unit {name} is nearby!" -msgstr "" +msgstr "小队{name}就在附近!" #, python-brace-format msgid "Uhm ... goodbye {name}" @@ -193,7 +193,7 @@ msgid "Got {num} handshakes\n" msgstr "捕获了{num}握手包\n" msgid "Met 1 peer" -msgstr "" +msgstr "有{num}同龄人" #, python-brace-format msgid "Met {num} peers" From 34c2c8a06e4015ab19df108797d6f3541908ce7c Mon Sep 17 00:00:00 2001 From: Philip Howard Date: Fri, 9 Apr 2021 10:17:20 +0100 Subject: [PATCH 25/31] Add support for SSD1608 variant 250x122 pixel Inky pHATs Running `python3 -m inky.eeprom` should show display variant. Variants 10, 11 and 12 are SSD1608 based. This patch adds support for auto-detecting and using them when "ui.display.color" is set to "auto". Fixes #980 and #941 Signed-off-by: Philip Howard --- pwnagotchi/ui/hw/inky.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pwnagotchi/ui/hw/inky.py b/pwnagotchi/ui/hw/inky.py index bb02fd7..7f71b7a 100644 --- a/pwnagotchi/ui/hw/inky.py +++ b/pwnagotchi/ui/hw/inky.py @@ -42,6 +42,12 @@ class Inky(DisplayImpl): from pwnagotchi.ui.hw.libs.inkyphat.inkyphatfast import InkyPHATFast self._display = InkyPHATFast('black') self._display.set_border(InkyPHATFast.BLACK) + elif self.config['color'] == 'auto': + from inky.auto import auto + self._display = auto() + self._display.set_border(self._display.BLACK) + self._layout['width'] = self._display.WIDTH + self._layout['height'] = self._display.HEIGHT else: from inky import InkyPHAT self._display = InkyPHAT(self.config['color']) From 10f274dab79c82cc666e6babd319d62f3030a61e Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Sun, 18 Apr 2021 14:48:39 +0200 Subject: [PATCH 26/31] fix: updated build scripts with latest packer version --- Makefile | 2 +- builder/pwnagotchi.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e95ac5a..52455af 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PACKER_VERSION=1.5.2 +PACKER_VERSION=1.7.2 PWN_HOSTNAME=pwnagotchi PWN_VERSION=master diff --git a/builder/pwnagotchi.json b/builder/pwnagotchi.json index 296d3c6..8f1a095 100644 --- a/builder/pwnagotchi.json +++ b/builder/pwnagotchi.json @@ -4,7 +4,6 @@ "name": "pwnagotchi", "type": "arm-image", "iso_url": "https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2019-07-12/2019-07-10-raspbian-buster-lite.zip", - "iso_checksum_type": "sha256", "iso_checksum": "9e5cf24ce483bb96e7736ea75ca422e3560e7b455eee63dd28f66fa1825db70e", "last_partition_extra_size": 3221225472 } From d6c7a73f3972dd8dcb93bd42e2edda4ad488a9df Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Sun, 18 Apr 2021 15:07:16 +0200 Subject: [PATCH 27/31] fix: fixed whl file urls --- builder/pwnagotchi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index a294153..a30a945 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -243,13 +243,13 @@ - name: install opencv-python pip: - name: "https://www.piwheels.hostedpi.com/simple/opencv-python/opencv_python-3.4.3.18-cp37-cp37m-linux_armv6l.whl" + name: "https://www.piwheels.org/simple/opencv-python/opencv_python-3.4.3.18-cp37-cp37m-linux_armv6l.whl" extra_args: "--no-deps --no-cache-dir --platform=linux_armv6l --only-binary=:all: --target={{ pip_target.stdout }}" when: (pip_packages['opencv-python'] is undefined) or (pip_packages['opencv-python'] != '3.4.3.18') - name: install tensorflow pip: - name: "https://www.piwheels.hostedpi.com/simple/tensorflow/tensorflow-1.13.1-cp37-none-linux_armv6l.whl" + name: "https://www.piwheels.org/simple/tensorflow/tensorflow-1.13.1-cp37-none-linux_armv6l.whl" extra_args: "--no-deps --no-cache-dir --platform=linux_armv6l --only-binary=:all: --target={{ pip_target.stdout }}" when: (pip_packages['tensorflow'] is undefined) or (pip_packages['tensorflow'] != '1.13.1') From 4441ae852cfccf358d48e6e953ebdeaa4deb1e77 Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Sun, 18 Apr 2021 15:43:15 +0200 Subject: [PATCH 28/31] misc: using stork for releases --- release.stork | 7 ++++++ scripts/changelog.sh | 57 -------------------------------------------- scripts/release.sh | 28 ---------------------- 3 files changed, 7 insertions(+), 85 deletions(-) create mode 100755 release.stork delete mode 100755 scripts/changelog.sh delete mode 100755 scripts/release.sh diff --git a/release.stork b/release.stork new file mode 100755 index 0000000..023c4ec --- /dev/null +++ b/release.stork @@ -0,0 +1,7 @@ +#!/usr/bin/env stork -f + +version:parser "__version__\\s*=\\s*['\"]([\\d\\.ab]+)[\"']" +version:file "pwnagotchi/_version.py" +version:from_user + +git:create_tag $VERSION \ No newline at end of file diff --git a/scripts/changelog.sh b/scripts/changelog.sh deleted file mode 100755 index 1c2f28a..0000000 --- a/scripts/changelog.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -NEW=() -FIXES=() -MISC=() - -echo "@ Fetching remote tags ..." -git fetch --tags >/dev/null -printf "\n\n" - -CURTAG=$(git describe --tags --abbrev=0) -OUTPUT=$(git log $CURTAG..HEAD --oneline) -IFS=$'\n' LINES=($OUTPUT) - -for LINE in "${LINES[@]}"; do - LINE=$(echo "$LINE" | sed -E "s/^[[:xdigit:]]+\s+//") - if [[ $LINE == *"new:"* ]]; then - LINE=$(echo "$LINE" | sed -E "s/^new: //") - NEW+=("$LINE") - elif [[ $LINE == *"fix:"* ]]; then - LINE=$(echo "$LINE" | sed -E "s/^fix: //") - FIXES+=("$LINE") - elif [[ $LINE != *"i did not bother commenting"* ]] && [[ $LINE != *"Merge "* ]]; then - echo " MISC LINE =$LINE" - LINE=$(echo "$LINE" | sed -E "s/^[a-z]+: //") - MISC+=("$LINE") - fi -done - -if [ -n "$NEW" ]; then - echo - echo "**New Features**" - echo - for l in "${NEW[@]}"; do - echo "* $l" - done -fi - -if [ -n "$FIXES" ]; then - echo - echo "**Fixes**" - echo - for l in "${FIXES[@]}"; do - echo "* $l" - done -fi - -if [ -n "$MISC" ]; then - echo - echo "**Misc**" - echo - for l in "${MISC[@]}"; do - echo "* $l" - done -fi - -echo diff --git a/scripts/release.sh b/scripts/release.sh deleted file mode 100755 index abe406d..0000000 --- a/scripts/release.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# nothing to see here, just a utility i use to create new releases ^_^ - -VERSION_FILE=$(dirname "${BASH_SOURCE[0]}")/../pwnagotchi/_version.py -echo "version file is $VERSION_FILE" -CURRENT_VERSION=$(cat $VERSION_FILE | grep version | cut -d"'" -f2) -TO_UPDATE=( - $VERSION_FILE -) - -echo -n "current version is $CURRENT_VERSION, select new version: " -read NEW_VERSION -echo "creating version $NEW_VERSION ...\n" - -for file in "${TO_UPDATE[@]}"; do - echo "patching $file ..." - sed -i.bak "s/$CURRENT_VERSION/$NEW_VERSION/g" "$file" - rm -rf "$file.bak" - git add $file -done - -git commit -m "releasing v$NEW_VERSION" -git push -git tag -a v$NEW_VERSION -m "release v$NEW_VERSION" -git push origin v$NEW_VERSION - -echo -echo "All done, v$NEW_VERSION released ^_^" From 5c3b21f5374e099531edb5ff2526355f8b632a34 Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Sun, 18 Apr 2021 16:22:29 +0200 Subject: [PATCH 29/31] fix: recompiled localization files --- Makefile | 6 ++++++ pwnagotchi/locale/ch/LC_MESSAGES/voice.mo | Bin 3642 -> 3903 bytes pwnagotchi/locale/es/LC_MESSAGES/voice.mo | Bin 4424 -> 4402 bytes pwnagotchi/locale/nl/LC_MESSAGES/voice.mo | Bin 4088 -> 4339 bytes pwnagotchi/locale/tw/LC_MESSAGES/voice.mo | Bin 0 -> 4675 bytes 5 files changed, 6 insertions(+) create mode 100644 pwnagotchi/locale/tw/LC_MESSAGES/voice.mo diff --git a/Makefile b/Makefile index 52455af..2c48571 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,12 @@ PWN_VERSION=master all: clean install image +langs: + @for lang in pwnagotchi/locale/*/; do\ + echo "compiling language: $$lang ..."; \ + ./scripts/language.sh compile $$(basename $$lang); \ + done + install: curl https://releases.hashicorp.com/packer/$(PACKER_VERSION)/packer_$(PACKER_VERSION)_linux_amd64.zip -o /tmp/packer.zip unzip /tmp/packer.zip -d /tmp diff --git a/pwnagotchi/locale/ch/LC_MESSAGES/voice.mo b/pwnagotchi/locale/ch/LC_MESSAGES/voice.mo index a917080c56f9433ff614f7dc9360519e30c260ee..84cff021c95ce8b0dddd04b6848ae98434850bfb 100644 GIT binary patch delta 1409 zcmY+@OKeP09LMo9`qBs0DoUv{XgxaWO~b}BR$dFC5otzq#l)COJB>6=Q>21;HVqjx zNNup7G7{00O0W<~5w+38rk(0kJVIh)!S^?FNu11?&pl_({LkZmZr9YF;^q(esTT}o z8Fec4na7xo7);@daw653OgxDbunp(pEu4sNaTboC{-2v>Og8#Z<126+ZpP_Yg&Nn4 z6=2$Vuynk`@%R(-F)Q7eF*pq;VVUbX%%Hss6}TEpF^u}(71YA+U;#eILVS;k^8>Rm zn;;p?Zz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`!&0X^Ksv0?r`M*i+Qq%_DyVdxg5fH>j(7he~)Q@)L49wuXwc zj*9agt@PTvQkfYF&fXd>OkBTtBRE%>81DDGUA8aCy1?c9Y)^mIb+~TlN{RTl*k2w< BTF3wZ diff --git a/pwnagotchi/locale/tw/LC_MESSAGES/voice.mo b/pwnagotchi/locale/tw/LC_MESSAGES/voice.mo new file mode 100644 index 0000000000000000000000000000000000000000..afa35f751a1aae471a69faeda93acfbfb36fdb02 GIT binary patch literal 4675 zcmZXVS#T7`8OJ*bw(-P?9f#P7bM=@c7+brnh+|{_8x|9o^=Kg0Dh#j61<6{Pj=h4ewv_bEv7k132j z0X_}l$2Q^b`(O=7sn`ROeS5(#gGWGwl${2bfurH`1c(r^%OKf*J$$|uKK~x1`2Gnb zJ^uhBpF_SuvhRt90(;8AXYsrV{06ueA;QQhCPeMM9V64LXb>Ld? zmmt+iFGzWv1NtKanhcUe|Lgo>R7Y27K1@_Y{@`S(D$#(a?S{7LxzKOsqo z+I@D?MJZsmq(=1I*+ z*h#HXv^1qMmX>N&*+!vdoTM-uJsv1&No(;|wpkd$3SKmdtX;+vCO4qV$yf$A>+5+m z8fBYJGr{XET|g_>EWtHimlC!OTh!pAp*JKQ5?r*RXo0P;En2*hV{KlO(hT9KY>P;x z;DVv0MXSoU>Ty9XrG;>K*33llJsUd6Q^Hwg^E$D(JWbA)@i_DwBE?(6n^vyd5D`M< zyUmQn*Vpi7J(c3Nmc`1N(P%@fUdAg|rFl)Wp&?xHq^|N>N3&!|$<0b$FQC&lxt1~w zAziQJDRYnD>1@e>O5W6LkUy5FHxZ0VuB9;Vz=J64C`bcuNAAc68Hd<;Xs7 z)Z>jXrX>;NJ<-bJDJ0ObRRjUkwGCSYeX2t&EKpm9$#?0m=_-32 z*4H7$rPhYeyi5hR7^^+aPS_nO=u`yxkEFC6Wk$)w#v4eb!H+9^N}Ii3P)j($+bz{fi+l-SFB;RNVH~Tv98l>T8*}4wm( zx~$4}X}YvbR_T&}?4m7%-7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8b z5Jm92xgr?N7!halx1yOqB&jh`$dzh}BII_aK1?RH-X&rE-^ zXEin{g`}jW7z%|I_8rDPq^}>{?&fe|$(!K#q&*ZIsqXQP!jY>;7{q0@AVdD`xx%e8 z?)2M8x8janqPUMAhCrB9@4$8c%;DhthAk+Bh1s0^CU-oZ5i2#^|9JSnqVg&lr+V^KH^{R z52_K1(#aZB3F4ohx$5?JeRO+Y@MHe?8UJQ)_@UI+3T=b%ldR|)al7w8u{Yf2-#rFB zMZKu<{w{d{Dqe0Fzo0>cCy#yA)y2c6_ikZB1irr8rRCgMx!!x2!tg(S*a)ort=rNynRo(S pPUtNCzoQj<5dCsLb2|>nfh;l_pS41srEtdWJdIzmP{Q`e{tGYaMza6_ literal 0 HcmV?d00001 From f164b8bb26f03ca134b398454e3c184a3c8d1dbb Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Sun, 18 Apr 2021 17:03:21 +0200 Subject: [PATCH 30/31] new: added new faces for uploading status --- pwnagotchi/defaults.toml | 3 +++ pwnagotchi/locale/voice.pot | 4 ++++ pwnagotchi/plugins/default/onlinehashcrack.py | 8 +++++--- pwnagotchi/plugins/default/wigle.py | 6 ++++-- pwnagotchi/plugins/default/wpa-sec.py | 6 ++++-- pwnagotchi/ui/view.py | 19 ++++++++++++------- pwnagotchi/voice.py | 5 ++++- 7 files changed, 36 insertions(+), 15 deletions(-) diff --git a/pwnagotchi/defaults.toml b/pwnagotchi/defaults.toml index e471659..cdbb4ce 100644 --- a/pwnagotchi/defaults.toml +++ b/pwnagotchi/defaults.toml @@ -184,6 +184,9 @@ ui.faces.angry = "(-_-')" ui.faces.friend = "(♥‿‿♥)" ui.faces.broken = "(☓‿‿☓)" ui.faces.debug = "(#__#)" +ui.faces.upload = "(1__0)" +ui.faces.upload1 = "(1__1)" +ui.faces.upload2 = "(0__1)" ui.web.enabled = true ui.web.address = "0.0.0.0" diff --git a/pwnagotchi/locale/voice.pot b/pwnagotchi/locale/voice.pot index 4b62ea9..0b9fcb8 100644 --- a/pwnagotchi/locale/voice.pot +++ b/pwnagotchi/locale/voice.pot @@ -244,3 +244,7 @@ msgstr "" msgid "second" msgstr "" + +#, python-brace-format +msgid "Uploading data to {to} ..." +msgstr "" diff --git a/pwnagotchi/plugins/default/onlinehashcrack.py b/pwnagotchi/plugins/default/onlinehashcrack.py index 1a7484f..b63a2ed 100644 --- a/pwnagotchi/plugins/default/onlinehashcrack.py +++ b/pwnagotchi/plugins/default/onlinehashcrack.py @@ -110,9 +110,8 @@ class OnlineHashCrack(plugins.Plugin): if handshake_new: logging.info("OHC: Internet connectivity detected. Uploading new handshakes to onlinehashcrack.com") for idx, handshake in enumerate(handshake_new): - display.set('status', - f"Uploading handshake to onlinehashcrack.com ({idx + 1}/{len(handshake_new)})") - display.update(force=True) + display.on_uploading(f"onlinehashcrack.com ({idx + 1}/{len(handshake_new)})") + try: self._upload_to_ohc(handshake) if handshake not in reported: @@ -127,6 +126,9 @@ class OnlineHashCrack(plugins.Plugin): self.skip.append(handshake) logging.debug("OHC: %s", os_e) continue + + display.on_normal() + if 'dashboard' in self.options and self.options['dashboard']: cracked_file = os.path.join(handshake_dir, 'onlinehashcrack.cracked') if os.path.exists(cracked_file): diff --git a/pwnagotchi/plugins/default/wigle.py b/pwnagotchi/plugins/default/wigle.py index 103e7db..3a7bce7 100644 --- a/pwnagotchi/plugins/default/wigle.py +++ b/pwnagotchi/plugins/default/wigle.py @@ -180,8 +180,8 @@ class Wigle(plugins.Plugin): csv_entries.append(new_entry) no_err_entries.append(gps_file) if csv_entries: - display.set('status', "Uploading gps-data to wigle.net ...") - display.update(force=True) + display.on_uploading('wigle.net') + try: _send_to_wigle(csv_entries, self.options['api_key'], donate=self.options['donate']) reported += no_err_entries @@ -193,3 +193,5 @@ class Wigle(plugins.Plugin): except OSError as os_e: self.skip += no_err_entries logging.debug("WIGLE: Got the following error: %s", os_e) + + display.on_normal() diff --git a/pwnagotchi/plugins/default/wpa-sec.py b/pwnagotchi/plugins/default/wpa-sec.py index 53ff3c3..6b6163b 100644 --- a/pwnagotchi/plugins/default/wpa-sec.py +++ b/pwnagotchi/plugins/default/wpa-sec.py @@ -111,8 +111,8 @@ class WpaSec(plugins.Plugin): if handshake_new: logging.info("WPA_SEC: Internet connectivity detected. Uploading new handshakes to wpa-sec.stanev.org") for idx, handshake in enumerate(handshake_new): - display.set('status', f"Uploading handshake to wpa-sec.stanev.org ({idx + 1}/{len(handshake_new)})") - display.update(force=True) + display.on_uploading(f"wpa-sec.stanev.org ({idx + 1}/{len(handshake_new)})") + try: self._upload_to_wpasec(handshake) reported.append(handshake) @@ -126,6 +126,8 @@ class WpaSec(plugins.Plugin): logging.debug("WPA_SEC: %s", os_e) continue + display.on_normal() + if 'download_results' in self.options and self.options['download_results']: cracked_file = os.path.join(handshake_dir, 'wpa-sec.cracked.potfile') if os.path.exists(cracked_file): diff --git a/pwnagotchi/ui/view.py b/pwnagotchi/ui/view.py index 974a968..9ecc857 100644 --- a/pwnagotchi/ui/view.py +++ b/pwnagotchi/ui/view.py @@ -1,20 +1,20 @@ import _thread -from threading import Lock -import time import logging import random +import time +from threading import Lock + from PIL import ImageDraw import pwnagotchi -import pwnagotchi.utils as utils import pwnagotchi.plugins as plugins -from pwnagotchi.voice import Voice - -import pwnagotchi.ui.web as web -import pwnagotchi.ui.fonts as fonts import pwnagotchi.ui.faces as faces +import pwnagotchi.ui.fonts as fonts +import pwnagotchi.ui.web as web +import pwnagotchi.utils as utils from pwnagotchi.ui.components import * from pwnagotchi.ui.state import State +from pwnagotchi.voice import Voice WHITE = 0xff BLACK = 0x00 @@ -345,6 +345,11 @@ class View(object): self.update() time.sleep(5.0) + def on_uploading(self, to): + self.set('face', random.choice((faces.UPLOAD, faces.UPLOAD1, faces.UPLOAD2))) + self.set('status', self._voice.on_uploading(to)) + self.update(force=True) + def on_rebooting(self): self.set('face', faces.BROKEN) self.set('status', self._voice.on_rebooting()) diff --git a/pwnagotchi/voice.py b/pwnagotchi/voice.py index fff7579..991d26f 100644 --- a/pwnagotchi/voice.py +++ b/pwnagotchi/voice.py @@ -1,6 +1,6 @@ -import random import gettext import os +import random class Voice: @@ -159,6 +159,9 @@ class Voice: def on_rebooting(self): return self._("Oops, something went wrong ... Rebooting ...") + def on_uploading(self, to): + return self._("Uploading data to {to} ...").format(to=to) + def on_last_session_data(self, last_session): status = self._('Kicked {num} stations\n').format(num=last_session.deauthed) if last_session.associated > 999: From 1318275b3658f1e5038152f490355658567d0a54 Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Sun, 18 Apr 2021 17:11:04 +0200 Subject: [PATCH 31/31] fix: using better symbols for ups charging status --- pwnagotchi/plugins/default/ups_lite.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pwnagotchi/plugins/default/ups_lite.py b/pwnagotchi/plugins/default/ups_lite.py index 3df7685..c439636 100644 --- a/pwnagotchi/plugins/default/ups_lite.py +++ b/pwnagotchi/plugins/default/ups_lite.py @@ -12,12 +12,13 @@ import logging import struct +import RPi.GPIO as GPIO + +import pwnagotchi +import pwnagotchi.plugins as plugins +import pwnagotchi.ui.fonts as fonts from pwnagotchi.ui.components import LabeledValue from pwnagotchi.ui.view import BLACK -import pwnagotchi.ui.fonts as fonts -import pwnagotchi.plugins as plugins -import pwnagotchi -import RPi.GPIO as GPIO # TODO: add enable switch in config.yml an cleanup all to the best place @@ -50,12 +51,9 @@ class UPS: try: GPIO.setmode(GPIO.BCM) GPIO.setup(4, GPIO.IN) - if (GPIO.input(4) == GPIO.HIGH): - return '⚡' - if (GPIO.input(4) == GPIO.LOW): - return '%' + return '+' if GPIO.input(4) == GPIO.HIGH else '-' except: - return '%' + return '-' class UPSLite(plugins.Plugin):