implement automatic updater
This commit is contained in:
11
updater/certificates.py
Normal file
11
updater/certificates.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import subprocess
|
||||
|
||||
|
||||
def get_apk_certificate(file: str):
|
||||
output = subprocess.check_output(['keytool', '-printcert', '-rfc', '-jarfile', file], text=True)
|
||||
lines = output.split("\n")
|
||||
return '\n'.join(lines[
|
||||
lines.index('-----BEGIN CERTIFICATE-----'):
|
||||
(lines.index('-----END CERTIFICATE-----')+1)
|
||||
])
|
||||
|
Reference in New Issue
Block a user