new: pwnfile link in the web ui (closes #557)

This commit is contained in:
Simone Margaritelli
2019-11-10 13:24:56 +01:00
parent d7e1c59709
commit a2ac679499
2 changed files with 8 additions and 2 deletions

View File

@ -32,8 +32,10 @@ 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.html', title=pwnagotchi.name(), return render_template('index.html',
other_mode='AUTO' if self._agent.mode == 'manual' else 'MANU') title=pwnagotchi.name(),
other_mode='AUTO' if self._agent.mode == 'manual' else 'MANU',
fingerprint=self._agent.fingerprint())
def plugins(self, name, subpath): def plugins(self, name, subpath):
if name is None: if name is None:

View File

@ -21,6 +21,10 @@
<input type="hidden" name="mode" value="{{ other_mode }}"/> <input type="hidden" name="mode" value="{{ other_mode }}"/>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
</form> </form>
<form class="action" method="GET" action="https://pwnagotchi.ai/pwnfile/#{{ fingerprint }}">
<input type="submit" class="button" formtarget="_blank" value="Pwnfile"/>
</form>
</div> </div>
</div> </div>