mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
@ -32,7 +32,7 @@ class Handler:
|
|||||||
self._app.add_url_rule('/plugins/<name>/<path:subpath>', 'plugins', self.plugins, methods=['GET', 'POST'])
|
self._app.add_url_rule('/plugins/<name>/<path:subpath>', 'plugins', self.plugins, methods=['GET', 'POST'])
|
||||||
|
|
||||||
def index(self):
|
def index(self):
|
||||||
return render_template('index', title=pwnagotchi.name(),
|
return render_template('index.html', title=pwnagotchi.name(),
|
||||||
other_mode='AUTO' if self._agent.mode == 'manual' else 'MANU')
|
other_mode='AUTO' if self._agent.mode == 'manual' else 'MANU')
|
||||||
|
|
||||||
def plugins(self, name, subpath):
|
def plugins(self, name, subpath):
|
||||||
@ -55,7 +55,7 @@ class Handler:
|
|||||||
# serve a message and shuts down the unit
|
# serve a message and shuts down the unit
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
try:
|
try:
|
||||||
return render_template('status', title=pwnagotchi.name(), go_back_after=60,
|
return render_template('status.html', title=pwnagotchi.name(), go_back_after=60,
|
||||||
message='Shutting down ...')
|
message='Shutting down ...')
|
||||||
finally:
|
finally:
|
||||||
_thread.start_new_thread(pwnagotchi.shutdown, ())
|
_thread.start_new_thread(pwnagotchi.shutdown, ())
|
||||||
@ -67,7 +67,7 @@ class Handler:
|
|||||||
mode = 'MANU'
|
mode = 'MANU'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return render_template('status', title=pwnagotchi.name(), go_back_after=30,
|
return render_template('status.html', title=pwnagotchi.name(), go_back_after=30,
|
||||||
message='Restarting in %s mode ...' % mode)
|
message='Restarting in %s mode ...' % mode)
|
||||||
finally:
|
finally:
|
||||||
_thread.start_new_thread(pwnagotchi.restart, (mode,))
|
_thread.start_new_thread(pwnagotchi.restart, (mode,))
|
||||||
|
Reference in New Issue
Block a user