misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
4a4b973f60
commit
916be1f63e
@ -41,13 +41,15 @@ def check(version, repo, native=True):
|
|||||||
is_arm = arch.startswith('arm')
|
is_arm = arch.startswith('arm')
|
||||||
|
|
||||||
if latest_ver != info['current']:
|
if latest_ver != info['current']:
|
||||||
# check if this release is compatible with arm6
|
if not native:
|
||||||
for asset in latest['assets']:
|
info['url'] = latest['zipball_url']
|
||||||
download_url = asset['browser_download_url']
|
else:
|
||||||
if download_url.endswith('.zip') and (
|
# check if this release is compatible with arm6
|
||||||
native is False or arch in download_url or is_arm and 'armhf' in download_url):
|
for asset in latest['assets']:
|
||||||
logging.info("found new update: %s" % download_url)
|
download_url = asset['browser_download_url']
|
||||||
info['url'] = download_url
|
if download_url.endswith('.zip') and (arch in download_url or is_arm and 'armhf' in download_url):
|
||||||
|
logging.info("found new update: %s" % download_url)
|
||||||
|
info['url'] = download_url
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
@ -73,7 +75,8 @@ 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)
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user