Compare commits

..

5 Commits

Author SHA1 Message Date
2f495c7147 Merge pull request #2 from rai68/master
Update utils.py
2024-01-11 14:17:04 +01:00
Rai
72e22475e3 Update utils.py
fix indent

Signed-off-by: Rai <58925163+rai68@users.noreply.github.com>
2024-01-11 22:18:57 +10:00
c650188e1b Upgrade plugins from webui/plugins page 2024-01-11 10:55:55 +01:00
fdf5dd28f3 Next update will be 2.6.3 2024-01-11 10:55:38 +01:00
5d9e4f990a Update README.md 2024-01-11 10:34:44 +01:00
6 changed files with 13 additions and 6 deletions

View File

@ -1,6 +1,6 @@
# Pwnagotchi-Torch
<a href="https://github.com/jayofelony/pwnagotchi-bookworm/releases/latest"><img alt="Release" src="https://img.shields.io/github/release/jayofelony/pwnagotchi-bookworm.svg"></a><br/>
**This fork of [Pwnagotchi](https://www.pwnagotchi.ai) is only for 64-bit Raspberry Pi's. Such as the 02W, 3(b+) and 4(b).**
**This fork of [Pwnagotchi](https://www.pwnagotchi.ai) is only for 64-bit Raspberry Pi's. Such as the 02W, 3(b+) and 4(b) and the new Raspberry Pi 5!!.**
If you are using an older 32-bit version Raspberry Pi, ZeroWH, use this [fork](https://github.com/jayofelony/pwnagotchi-torch/releases/tag/v2.5.4) and make sure you download the `armhf` version.

View File

@ -1 +1 @@
__version__ = '2.6.2'
__version__ = '2.6.3'

View File

@ -160,8 +160,6 @@ personality.bond_encounters_factor = 20000
personality.throttle_a = 0.4
personality.throttle_d = 0.9
ui.invert = false
ui.fps = 0.0
ui.font.name = "DejaVuSansMono" # for japanese: fonts-japanese-gothic
ui.font.size_offset = 0 # will be added to the font size

View File

@ -188,6 +188,11 @@ class Handler:
checked = True if 'enabled' in request.form else False
return 'success' if plugins.toggle_plugin(request.form['plugin'], checked) else 'failed'
if name == 'upgrade' and request.method == 'POST':
logging.info(f"Upgrading plugin: {request.form['plugin']}")
os.system(f"pwnagotchi plugins update && pwnagotchi plugins upgrade {request.form['plugin']}")
return redirect("/plugins")
if name in plugins.loaded and plugins.loaded[name] is not None and hasattr(plugins.loaded[name], 'on_webhook'):
try:
return plugins.loaded[name].on_webhook(subpath, request)

View File

@ -76,6 +76,11 @@ $(function(){
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="plugin" value="{{ name }}"/>
</form>
<form method="POST" action="/plugins/upgrade">
<input type="submit" name="upgrade" value="Upgrade">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="plugin" value="{{ name }}"/>
</form>
</div>
{% endfor %}
</div>

View File

@ -165,8 +165,7 @@ def load_config(args):
ref_defaults_data = None
# check for a config.yml file on /boot/firmware
for boot_conf in ['/boot/config.yml', '/boot/firmware/config.yml',
'/boot/config.toml', '/boot/firmware/config.toml']:
for boot_conf in ['/boot/config.yml', '/boot/firmware/config.yml', '/boot/config.toml', '/boot/firmware/config.toml']:
if os.path.exists(boot_conf):
if os.path.exists(args.user_config):
# if /etc/pwnagotchi/config.toml already exists we just merge the new config