You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: python/README.md
+49-5Lines changed: 49 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,13 +49,57 @@ Reasoning for this: I don't know Swift (and I don't even use MacOS) and I need t
49
49
```bash
50
50
pip install -r requirements.txt
51
51
```
52
-
- **(OPTIONAL)** Change your output path on [airtag_decryptor.py:30](https://github.com/parawanderer/OpenTagViewer/blob/main/python/airtag_decryptor.py#L30) if wanted
53
-
- Default output path: `~/plist_decrypt_output`
54
52
- Run the script:
55
53
```bash
56
-
python main/airtag_decryptor.py
54
+
python main/airtag_decryptor.py --rename-legacy
57
55
```
58
-
- Note that it will prompt your password twice.
56
+
Default output path is: `~/plist_decrypt_output`.
57
+
58
+
`--rename-legacy` is used to make it automatically perform folder rename logic for MacOS 11.x (see [issue #24](https://github.com/parawanderer/OpenTagViewer/issues/24)). It has no effects for later versions of MacOS.
59
+
60
+
<details>
61
+
<summary><b>Q: How to provide custom output path?</b></summary>
62
+
<br>
63
+
64
+
If you'd like to provide an alternative output path, use optional argument `--path`
<summary><b>Q: How to provide it a custom decryption key?</b></summary>
72
+
<br>
73
+
74
+
If you used some custom method to get the `BeaconStore` keystore key (e.g. on MacOS 15 using [this approach](https://github.com/pajowu/beaconstorekey-extractor)), you can provide it directly as a **[Base64-encoded](https://www.base64encode.org/) string** string using the optional `--key` argument
print(_red("Invalid base64 key provided via --key argument"))
341
+
exit(1)
342
+
else:
343
+
344
+
ifMACOS_VER[0] >=15:
345
+
print(_red(f"For MacOS >= 15, extracting the '{KEYCHAIN_LABEL}' key automatically is not supported due to newly introduced OS keychain access limitations. \n\nPlease consider using the --key argument (see --help) and see alternative key retrieval strategies here:\n\n\thttps://github.com/parawanderer/OpenTagViewer/wiki/How-To:-Manually-Export-AirTags")) # noqa: E501
346
+
exit(1)
347
+
348
+
# this thing will pop up 1 or 2 Password Input windows...
349
+
key=get_key_fallback(KEYCHAIN_LABEL)
281
350
282
-
# this thing will pop up 2 Password Input windows...
return# Valid because doesn't exist yet, we can just init it, probably
358
+
359
+
ifos.path.isdir(output_to):
360
+
ifos.listdir(output_to):
361
+
print(_red(f"Output path '{output_to}' already exists and this directory is not empty. To prevent overwriting files we will avoid running the script. \n\nEither purge the contents of the directory, like so:\n\n\trm -rf '{output_to}'\n\n or use --output to specify an alternative folder first.")) # noqa: E501
362
+
exit(1)
363
+
364
+
elifos.path.isfile(output_to):
365
+
print(_red(f"Output path '{output_to}' already existed and is a file. Delete the file or use --output to provide an alternative output path")) # noqa: E501
366
+
exit(1)
367
+
368
+
369
+
defmain():
370
+
ifMACOS_VERisNone:
371
+
print(_red("This tool is only supported on MacOS machines"))
372
+
exit(1)
373
+
374
+
parser=argparse.ArgumentParser(
375
+
description="CLI utility for decrypting/dumping MacOS <= 14.x FindMy cache .plist files into a folder",
help=f"which folder to output the decrypted data to. Defaults to '{OUTPUT_PATH}'"
386
+
)
387
+
388
+
parser.add_argument(
389
+
"-a",
390
+
"--all",
391
+
action='store_true',
392
+
default=False,
393
+
help=f"whether to decrypt all folders or just the standard subset ({', '.join(WHITELISTED_DIRS)})"
394
+
)
395
+
396
+
parser.add_argument(
397
+
"-k",
398
+
"--key",
399
+
type=str,
400
+
default=None,
401
+
help="base64 key belonging to BeaconStore keystore record, in case it is impossible to extract the BeaconStore keychain key but you managed to obtain the key through other means. More here: https://github.com/parawanderer/OpenTagViewer/tree/main/python#-python-utility-scripts", # noqa: E501
402
+
)
403
+
404
+
parser.add_argument(
405
+
"--rename-legacy",
406
+
default=False,
407
+
action='store_true',
408
+
help="whether to remap old MacOS folders like 'MasterBeacons' to the new name 'OwnedBeacons'. Required for use in the OpenTagViewer Android app."# noqa: E501
0 commit comments