misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
d49cefe1e4
commit
4a4b973f60
pwnagotchi
@ -73,13 +73,12 @@ def on_internet_available(agent):
|
|||||||
|
|
||||||
to_install = []
|
to_install = []
|
||||||
to_check = [
|
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/pwngrid', subprocess.getoutput('pwngrid -version').replace('v', ''), True),
|
||||||
('evilsocket/pwnagotchi', pwnagotchi.version, False)
|
('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)
|
info = check(local_version, repo, is_native)
|
||||||
if info['url'] is not None:
|
if info['url'] is not None:
|
||||||
to_install.append(info)
|
to_install.append(info)
|
||||||
|
@ -173,8 +173,8 @@ class Server(object):
|
|||||||
if 'origin' in config['video'] and config['video']['origin'] != '*':
|
if 'origin' in config['video'] and config['video']['origin'] != '*':
|
||||||
Handler.AllowedOrigin = config['video']['origin']
|
Handler.AllowedOrigin = config['video']['origin']
|
||||||
else:
|
else:
|
||||||
logging.warning("THE WEB UI IS RUNNING WITH ALLOWED ORIGIN SET TO *, READ WHY YOU SHOULD CHANGE IT HERE \
|
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")
|
"https://developer.mozilla.org/it/docs/Web/HTTP/CORS")
|
||||||
|
|
||||||
if self._enabled:
|
if self._enabled:
|
||||||
_thread.start_new_thread(self._http_serve, ())
|
_thread.start_new_thread(self._http_serve, ())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user