hilda 2.0.6__tar.gz → 2.0.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hilda-2.0.6 → hilda-2.0.8}/PKG-INFO +30 -27
- {hilda-2.0.6 → hilda-2.0.8}/README.md +29 -26
- {hilda-2.0.6 → hilda-2.0.8}/hilda/_version.py +2 -2
- {hilda-2.0.6 → hilda-2.0.8}/hilda/hilda_client.py +25 -1
- {hilda-2.0.6 → hilda-2.0.8}/hilda/symbol.py +7 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda.egg-info/PKG-INFO +30 -27
- {hilda-2.0.6 → hilda-2.0.8}/.github/workflows/python-app.yml +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/.github/workflows/python-publish.yml +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/.gitignore +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/.pre-commit-config.yaml +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/LICENSE +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/gifs/.gitattributes +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/gifs/ui.png +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/gifs/xpc_print_message.gif +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/__init__.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/__main__.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/cli.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/common.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/exceptions.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/hilda_ascii_art.html +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/ipython_extensions/events.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/ipython_extensions/keybindings.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/ipython_extensions/magics.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/launch_lldb.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/lldb_entrypoint.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/lldb_importer.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/objective_c/from_ns_to_json.m +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/objective_c/get_objectivec_class_by_module.m +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/objective_c/get_objectivec_class_description.m +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/objective_c/get_objectivec_symbol_data.m +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/objective_c/lsof.m +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/objective_c/to_ns_from_json.m +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/objective_c_class.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/objective_c_symbol.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/registers.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/__init__.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/boringssl.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/collections.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/dyld.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/fs_utils.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/mach/CFRunLoopServiceMachPort_hooks.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/mach/__init__.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/macho/__init__.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/macho/all_image_infos.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/macho/apple_version.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/macho/image_info.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/macho/macho.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/macho/macho_load_commands.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/remotepairingd.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/syslog.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/uuid.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/snippets/xpc.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/symbols_jar.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/ui/colors.json +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/ui/ui_manager.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda/ui/views.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda.egg-info/SOURCES.txt +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda.egg-info/dependency_links.txt +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda.egg-info/entry_points.txt +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda.egg-info/requires.txt +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/hilda.egg-info/top_level.txt +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/pyproject.toml +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/requirements.txt +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/setup.cfg +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/__init__.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/conftest.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/test_hilda_client/test_from_ns.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/test_hilda_client/test_hilda_client.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/test_hilda_client/test_monitor.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/test_hilda_client/test_ns.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/test_hilda_client/test_rebind_symbols.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/test_hilda_client/test_registers.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/test_snippets/test_xpc.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/test_symbols/test_objective_c_class.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/test_symbols/test_objective_c_symbol.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/test_symbols/test_symbol.py +0 -0
- {hilda-2.0.6 → hilda-2.0.8}/tests/test_symbols/test_symbols_jar.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hilda
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.8
|
|
4
4
|
Summary: LLDB wrapped and empowered by iPython's features
|
|
5
5
|
Author-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>, netanel cohen <netanelc305@protonmail.com>
|
|
6
6
|
Maintainer-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>, netanel cohen <netanelc305@protonmail.com>
|
|
@@ -207,38 +207,39 @@ Here is a gist of methods you can access from `p`:
|
|
|
207
207
|
- Call function at given address with given parameters
|
|
208
208
|
- `monitor`
|
|
209
209
|
- Monitor every time a given address is called
|
|
210
|
+
|
|
210
211
|
The following options are available:
|
|
211
212
|
|
|
212
213
|
```
|
|
213
214
|
regs={reg1: format}
|
|
214
|
-
|
|
215
|
+
will print register values
|
|
215
216
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
217
|
+
Available formats:
|
|
218
|
+
x: hex
|
|
219
|
+
s: string
|
|
220
|
+
cf: use CFCopyDescription() to get more informative description of the object
|
|
221
|
+
po: use LLDB po command
|
|
222
|
+
User defined function, will be called like `format_function(hilda_client, value)`.
|
|
222
223
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
224
|
+
For example:
|
|
225
|
+
regs={'x0': 'x'} -> x0 will be printed in HEX format
|
|
226
|
+
expr={lldb_expression: format}
|
|
227
|
+
lldb_expression can be for example '$x0' or '$arg1'
|
|
228
|
+
format behaves just like 'regs' option
|
|
229
|
+
retval=format
|
|
230
|
+
Print function's return value. The format is the same as regs format.
|
|
231
|
+
stop=True
|
|
232
|
+
force a stop at every hit
|
|
233
|
+
bt=True
|
|
234
|
+
print backtrace
|
|
235
|
+
cmd=[cmd1, cmd2]
|
|
236
|
+
run several LLDB commands, one by another
|
|
237
|
+
force_return=value
|
|
238
|
+
force a return from function with the specified value
|
|
239
|
+
name=some_value
|
|
240
|
+
use `some_name` instead of the symbol name automatically extracted from the calling frame
|
|
241
|
+
override=True
|
|
242
|
+
override previous break point at same location
|
|
242
243
|
```
|
|
243
244
|
|
|
244
245
|
- `show_current_source`
|
|
@@ -305,6 +306,8 @@ Here is a gist of methods you can access from `p`:
|
|
|
305
306
|
- sets the currently selected thread, which is used in other parts of the program, such as displaying disassembly or
|
|
306
307
|
checking registers.
|
|
307
308
|
This ensures the application focuses on the specified thread for these operations.
|
|
309
|
+
- `wait_for_module`
|
|
310
|
+
- Wait for a module to be loaded (`dlopen`) by checking if given expression is contained within its filename
|
|
308
311
|
|
|
309
312
|
All these methods are available from the global `p` within the newly created IPython shell. In addition, you may invoke any of the exported APIs described in the [Python API](#python-api)
|
|
310
313
|
|
|
@@ -150,38 +150,39 @@ Here is a gist of methods you can access from `p`:
|
|
|
150
150
|
- Call function at given address with given parameters
|
|
151
151
|
- `monitor`
|
|
152
152
|
- Monitor every time a given address is called
|
|
153
|
+
|
|
153
154
|
The following options are available:
|
|
154
155
|
|
|
155
156
|
```
|
|
156
157
|
regs={reg1: format}
|
|
157
|
-
|
|
158
|
+
will print register values
|
|
158
159
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
160
|
+
Available formats:
|
|
161
|
+
x: hex
|
|
162
|
+
s: string
|
|
163
|
+
cf: use CFCopyDescription() to get more informative description of the object
|
|
164
|
+
po: use LLDB po command
|
|
165
|
+
User defined function, will be called like `format_function(hilda_client, value)`.
|
|
165
166
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
167
|
+
For example:
|
|
168
|
+
regs={'x0': 'x'} -> x0 will be printed in HEX format
|
|
169
|
+
expr={lldb_expression: format}
|
|
170
|
+
lldb_expression can be for example '$x0' or '$arg1'
|
|
171
|
+
format behaves just like 'regs' option
|
|
172
|
+
retval=format
|
|
173
|
+
Print function's return value. The format is the same as regs format.
|
|
174
|
+
stop=True
|
|
175
|
+
force a stop at every hit
|
|
176
|
+
bt=True
|
|
177
|
+
print backtrace
|
|
178
|
+
cmd=[cmd1, cmd2]
|
|
179
|
+
run several LLDB commands, one by another
|
|
180
|
+
force_return=value
|
|
181
|
+
force a return from function with the specified value
|
|
182
|
+
name=some_value
|
|
183
|
+
use `some_name` instead of the symbol name automatically extracted from the calling frame
|
|
184
|
+
override=True
|
|
185
|
+
override previous break point at same location
|
|
185
186
|
```
|
|
186
187
|
|
|
187
188
|
- `show_current_source`
|
|
@@ -248,6 +249,8 @@ Here is a gist of methods you can access from `p`:
|
|
|
248
249
|
- sets the currently selected thread, which is used in other parts of the program, such as displaying disassembly or
|
|
249
250
|
checking registers.
|
|
250
251
|
This ensures the application focuses on the specified thread for these operations.
|
|
252
|
+
- `wait_for_module`
|
|
253
|
+
- Wait for a module to be loaded (`dlopen`) by checking if given expression is contained within its filename
|
|
251
254
|
|
|
252
255
|
All these methods are available from the global `p` within the newly created IPython shell. In addition, you may invoke any of the exported APIs described in the [Python API](#python-api)
|
|
253
256
|
|
|
@@ -511,7 +511,8 @@ class HildaClient:
|
|
|
511
511
|
:param dict options: User defined options.
|
|
512
512
|
"""
|
|
513
513
|
bp = bp_loc.GetBreakpoint()
|
|
514
|
-
|
|
514
|
+
|
|
515
|
+
symbol = hilda.symbol(hilda.frame.addr.GetLoadAddress(hilda.target)) # type: Symbol
|
|
515
516
|
|
|
516
517
|
# by default, attempt to resolve the symbol name through lldb
|
|
517
518
|
name = str(symbol.lldb_symbol)
|
|
@@ -1043,6 +1044,24 @@ class HildaClient:
|
|
|
1043
1044
|
|
|
1044
1045
|
return value
|
|
1045
1046
|
|
|
1047
|
+
def wait_for_module(self, expression: str) -> None:
|
|
1048
|
+
""" Wait for a module to be loaded using `dlopen` by matching given expression """
|
|
1049
|
+
self.log_info(f'Waiting for module name containing "{expression}" to be loaded')
|
|
1050
|
+
|
|
1051
|
+
def bp(client: HildaClient, frame, bp_loc, options) -> None:
|
|
1052
|
+
loading_module_name = client.evaluate_expression('$arg1').peek_str()
|
|
1053
|
+
client.log_info(f'Loading module: {loading_module_name}')
|
|
1054
|
+
if expression not in loading_module_name:
|
|
1055
|
+
client.cont()
|
|
1056
|
+
return
|
|
1057
|
+
client.finish()
|
|
1058
|
+
client.log_info(f'Desired module has been loaded: {expression}. Process remains stopped')
|
|
1059
|
+
bp = bp_loc.GetBreakpoint()
|
|
1060
|
+
client.remove_hilda_breakpoint(bp.id)
|
|
1061
|
+
|
|
1062
|
+
self.bp('dlopen', bp)
|
|
1063
|
+
self.cont()
|
|
1064
|
+
|
|
1046
1065
|
def interact(self, additional_namespace: Optional[typing.Mapping] = None,
|
|
1047
1066
|
startup_files: Optional[List[str]] = None) -> None:
|
|
1048
1067
|
""" Start an interactive Hilda shell """
|
|
@@ -1166,6 +1185,11 @@ class HildaClient:
|
|
|
1166
1185
|
else:
|
|
1167
1186
|
return f'{value:x} (unsupported format)'
|
|
1168
1187
|
|
|
1188
|
+
@cached_property
|
|
1189
|
+
def _object_identifier(self) -> Symbol:
|
|
1190
|
+
return self.symbols.objc_getClass('VMUObjectIdentifier').objc_call('alloc').objc_call(
|
|
1191
|
+
'initWithTask:', self.symbols.mach_task_self())
|
|
1192
|
+
|
|
1169
1193
|
@cached_property
|
|
1170
1194
|
def _ks(self) -> Optional['Ks']:
|
|
1171
1195
|
if not lldb.KEYSTONE_SUPPORT:
|
|
@@ -104,6 +104,13 @@ class Symbol(int):
|
|
|
104
104
|
"""
|
|
105
105
|
return self._client.symbols.CFCopyDescription(self).po()
|
|
106
106
|
|
|
107
|
+
@property
|
|
108
|
+
def name(self) -> str:
|
|
109
|
+
symbol_info = int(self._client.po(f'[{self._client._object_identifier} symbolForAddress:{self}]', '__int128'))
|
|
110
|
+
arg1 = symbol_info & 0xffffffffffffffff
|
|
111
|
+
arg2 = symbol_info >> 64
|
|
112
|
+
return self._client.symbols.CSSymbolGetName(arg1, arg2).peek_str()
|
|
113
|
+
|
|
107
114
|
@contextmanager
|
|
108
115
|
def change_item_size(self, new_item_size: int) -> None:
|
|
109
116
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hilda
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.8
|
|
4
4
|
Summary: LLDB wrapped and empowered by iPython's features
|
|
5
5
|
Author-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>, netanel cohen <netanelc305@protonmail.com>
|
|
6
6
|
Maintainer-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>, netanel cohen <netanelc305@protonmail.com>
|
|
@@ -207,38 +207,39 @@ Here is a gist of methods you can access from `p`:
|
|
|
207
207
|
- Call function at given address with given parameters
|
|
208
208
|
- `monitor`
|
|
209
209
|
- Monitor every time a given address is called
|
|
210
|
+
|
|
210
211
|
The following options are available:
|
|
211
212
|
|
|
212
213
|
```
|
|
213
214
|
regs={reg1: format}
|
|
214
|
-
|
|
215
|
+
will print register values
|
|
215
216
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
217
|
+
Available formats:
|
|
218
|
+
x: hex
|
|
219
|
+
s: string
|
|
220
|
+
cf: use CFCopyDescription() to get more informative description of the object
|
|
221
|
+
po: use LLDB po command
|
|
222
|
+
User defined function, will be called like `format_function(hilda_client, value)`.
|
|
222
223
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
224
|
+
For example:
|
|
225
|
+
regs={'x0': 'x'} -> x0 will be printed in HEX format
|
|
226
|
+
expr={lldb_expression: format}
|
|
227
|
+
lldb_expression can be for example '$x0' or '$arg1'
|
|
228
|
+
format behaves just like 'regs' option
|
|
229
|
+
retval=format
|
|
230
|
+
Print function's return value. The format is the same as regs format.
|
|
231
|
+
stop=True
|
|
232
|
+
force a stop at every hit
|
|
233
|
+
bt=True
|
|
234
|
+
print backtrace
|
|
235
|
+
cmd=[cmd1, cmd2]
|
|
236
|
+
run several LLDB commands, one by another
|
|
237
|
+
force_return=value
|
|
238
|
+
force a return from function with the specified value
|
|
239
|
+
name=some_value
|
|
240
|
+
use `some_name` instead of the symbol name automatically extracted from the calling frame
|
|
241
|
+
override=True
|
|
242
|
+
override previous break point at same location
|
|
242
243
|
```
|
|
243
244
|
|
|
244
245
|
- `show_current_source`
|
|
@@ -305,6 +306,8 @@ Here is a gist of methods you can access from `p`:
|
|
|
305
306
|
- sets the currently selected thread, which is used in other parts of the program, such as displaying disassembly or
|
|
306
307
|
checking registers.
|
|
307
308
|
This ensures the application focuses on the specified thread for these operations.
|
|
309
|
+
- `wait_for_module`
|
|
310
|
+
- Wait for a module to be loaded (`dlopen`) by checking if given expression is contained within its filename
|
|
308
311
|
|
|
309
312
|
All these methods are available from the global `p` within the newly created IPython shell. In addition, you may invoke any of the exported APIs described in the [Python API](#python-api)
|
|
310
313
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|