Skip to content

Commit 00801c4

Browse files
psifertexplafosse
authored andcommitted
edits to dsc docs
1 parent 4e77062 commit 00801c4

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

docs/guide/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,6 @@ Any variables or functions defined globally within the script will be available
953953
### Python Debugging
954954
See the [plugin development guide](../dev/plugins.md#debugging-using-other-ides).
955955

956-
Note
957956
???+ Tip "Tip"
958957
The current script console only supports Python at the moment, but it's fully extensible for other programming languages for advanced users who wish to implement their own bindings.
959958

docs/guide/sharedcache.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,47 @@ List of supported features for the given shared cache targets:
2121

2222
## Obtaining a Shared Cache
2323

24-
The `dyld_shared_cache` is one or more files that contain all the shared libraries used by modern Apple operating systems (like macOS, iOS, and tvOS). These can be obtained
25-
directly from Apple, or with the help of a tool such as `blacktop/ipsw`.
24+
The `dyld_shared_cache` is one or more files that contain all the shared libraries used by modern Apple operating systems (like macOS, iOS, and tvOS). These can be obtained directly from Apple, or with the help of a tool such as [`blacktop/ipsw`](#using-blacktopipsw).
2625

27-
### With `blacktop/ipsw`
26+
### Using `blacktop/ipsw`
2827

29-
Our recommended way to retrieve a `dyld_shared_cache` is using blacktop's wonderful [`ipsw` tool](https://github.com/blacktop/ipsw).
28+
Our recommended way to retrieve a `dyld_shared_cache` is using blacktop's [`ipsw` tool](https://github.com/blacktop/ipsw).
3029

3130
1. [Install blacktop/ipsw](https://github.com/blacktop/ipsw?tab=readme-ov-file#install)
3231
2. Run `ipsw download ipsw --version [target iOS version] --device [target device model (e.g. iPhone10,3)]`
3332
3. Run `ipsw extract --dyld [filename]`
3433

35-
### From Local macOS Install
34+
### Local macOS Install
3635

3736
The local shared cache on macOS is located at `/System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/`.
3837

3938
## Opening a Shared Cache
4039

41-
Binary Ninja currently only supports `dyld_shared_cache` files that have been extracted into a flat directory, so you will need to extract the IPSW (if there is one) first. After extraction, we are expecting a file structure similar to the following:
40+
Binary Ninja currently only supports `dyld_shared_cache` files that have been extracted into a flat directory, so you will need to extract the IPSW (if there is one) first. After extraction, we expect files similar to the following:
4241

43-
- `your_directory`
42+
- `your_project_folder`
4443
- `dyld_shared_cache_arm64` (**Primary**)
4544
- `dyld_shared_cache_arm64.01` (Secondary, optional)
4645
- `dyld_shared_cache_arm64.02` (Secondary, optional)
4746
- `dyld_shared_cache_arm64.symbols` (Symbols, optional)
4847

49-
To access the entire shared cache, open the **Primary** file in Binary Ninja. In the example above this would be `dyld_shared_cache_arm64`.
50-
Opening any other file (e.g. `dyld_shared_cache_arm64.01`) will result in a partial shared cache, with only the information present
51-
in the file you opened.
48+
To load the shared cache, open the **Primary** file in Binary Ninja. In the example above this would be `dyld_shared_cache_arm64`.
49+
50+
???+ Danger "Warning"
51+
Opening any other file (e.g. `dyld_shared_cache_arm64.01`) will result in a partial shared cache, with only the information present in the file you opened.
5252

5353
### Project Support
5454

5555
Binary Ninja projects support `dyld_shared_cache` files. However, due to the nature of the project files not having a mappable path,
5656
saving the analysis database (`.bndb`) in a separate directory will require you to select the primary shared cache file on
5757
every open of the database. As a result, we advise keeping your analysis database in the same folder as your `dyld_shared_cache` files.
5858

59-
- `your_project_folder`
60-
- `dyld_shared_cache_arm64` (**Primary**)
61-
- `dyld_shared_cache_arm64.01` (Secondary, optional)
62-
- `dyld_shared_cache_arm64.02` (Secondary, optional)
63-
- `dyld_shared_cache_arm64.symbols` (Symbols, optional)
64-
- `your_database.bndb` (This is recommended)
59+
- `your_project_folder`
60+
- `dyld_shared_cache_arm64` (**Primary**)
61+
- `dyld_shared_cache_arm64.01` (Secondary, optional)
62+
- `dyld_shared_cache_arm64.02` (Secondary, optional)
63+
- `dyld_shared_cache_arm64.symbols` (Symbols, optional)
64+
- `your_database.bndb` (This is recommended)
6565

6666
## Interacting With a Shared Cache
6767

@@ -97,7 +97,7 @@ opening a `dyld_shared_cache` and is how you add images to the actual binary vie
9797

9898
### Scripting
9999

100-
Another way to interact with the shared cache information is through the provided Python API, available in the `binaryninja.sharedcache` module.
100+
Another way to interact with the shared cache information is through the provided Python API, available in the [`binaryninja.sharedcache`](https://github.com/Vector35/binaryninja-api/blob/dev/view/sharedcache/api/python/sharedcache.py) module.
101101

102102
Additionally, the `dsc` (or `shared_cache`) magic variable is available in the scripting console whenever a shared cache is opened.
103103

@@ -113,7 +113,8 @@ for image in dsc.loaded_images:
113113
dsc.apply_image(bv, dep_image)
114114
```
115115

116-
**Note:** If you are processing `dyld_shared_cache` files headlessly, [`loader.dsc.autoLoadPattern`](settings.md) is a *very* useful setting to override. This is a regex you can have match all the files you *want* to analyze, skipping the need to use the Python or C++ API to load them manually.
116+
???+ Note "Note"
117+
If you are processing `dyld_shared_cache` files headlessly, [`loader.dsc.autoLoadPattern`](settings.md) is a *very* useful setting to override. This is a regex you can have match all the files you *want* to analyze, skipping the need to use the Python or C++ API to load them manually.
117118

118119
## Glossary
119120

0 commit comments

Comments
 (0)