misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
Simone Margaritelli 2019-10-20 18:33:43 +02:00
parent d49cefe1e4
commit 4a4b973f60
No known key found for this signature in database
GPG Key ID: 82E42E7F3B34C97E
2 changed files with 4 additions and 5 deletions
pwnagotchi
plugins/default
ui

@ -73,13 +73,12 @@ def on_internet_available(agent):
to_install = []
to_check = [
(
'bettercap/bettercap', subprocess.getoutput('bettercap -version').split(' ')[1].replace('v', ''), True),
('bettercap/bettercap', subprocess.getoutput('bettercap -version').split(' ')[1].replace('v', ''), True),
('evilsocket/pwngrid', subprocess.getoutput('pwngrid -version').replace('v', ''), True),
('evilsocket/pwnagotchi', pwnagotchi.version, False)
]
for repo, local_version, is_native in to_check.items():
for repo, local_version, is_native in to_check:
info = check(local_version, repo, is_native)
if info['url'] is not None:
to_install.append(info)

@ -173,8 +173,8 @@ class Server(object):
if 'origin' in config['video'] and config['video']['origin'] != '*':
Handler.AllowedOrigin = config['video']['origin']
else:
logging.warning("THE WEB UI IS RUNNING WITH ALLOWED ORIGIN SET TO *, READ WHY YOU SHOULD CHANGE IT HERE \
https://developer.mozilla.org/it/docs/Web/HTTP/CORS")
logging.warning("THE WEB UI IS RUNNING WITH ALLOWED ORIGIN SET TO *, READ WHY YOU SHOULD CHANGE IT HERE " +
"https://developer.mozilla.org/it/docs/Web/HTTP/CORS")
if self._enabled:
_thread.start_new_thread(self._http_serve, ())