hilda 3.0.0__py3-none-any.whl → 3.1.0__py3-none-any.whl
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/_version.py +2 -2
- hilda/breakpoints.py +27 -4
- hilda/decorators.py +45 -0
- hilda/hilda_client.py +2 -0
- hilda/launch_lldb.py +29 -12
- hilda/symbol.py +3 -0
- hilda/watchpoints.py +269 -0
- {hilda-3.0.0.dist-info → hilda-3.1.0.dist-info}/METADATA +92 -162
- {hilda-3.0.0.dist-info → hilda-3.1.0.dist-info}/RECORD +13 -12
- {hilda-3.0.0.dist-info → hilda-3.1.0.dist-info}/WHEEL +1 -1
- hilda/hilda_ascii_art.html +0 -40
- {hilda-3.0.0.dist-info → hilda-3.1.0.dist-info}/entry_points.txt +0 -0
- {hilda-3.0.0.dist-info → hilda-3.1.0.dist-info/licenses}/LICENSE +0 -0
- {hilda-3.0.0.dist-info → hilda-3.1.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: hilda
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.1.0
|
|
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>
|
|
@@ -55,6 +55,7 @@ Requires-Dist: inquirer3
|
|
|
55
55
|
Requires-Dist: traitlets
|
|
56
56
|
Provides-Extra: test
|
|
57
57
|
Requires-Dist: pytest; extra == "test"
|
|
58
|
+
Dynamic: license-file
|
|
58
59
|
|
|
59
60
|
# Hilda
|
|
60
61
|
|
|
@@ -152,165 +153,94 @@ You can may start a Hilda interactive shell by invoking any of the subcommand:
|
|
|
152
153
|
|
|
153
154
|
### Inside a Hilda shell
|
|
154
155
|
|
|
155
|
-
Upon starting Hilda
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
- `
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
- `
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
- `
|
|
176
|
-
|
|
177
|
-
- `
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
- `
|
|
184
|
-
|
|
185
|
-
- `peek`
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
- `
|
|
194
|
-
|
|
195
|
-
- `
|
|
196
|
-
|
|
197
|
-
- `
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
- `
|
|
204
|
-
|
|
205
|
-
- `
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
- `
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
force a return from function with the specified value
|
|
244
|
-
name=some_value
|
|
245
|
-
use `some_name` instead of the symbol name automatically extracted from the calling frame
|
|
246
|
-
override=True
|
|
247
|
-
override previous break point at same location
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
- `show_current_source`
|
|
251
|
-
- print current source code if possible
|
|
252
|
-
- `finish`
|
|
253
|
-
- Run current frame till its end.
|
|
254
|
-
- `step_into`
|
|
255
|
-
- Step into current instruction.
|
|
256
|
-
- `step_over`
|
|
257
|
-
- Step over current instruction.
|
|
258
|
-
- `breakpoints.clear`
|
|
259
|
-
- Remove all breakpoints
|
|
260
|
-
- `breakpoints.remove`
|
|
261
|
-
- Remove a single breakpoint
|
|
262
|
-
- `force_return`
|
|
263
|
-
- Prematurely return from a stack frame, short-circuiting exection of newer frames and optionally
|
|
264
|
-
yielding a specified value.
|
|
265
|
-
- `proc_info`
|
|
266
|
-
- Print information about currently running mapped process.
|
|
267
|
-
- `print_proc_entitlements`
|
|
268
|
-
- Get the plist embedded inside the process' __LINKEDIT section.
|
|
269
|
-
- `bp` or `breakpoints.add`
|
|
270
|
-
- Add a breakpoint
|
|
271
|
-
- `breakpoints.show`
|
|
272
|
-
- Show existing breakpoints
|
|
273
|
-
- `po`
|
|
274
|
-
- Print given object using LLDB's po command
|
|
275
|
-
Can also run big chunks of native code:
|
|
276
|
-
|
|
277
|
-
po('NSMutableString *s = [NSMutableString string]; [s appendString:@"abc"]; [s description]')
|
|
278
|
-
- `globalize_symbols`
|
|
279
|
-
- Make all symbols in python's global scope
|
|
280
|
-
- `jump`
|
|
281
|
-
- jump to given symbol
|
|
282
|
-
- `lldb_handle_command`
|
|
283
|
-
- Execute an LLDB command
|
|
284
|
-
For example:
|
|
285
|
-
lldb_handle_command('register read')
|
|
286
|
-
- `objc_get_class`
|
|
287
|
-
- Get ObjC class object
|
|
288
|
-
- `CFSTR`
|
|
289
|
-
- Create CFStringRef object from given string
|
|
290
|
-
- `ns`
|
|
291
|
-
- Create NSObject from given data
|
|
292
|
-
- `from_ns`
|
|
293
|
-
- Create python object from NS object.
|
|
294
|
-
- `evaluate_expression`
|
|
295
|
-
- Wrapper for LLDB's EvaluateExpression.
|
|
296
|
-
Used for quick code snippets.
|
|
297
|
-
|
|
298
|
-
Feel free to use local variables inside the expression using format string.
|
|
299
|
-
For example:
|
|
300
|
-
currentDevice = objc_get_class('UIDevice').currentDevice
|
|
301
|
-
evaluate_expression(f'[[{currentDevice} systemName] hasPrefix:@"2"]')
|
|
302
|
-
- `import_module`
|
|
303
|
-
- Import & reload given python module (intended mainly for external snippets)
|
|
304
|
-
- `unwind`
|
|
305
|
-
- Unwind the stack (useful when get_evaluation_unwind() == False)
|
|
306
|
-
- `set_selected_thread`
|
|
307
|
-
- sets the currently selected thread, which is used in other parts of the program, such as displaying disassembly or
|
|
308
|
-
checking registers.
|
|
309
|
-
This ensures the application focuses on the specified thread for these operations.
|
|
310
|
-
- `wait_for_module`
|
|
311
|
-
- Wait for a module to be loaded (`dlopen`) by checking if given expression is contained within its filename
|
|
312
|
-
|
|
313
|
-
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)
|
|
156
|
+
Upon starting Hilda, you are welcomed into an IPython shell.
|
|
157
|
+
You can access following methods via the variable `p`.
|
|
158
|
+
|
|
159
|
+
Basic flow control:
|
|
160
|
+
|
|
161
|
+
- `stop` - Stop process
|
|
162
|
+
- `cont` - Continue process
|
|
163
|
+
- `finish` - Run current function until return
|
|
164
|
+
- `step_into` - Step into current instruction
|
|
165
|
+
- `step_over` - Step over current instruction.
|
|
166
|
+
- `run_for` - Run the process for given interval
|
|
167
|
+
- `force_return` - Prematurely return from a stack frame, short-circuiting exection of inner
|
|
168
|
+
frames and optionally yielding a specified value.
|
|
169
|
+
- `jump` - Jump to given symbol
|
|
170
|
+
- `wait_for_module` - Wait for a module to be loaded (`dlopen`) by checking if given expression is contained within its filename
|
|
171
|
+
- `detach` - Detach from process (useful for exiting gracefully so the
|
|
172
|
+
process doesn't get killed when you exit)
|
|
173
|
+
|
|
174
|
+
Breakpoints:
|
|
175
|
+
- `bp` or `breakpoints.add` - Add a breakpoint
|
|
176
|
+
- `breakpoints.show` - Show existing breakpoints
|
|
177
|
+
- `breakpoints.remove` - Remove a single breakpoint
|
|
178
|
+
- `breakpoints.clear` - Remove all breakpoints
|
|
179
|
+
- `monitor` or `breakpoints.add_monitor` - Creates a breakpoint whose callback implements the requested features (print register vallues, execute commands, mock return value, etc.)
|
|
180
|
+
|
|
181
|
+
Basic read/write:
|
|
182
|
+
|
|
183
|
+
- `get_register` - Get register value
|
|
184
|
+
- `set_register` - Set register value
|
|
185
|
+
- `poke` - Write data at address
|
|
186
|
+
- `peek[_str,_std_str]` - Read buffer/C-string/`std::string` at address
|
|
187
|
+
- `po` - Print object using LLDB's `po` command
|
|
188
|
+
Can also run arbitrary native code:
|
|
189
|
+
|
|
190
|
+
```python
|
|
191
|
+
p.po('NSMutableString *s = [NSMutableString string]; [s appendString:@"abc"]; [s description]')
|
|
192
|
+
```
|
|
193
|
+
- `disass` - Print disassembly at address
|
|
194
|
+
- `show_current_source` - Print current source code (if possible)
|
|
195
|
+
- `bt` - Get backtrace
|
|
196
|
+
- `lsof` - Get all open FDs
|
|
197
|
+
- `hd` - Hexdump a buffer
|
|
198
|
+
- `proc_info` - Print information about currently running mapped process
|
|
199
|
+
- `print_proc_entitlements` - Get the plist embedded inside the process' __LINKEDIT section.
|
|
200
|
+
|
|
201
|
+
Execute code:
|
|
202
|
+
|
|
203
|
+
- `call` - Call function at given address with given parameters
|
|
204
|
+
- `objc_call` - Simulate a call to an objc selector
|
|
205
|
+
- `inject` - Inject a single library into currently running process
|
|
206
|
+
- `disable_jetsam_memory_checks` -
|
|
207
|
+
Disable jetsam memory checks (to prevent raising
|
|
208
|
+
`error: Execution was interrupted, reason: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=15 MB, unused=0x0).`
|
|
209
|
+
when evaluating expressions).
|
|
210
|
+
|
|
211
|
+
Hilda symbols:
|
|
212
|
+
|
|
213
|
+
- `symbol` - Get symbol object for a given address
|
|
214
|
+
- `objc_symbol` - Get objc symbol wrapper for given address
|
|
215
|
+
- `rebind_symbols` - Reparse all loaded images symbols
|
|
216
|
+
- `file_symbol` - Calculate symbol address without ASLR
|
|
217
|
+
- `save` - Save loaded symbols map (for loading later using the load() command)
|
|
218
|
+
- `load` - Load an existing symbols map (previously saved by the save() command)
|
|
219
|
+
- `globalize_symbols` - Make all symbols in python's global scope
|
|
220
|
+
|
|
221
|
+
Advanced:
|
|
222
|
+
|
|
223
|
+
- `lldb_handle_command` - Execute an LLDB command (e.g., `p.lldb_handle_command('register read')`)
|
|
224
|
+
- `evaluate_expression` - Use for quick code snippets (wrapper for LLDB's `EvaluateExpression`)
|
|
225
|
+
|
|
226
|
+
Take advantage of local variables inside the expression using format string, e.g.,
|
|
227
|
+
|
|
228
|
+
```python
|
|
229
|
+
currentDevice = p.objc_get_class('UIDevice').currentDevice
|
|
230
|
+
p.evaluate_expression(f'[[{currentDevice} systemName] hasPrefix:@"2"]')
|
|
231
|
+
```
|
|
232
|
+
- `import_module` - Import & reload given python module (intended mainly for external snippets)
|
|
233
|
+
- `unwind` - Unwind the stack (useful when get_evaluation_unwind() == False)
|
|
234
|
+
- `set_selected_thread` - sets the currently selected thread, which is used in other parts of the program, such as displaying disassembly or
|
|
235
|
+
checking registers.
|
|
236
|
+
This ensures the application focuses on the specified thread for these operations.
|
|
237
|
+
|
|
238
|
+
Objective-C related:
|
|
239
|
+
|
|
240
|
+
- `objc_get_class` - Get ObjC class object
|
|
241
|
+
- `CFSTR` - Create CFStringRef object from given string
|
|
242
|
+
- `ns` - Create NSObject from given data
|
|
243
|
+
- `from_ns` - Create python object from NS object.
|
|
314
244
|
|
|
315
245
|
#### Magic functions
|
|
316
246
|
|
|
@@ -672,7 +602,7 @@ commands so you are able to use complicated types when parsing values and passin
|
|
|
672
602
|
import datetime
|
|
673
603
|
|
|
674
604
|
# using the `ns` command we can just pass a python-native dictionary
|
|
675
|
-
function_requiring_a_specfic_dictionary(
|
|
605
|
+
function_requiring_a_specfic_dictionary(p.cf({
|
|
676
606
|
'key1': 'string', # will convert to NSString
|
|
677
607
|
'key2': True, # will convert to NSNumber
|
|
678
608
|
'key3': b'1234', # will convert to NSData
|
|
@@ -3,21 +3,22 @@ gifs/ui.png,sha256=iaRwNZ9qVWUkUe2TJb_6VPsTu--7HrElA2duWiyZ-Oc,131
|
|
|
3
3
|
gifs/xpc_print_message.gif,sha256=i5S8Y9bJm9n-NtOipFTAC8_jUR4uZCM4sOap_ccJX0k,939935
|
|
4
4
|
hilda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
hilda/__main__.py,sha256=KWRqvukK4wraxCMtvH5nO25mFXLO5aWXa7z_VfAtbO8,90
|
|
6
|
-
hilda/_version.py,sha256=
|
|
7
|
-
hilda/breakpoints.py,sha256=
|
|
6
|
+
hilda/_version.py,sha256=KrVRMDzlLQ07c4N1d6-nDOLo4hWpD8cSSFcYXWlm64k,511
|
|
7
|
+
hilda/breakpoints.py,sha256=WyUSTOJ-lQqki8ZpwAsAOCNazMFaJfd5p5HwdEZ84v8,20035
|
|
8
8
|
hilda/cli.py,sha256=PCjrI7GrERIrZCODJYmPt6eyl-nPYZviTS8fBG3oIjM,3618
|
|
9
9
|
hilda/common.py,sha256=El-ih7cvCv9PJ5OWb1jkCbh4GuaRD6gqlrFC5gyY-TE,498
|
|
10
|
+
hilda/decorators.py,sha256=iNowrDoFHX0qsqqU5NfMMPpETbaU_-ga_bxvnOmsQHw,962
|
|
10
11
|
hilda/exceptions.py,sha256=8L1OvOqns4O4ieiH4YlrMbZkk_PvuyCq4UyqFAodkF8,2042
|
|
11
|
-
hilda/
|
|
12
|
-
hilda/
|
|
13
|
-
hilda/launch_lldb.py,sha256=gU1iJmxuH7w5HV_cy1igv-JageyQn2dmqSxx8vkpY0k,8033
|
|
12
|
+
hilda/hilda_client.py,sha256=phSwiI3XfuLzMXlUw7-irbZbEgi7sEpDz2w7EGUUhf0,38897
|
|
13
|
+
hilda/launch_lldb.py,sha256=-lmxif-w53oeTCea6ZHLiYHChkMpdDDO_zgTFWpAU6E,8597
|
|
14
14
|
hilda/lldb_entrypoint.py,sha256=vTiClzfiTtjorlxEfIsI-W657KEGobx74qDhaZ8nPhM,1007
|
|
15
15
|
hilda/lldb_importer.py,sha256=TCGpAWwiBuyNRsbgcYawiqm35t8XQLCJwoOfEqyBeik,526
|
|
16
16
|
hilda/objective_c_class.py,sha256=AFGXFDkYUoHf_LVS6GJSyvMsIIYIviLx0PCa-f4pCT8,11561
|
|
17
17
|
hilda/objective_c_symbol.py,sha256=lIZHef5iZe3AeUsK0uIsDtFnzSM-Ad6i2wfdj9DwLUM,8269
|
|
18
18
|
hilda/registers.py,sha256=-9kk1MuKnWlJ0Z8zZ2RPV9nGRDtX1GXhCSkEvfnCktA,848
|
|
19
|
-
hilda/symbol.py,sha256=
|
|
19
|
+
hilda/symbol.py,sha256=UIDmnNq1tx1uORqgRNaO_gfW2y17mhyy4cz83UVFhcc,7623
|
|
20
20
|
hilda/symbols_jar.py,sha256=Vqdv6iH92P6aSfcz5XiR0FbNRqKuUu48mi-GxvPr32w,6504
|
|
21
|
+
hilda/watchpoints.py,sha256=ea5rBYNFEwYsPyWdPXMsbL1aElK9yfouuJg32rNcii4,9011
|
|
21
22
|
hilda/ipython_extensions/events.py,sha256=w_4V8FoJJMarWArEE8uzb2UXk1mqfslmI7XCyVb_XuE,1976
|
|
22
23
|
hilda/ipython_extensions/keybindings.py,sha256=W_Cnh8lG5yVdK5x0A-4UeyBsoJBufbYl54Mqrbo8OwM,1922
|
|
23
24
|
hilda/ipython_extensions/magics.py,sha256=ULb63-OyIaWwvSfwRvEG_65ibaI2RTxeX8yPJK8pbc0,1300
|
|
@@ -48,9 +49,9 @@ hilda/snippets/macho/macho_load_commands.py,sha256=vUWfFM2H6o8dMglXV7rHgh-EMTzS0
|
|
|
48
49
|
hilda/ui/colors.json,sha256=f-ITquY3IInQreviTy23JfmxfJrGM1_MivACf1GKGqM,262
|
|
49
50
|
hilda/ui/ui_manager.py,sha256=BmzI1sBx0PYCQDlB9Al7wsTEAMJxaJ7NW0DS4C7g5-0,2265
|
|
50
51
|
hilda/ui/views.py,sha256=bzClOgKirKYs6nhsNRXpkGNIg3oIOmFb659GLWrlTdo,7792
|
|
51
|
-
hilda-3.
|
|
52
|
-
hilda-3.
|
|
53
|
-
hilda-3.
|
|
54
|
-
hilda-3.
|
|
55
|
-
hilda-3.
|
|
56
|
-
hilda-3.
|
|
52
|
+
hilda-3.1.0.dist-info/licenses/LICENSE,sha256=M-LVJ0AFAYB82eueyl8brh-QLPe-iLNVgbCi79-3TDo,1078
|
|
53
|
+
hilda-3.1.0.dist-info/METADATA,sha256=ZWnTVzjqsJLwSRCY1g-uk4VDdMadXw1U5XmcgWrrgAI,21916
|
|
54
|
+
hilda-3.1.0.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
55
|
+
hilda-3.1.0.dist-info/entry_points.txt,sha256=9n3O3j6V3XnVR_GcFqCWNgRAbalfukTSW2WvghsLVmA,46
|
|
56
|
+
hilda-3.1.0.dist-info/top_level.txt,sha256=TVD7l1WkE1noT866YqPFhiQnjYCYZM5Xz54v_3EYpnI,11
|
|
57
|
+
hilda-3.1.0.dist-info/RECORD,,
|