mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 22:38:36 -07:00
change naming scheme and print save directory (#21)
This commit is contained in:
@@ -73,11 +73,7 @@ def main():
|
|||||||
s256_b64 = base64.b64encode(public_key_hash.finalize()).decode("ascii")
|
s256_b64 = base64.b64encode(public_key_hash.finalize()).decode("ascii")
|
||||||
|
|
||||||
if "/" not in s256_b64[:7]:
|
if "/" not in s256_b64[:7]:
|
||||||
fname = (
|
fname = f"{prefix}_{mac}.keys" if prefix else f"{mac}.keys"
|
||||||
f"{prefix}_{s256_b64[:7]}.keys"
|
|
||||||
if prefix
|
|
||||||
else f"{s256_b64[:7]}.keys"
|
|
||||||
)
|
|
||||||
|
|
||||||
print(f"{i + 1})")
|
print(f"{i + 1})")
|
||||||
print("Private key (Base64):", private_key_b64)
|
print("Private key (Base64):", private_key_b64)
|
||||||
@@ -95,8 +91,9 @@ def main():
|
|||||||
print("Payload:", payload)
|
print("Payload:", payload)
|
||||||
print()
|
print()
|
||||||
print(
|
print(
|
||||||
"Place the .keys file onto your Flipper or input the MAC and Payload manually."
|
"Place the .keys file onto your Flipper in the Apps_Data->FindMyFlipper folder or input the MAC and Payload manually."
|
||||||
)
|
)
|
||||||
|
print()
|
||||||
|
|
||||||
with open(f"keys/{fname}", "w") as f:
|
with open(f"keys/{fname}", "w") as f:
|
||||||
f.write(f"Private key: {private_key_b64}\n")
|
f.write(f"Private key: {private_key_b64}\n")
|
||||||
@@ -106,6 +103,8 @@ def main():
|
|||||||
f.write(f"Public key (Hex): {public_key_hex}\n")
|
f.write(f"Public key (Hex): {public_key_hex}\n")
|
||||||
f.write(f"MAC: {mac}\n")
|
f.write(f"MAC: {mac}\n")
|
||||||
f.write(f"Payload: {payload}\n")
|
f.write(f"Payload: {payload}\n")
|
||||||
|
print("Keys file saved to:", os.path.abspath(f"keys/{fname}"))
|
||||||
|
print()
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user