hilda 2.0.11__tar.gz → 2.0.12__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.11 → hilda-2.0.12}/PKG-INFO +3 -1
- {hilda-2.0.11 → hilda-2.0.12}/README.md +2 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/_version.py +2 -2
- {hilda-2.0.11 → hilda-2.0.12}/hilda/hilda_client.py +15 -5
- {hilda-2.0.11 → hilda-2.0.12}/hilda/objective_c_class.py +2 -3
- {hilda-2.0.11 → hilda-2.0.12}/hilda/objective_c_symbol.py +1 -2
- {hilda-2.0.11 → hilda-2.0.12}/hilda.egg-info/PKG-INFO +3 -1
- {hilda-2.0.11 → hilda-2.0.12}/.github/workflows/python-app.yml +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/.github/workflows/python-publish.yml +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/.gitignore +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/.pre-commit-config.yaml +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/LICENSE +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/gifs/.gitattributes +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/gifs/ui.png +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/gifs/xpc_print_message.gif +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/__init__.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/__main__.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/cli.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/common.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/exceptions.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/hilda_ascii_art.html +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/ipython_extensions/events.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/ipython_extensions/keybindings.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/ipython_extensions/magics.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/launch_lldb.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/lldb_entrypoint.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/lldb_importer.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/objective_c/from_ns_to_json.m +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/objective_c/get_objectivec_class_by_module.m +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/objective_c/get_objectivec_class_description.m +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/objective_c/get_objectivec_symbol_data.m +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/objective_c/lsof.m +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/objective_c/to_ns_from_json.m +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/registers.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/__init__.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/boringssl.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/collections.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/dyld.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/fs_utils.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/mach/CFRunLoopServiceMachPort_hooks.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/mach/__init__.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/macho/__init__.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/macho/all_image_infos.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/macho/apple_version.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/macho/image_info.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/macho/macho.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/macho/macho_load_commands.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/remotepairingd.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/syslog.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/uuid.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/snippets/xpc.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/symbol.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/symbols_jar.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/ui/colors.json +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/ui/ui_manager.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda/ui/views.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda.egg-info/SOURCES.txt +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda.egg-info/dependency_links.txt +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda.egg-info/entry_points.txt +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda.egg-info/requires.txt +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/hilda.egg-info/top_level.txt +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/pyproject.toml +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/requirements.txt +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/setup.cfg +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/__init__.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/conftest.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/test_hilda_client/test_from_ns.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/test_hilda_client/test_hilda_client.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/test_hilda_client/test_monitor.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/test_hilda_client/test_ns.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/test_hilda_client/test_rebind_symbols.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/test_hilda_client/test_registers.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/test_snippets/test_xpc.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/test_symbols/test_objective_c_class.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/test_symbols/test_objective_c_symbol.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/tests/test_symbols/test_symbol.py +0 -0
- {hilda-2.0.11 → hilda-2.0.12}/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.12
|
|
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>
|
|
@@ -189,6 +189,8 @@ Here is a gist of methods you can access from `p`:
|
|
|
189
189
|
- Stop process.
|
|
190
190
|
- `cont`
|
|
191
191
|
- Continue process.
|
|
192
|
+
- `run_for`
|
|
193
|
+
- Run the process for given interval.
|
|
192
194
|
- `detach`
|
|
193
195
|
- Detach from process.
|
|
194
196
|
Useful in order to exit gracefully so process doesn't get killed
|
|
@@ -132,6 +132,8 @@ Here is a gist of methods you can access from `p`:
|
|
|
132
132
|
- Stop process.
|
|
133
133
|
- `cont`
|
|
134
134
|
- Continue process.
|
|
135
|
+
- `run_for`
|
|
136
|
+
- Run the process for given interval.
|
|
135
137
|
- `detach`
|
|
136
138
|
- Detach from process.
|
|
137
139
|
Useful in order to exit gracefully so process doesn't get killed
|
|
@@ -146,6 +146,7 @@ class HildaClient:
|
|
|
146
146
|
self._dynamic_env_loaded = False
|
|
147
147
|
self._symbols_loaded = False
|
|
148
148
|
self.globals: typing.MutableMapping[str, Any] = globals()
|
|
149
|
+
self._hilda_root = Path(__file__).parent
|
|
149
150
|
|
|
150
151
|
# the frame called within the context of the hit BP
|
|
151
152
|
self._bp_frame = None
|
|
@@ -168,7 +169,7 @@ class HildaClient:
|
|
|
168
169
|
Get dictionary of all open FDs
|
|
169
170
|
:return: Mapping between open FDs and their paths
|
|
170
171
|
"""
|
|
171
|
-
data = (
|
|
172
|
+
data = (self._hilda_root / 'objective_c' / 'lsof.m').read_text()
|
|
172
173
|
result = json.loads(self.po(data))
|
|
173
174
|
# convert FDs into int
|
|
174
175
|
return {int(k): v for k, v in result.items()}
|
|
@@ -347,6 +348,16 @@ class HildaClient:
|
|
|
347
348
|
if not self.process.Stop().Success():
|
|
348
349
|
self.log_critical('failed to stop process')
|
|
349
350
|
|
|
351
|
+
def run_for(self, seconds: float) -> None:
|
|
352
|
+
"""
|
|
353
|
+
Run the process for a given time
|
|
354
|
+
:return:
|
|
355
|
+
"""
|
|
356
|
+
self.cont()
|
|
357
|
+
self.logger.info(f'Running for {seconds} seconds')
|
|
358
|
+
time.sleep(seconds)
|
|
359
|
+
self.stop()
|
|
360
|
+
|
|
350
361
|
def cont(self, *args) -> None:
|
|
351
362
|
""" Continue process. """
|
|
352
363
|
is_running = self.process.GetState() == lldb.eStateRunning
|
|
@@ -828,8 +839,7 @@ class HildaClient:
|
|
|
828
839
|
json_data = json.dumps({'root': data}, default=self._to_ns_json_default)
|
|
829
840
|
except TypeError as e:
|
|
830
841
|
raise ConvertingToNsObjectError from e
|
|
831
|
-
|
|
832
|
-
obj_c_code = (Path(__file__).parent / 'objective_c' / 'to_ns_from_json.m').read_text()
|
|
842
|
+
obj_c_code = (self._hilda_root / 'objective_c' / 'to_ns_from_json.m').read_text()
|
|
833
843
|
expression = obj_c_code.replace('__json_object_dump__', json_data.replace('"', r'\"'))
|
|
834
844
|
try:
|
|
835
845
|
return self.evaluate_expression(expression)
|
|
@@ -842,7 +852,7 @@ class HildaClient:
|
|
|
842
852
|
:param address: NS object.
|
|
843
853
|
:return: Python object.
|
|
844
854
|
"""
|
|
845
|
-
obj_c_code = (
|
|
855
|
+
obj_c_code = (self._hilda_root / 'objective_c' / 'from_ns_to_json.m').read_text()
|
|
846
856
|
address = f'0x{address:x}' if isinstance(address, int) else address
|
|
847
857
|
expression = obj_c_code.replace('__ns_object_address__', address)
|
|
848
858
|
try:
|
|
@@ -1212,7 +1222,7 @@ class HildaClient:
|
|
|
1212
1222
|
continue
|
|
1213
1223
|
objc_classlist = m.FindSection('__DATA').FindSubSection('__objc_classlist')
|
|
1214
1224
|
objc_classlist_addr = self.symbol(objc_classlist.GetLoadAddress(self.target))
|
|
1215
|
-
obj_c_code = (
|
|
1225
|
+
obj_c_code = (self._hilda_root / 'objective_c' / 'get_objectivec_class_by_module.m').read_text()
|
|
1216
1226
|
obj_c_code = obj_c_code.replace('__count_objc_class', f'{objc_classlist.size // 8}').replace(
|
|
1217
1227
|
'__objc_class_list',
|
|
1218
1228
|
f'{objc_classlist_addr}')
|
|
@@ -3,7 +3,6 @@ import time
|
|
|
3
3
|
from collections import namedtuple
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
from functools import partial
|
|
6
|
-
from pathlib import Path
|
|
7
6
|
from typing import Any
|
|
8
7
|
from uuid import uuid4
|
|
9
8
|
|
|
@@ -120,7 +119,7 @@ class Class(object):
|
|
|
120
119
|
:param hilda.hilda_client.HildaClient client: Hilda client.
|
|
121
120
|
:param class_name: Class name.
|
|
122
121
|
"""
|
|
123
|
-
obj_c_code = (
|
|
122
|
+
obj_c_code = (client._hilda_root / 'objective_c' / 'get_objectivec_class_description.m').read_text()
|
|
124
123
|
obj_c_code = obj_c_code.replace('__class_address__', '0').replace('__class_name__', class_name)
|
|
125
124
|
class_symbol = Class(client, class_data=json.loads(client.po(obj_c_code)))
|
|
126
125
|
if class_symbol.name != class_name:
|
|
@@ -143,7 +142,7 @@ class Class(object):
|
|
|
143
142
|
Reload class object data.
|
|
144
143
|
Should be used whenever the class layout changes (for example, during method swizzling)
|
|
145
144
|
"""
|
|
146
|
-
obj_c_code = (
|
|
145
|
+
obj_c_code = (self._client._hilda_root / 'objective_c' / 'get_objectivec_class_description.m').read_text()
|
|
147
146
|
obj_c_code = obj_c_code.replace('__class_address__', f'{self._class_object:d}')
|
|
148
147
|
obj_c_code = obj_c_code.replace('__class_name__', self.name)
|
|
149
148
|
self._load_class_data(json.loads(self._client.po(obj_c_code)))
|
|
@@ -2,7 +2,6 @@ import json
|
|
|
2
2
|
from contextlib import suppress
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
from functools import partial
|
|
5
|
-
from pathlib import Path
|
|
6
5
|
|
|
7
6
|
from objc_types_decoder.decode import decode as decode_type
|
|
8
7
|
from pygments import highlight
|
|
@@ -60,7 +59,7 @@ class ObjectiveCSymbol(Symbol):
|
|
|
60
59
|
self.methods.clear()
|
|
61
60
|
self.class_ = None
|
|
62
61
|
|
|
63
|
-
obj_c_code = (
|
|
62
|
+
obj_c_code = (self._client._hilda_root / 'objective_c' / 'get_objectivec_symbol_data.m').read_text()
|
|
64
63
|
obj_c_code = obj_c_code.replace('__symbol_address__', f'{self:d}')
|
|
65
64
|
data = json.loads(self._client.po(obj_c_code))
|
|
66
65
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hilda
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.12
|
|
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>
|
|
@@ -189,6 +189,8 @@ Here is a gist of methods you can access from `p`:
|
|
|
189
189
|
- Stop process.
|
|
190
190
|
- `cont`
|
|
191
191
|
- Continue process.
|
|
192
|
+
- `run_for`
|
|
193
|
+
- Run the process for given interval.
|
|
192
194
|
- `detach`
|
|
193
195
|
- Detach from process.
|
|
194
196
|
Useful in order to exit gracefully so process doesn't get killed
|
|
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
|