idare2 0.1.0__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.
Files changed (88) hide show
  1. idare2-0.1.0/.github/workflows/ci.yml +82 -0
  2. idare2-0.1.0/.github/workflows/publish.yml +130 -0
  3. idare2-0.1.0/.gitignore +223 -0
  4. idare2-0.1.0/CHANGELOG.md +34 -0
  5. idare2-0.1.0/LICENSE +21 -0
  6. idare2-0.1.0/PKG-INFO +309 -0
  7. idare2-0.1.0/README.md +278 -0
  8. idare2-0.1.0/RELEASING.md +216 -0
  9. idare2-0.1.0/pyproject.toml +86 -0
  10. idare2-0.1.0/src/idare2/__init__.py +10 -0
  11. idare2-0.1.0/src/idare2/__main__.py +6 -0
  12. idare2-0.1.0/src/idare2/argv.py +342 -0
  13. idare2-0.1.0/src/idare2/assembler.py +199 -0
  14. idare2-0.1.0/src/idare2/cli.py +498 -0
  15. idare2-0.1.0/src/idare2/cmd/__init__.py +306 -0
  16. idare2-0.1.0/src/idare2/cmd/analysis.py +418 -0
  17. idare2-0.1.0/src/idare2/cmd/extras.py +347 -0
  18. idare2-0.1.0/src/idare2/cmd/flag.py +249 -0
  19. idare2-0.1.0/src/idare2/cmd/ic.py +133 -0
  20. idare2-0.1.0/src/idare2/cmd/ida.py +153 -0
  21. idare2-0.1.0/src/idare2/cmd/info.py +674 -0
  22. idare2-0.1.0/src/idare2/cmd/meta.py +249 -0
  23. idare2-0.1.0/src/idare2/cmd/meta_info.py +48 -0
  24. idare2-0.1.0/src/idare2/cmd/misc.py +603 -0
  25. idare2-0.1.0/src/idare2/cmd/print.py +1604 -0
  26. idare2-0.1.0/src/idare2/cmd/search.py +237 -0
  27. idare2-0.1.0/src/idare2/cmd/seek.py +216 -0
  28. idare2-0.1.0/src/idare2/cmd/types.py +335 -0
  29. idare2-0.1.0/src/idare2/cmd/write.py +315 -0
  30. idare2-0.1.0/src/idare2/complete.py +152 -0
  31. idare2-0.1.0/src/idare2/config.py +222 -0
  32. idare2-0.1.0/src/idare2/errors.py +159 -0
  33. idare2-0.1.0/src/idare2/expr.py +349 -0
  34. idare2-0.1.0/src/idare2/filter.py +956 -0
  35. idare2-0.1.0/src/idare2/flags.py +87 -0
  36. idare2-0.1.0/src/idare2/fmt/__init__.py +88 -0
  37. idare2-0.1.0/src/idare2/fmt/colors.py +75 -0
  38. idare2-0.1.0/src/idare2/fmt/disasm.py +202 -0
  39. idare2-0.1.0/src/idare2/fmt/graph.py +141 -0
  40. idare2-0.1.0/src/idare2/fmt/listing.py +340 -0
  41. idare2-0.1.0/src/idare2/fmt/memory.py +243 -0
  42. idare2-0.1.0/src/idare2/fmt/xrefs.py +54 -0
  43. idare2-0.1.0/src/idare2/nexus.py +322 -0
  44. idare2-0.1.0/src/idare2/parser.py +278 -0
  45. idare2-0.1.0/src/idare2/pf.py +444 -0
  46. idare2-0.1.0/src/idare2/pipe.py +67 -0
  47. idare2-0.1.0/src/idare2/protocol.py +107 -0
  48. idare2-0.1.0/src/idare2/remote/__init__.py +11 -0
  49. idare2-0.1.0/src/idare2/remote/dispatch.py +117 -0
  50. idare2-0.1.0/src/idare2/remote/elf.py +1243 -0
  51. idare2-0.1.0/src/idare2/remote/entry.py +36 -0
  52. idare2-0.1.0/src/idare2/remote/helpers.py +271 -0
  53. idare2-0.1.0/src/idare2/remote/ops/__init__.py +30 -0
  54. idare2-0.1.0/src/idare2/remote/ops/analysis.py +657 -0
  55. idare2-0.1.0/src/idare2/remote/ops/comments.py +138 -0
  56. idare2-0.1.0/src/idare2/remote/ops/decompile.py +152 -0
  57. idare2-0.1.0/src/idare2/remote/ops/disasm.py +302 -0
  58. idare2-0.1.0/src/idare2/remote/ops/info.py +843 -0
  59. idare2-0.1.0/src/idare2/remote/ops/memory.py +134 -0
  60. idare2-0.1.0/src/idare2/remote/ops/search.py +270 -0
  61. idare2-0.1.0/src/idare2/remote/ops/session.py +207 -0
  62. idare2-0.1.0/src/idare2/remote/ops/strings.py +290 -0
  63. idare2-0.1.0/src/idare2/remote/ops/types.py +666 -0
  64. idare2-0.1.0/src/idare2/remote/ops/write.py +161 -0
  65. idare2-0.1.0/src/idare2/rpc.py +123 -0
  66. idare2-0.1.0/src/idare2/session.py +742 -0
  67. idare2-0.1.0/tests/integration/test_arch_matrix.py +264 -0
  68. idare2-0.1.0/tests/integration/test_live.py +1025 -0
  69. idare2-0.1.0/tests/parity/test_parity.py +853 -0
  70. idare2-0.1.0/tests/test_argv.py +157 -0
  71. idare2-0.1.0/tests/test_assembler.py +149 -0
  72. idare2-0.1.0/tests/test_cli.py +238 -0
  73. idare2-0.1.0/tests/test_complete.py +111 -0
  74. idare2-0.1.0/tests/test_elf.py +452 -0
  75. idare2-0.1.0/tests/test_expr.py +105 -0
  76. idare2-0.1.0/tests/test_filter.py +304 -0
  77. idare2-0.1.0/tests/test_fmt.py +542 -0
  78. idare2-0.1.0/tests/test_import_order.py +60 -0
  79. idare2-0.1.0/tests/test_nexus.py +153 -0
  80. idare2-0.1.0/tests/test_packaging.py +32 -0
  81. idare2-0.1.0/tests/test_parser.py +157 -0
  82. idare2-0.1.0/tests/test_pf.py +201 -0
  83. idare2-0.1.0/tests/test_registry.py +130 -0
  84. idare2-0.1.0/tests/test_remote_ops.py +934 -0
  85. idare2-0.1.0/tests/test_rpc.py +111 -0
  86. idare2-0.1.0/tests/test_session.py +3330 -0
  87. idare2-0.1.0/tools/arch_matrix.py +86 -0
  88. idare2-0.1.0/uv.lock +770 -0
@@ -0,0 +1,82 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: ci-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ test:
18
+ name: Test Python ${{ matrix.python-version }}
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
24
+ steps:
25
+ - uses: actions/checkout@v7
26
+ with:
27
+ persist-credentials: false
28
+ - name: Set up Python
29
+ uses: actions/setup-python@v7
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+ - name: Set up uv
33
+ uses: astral-sh/setup-uv@v10.3.3
34
+ with:
35
+ enable-cache: true
36
+ cache-dependency-glob: uv.lock
37
+ - name: Install dependencies
38
+ run: uv sync --group dev
39
+ - name: Run tests
40
+ run: uv run pytest
41
+
42
+ lint:
43
+ name: Lint
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@v7
47
+ with:
48
+ persist-credentials: false
49
+ - name: Set up Python
50
+ uses: actions/setup-python@v7
51
+ with:
52
+ python-version: "3.13"
53
+ - name: Set up uv
54
+ uses: astral-sh/setup-uv@v10.3.3
55
+ with:
56
+ enable-cache: true
57
+ cache-dependency-glob: uv.lock
58
+ - name: Install dependencies
59
+ run: uv sync --group dev
60
+ - name: Check style
61
+ run: uv run ruff check .
62
+
63
+ build:
64
+ name: Build distributions
65
+ runs-on: ubuntu-latest
66
+ steps:
67
+ - uses: actions/checkout@v7
68
+ with:
69
+ persist-credentials: false
70
+ - name: Set up Python
71
+ uses: actions/setup-python@v7
72
+ with:
73
+ python-version: "3.13"
74
+ - name: Set up uv
75
+ uses: astral-sh/setup-uv@v10.3.3
76
+ with:
77
+ enable-cache: true
78
+ cache-dependency-glob: uv.lock
79
+ - name: Build sdist and wheel
80
+ run: uv build
81
+ - name: Validate package metadata
82
+ run: uv run --with twine twine check dist/*
@@ -0,0 +1,130 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+ inputs:
8
+ target:
9
+ description: Index to publish to
10
+ required: true
11
+ default: testpypi
12
+ type: choice
13
+ options:
14
+ - testpypi
15
+ - pypi
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ test:
22
+ name: Test before release
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v7
26
+ with:
27
+ persist-credentials: false
28
+ - name: Set up Python
29
+ uses: actions/setup-python@v7
30
+ with:
31
+ python-version: "3.13"
32
+ - name: Set up uv
33
+ uses: astral-sh/setup-uv@v10.3.3
34
+ with:
35
+ enable-cache: true
36
+ cache-dependency-glob: uv.lock
37
+ - name: Install dependencies
38
+ run: uv sync --group dev
39
+ - name: Run tests
40
+ run: uv run pytest
41
+ - name: Check style
42
+ run: uv run ruff check .
43
+
44
+ build:
45
+ name: Build distributions
46
+ needs: test
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - uses: actions/checkout@v7
50
+ with:
51
+ persist-credentials: false
52
+ - name: Set up Python
53
+ uses: actions/setup-python@v7
54
+ with:
55
+ python-version: "3.x"
56
+ - name: Check that the tag matches the package version
57
+ if: startsWith(github.ref, 'refs/tags/v')
58
+ run: |
59
+ python - <<'PY'
60
+ import os
61
+ import pathlib
62
+ import re
63
+ import sys
64
+
65
+ tag = os.environ["GITHUB_REF_NAME"].removeprefix("v")
66
+ text = pathlib.Path("src/idare2/__init__.py").read_text(encoding="utf-8")
67
+ match = re.search(r'^__version__ = "([^"]+)"', text, re.MULTILINE)
68
+ version = match.group(1) if match else "<missing>"
69
+ if tag != version:
70
+ sys.exit(f"tag {tag!r} does not match package version {version!r}")
71
+ PY
72
+ - name: Install build frontend and validator
73
+ run: python -m pip install --upgrade build twine
74
+ - name: Build sdist and wheel
75
+ run: python -m build
76
+ - name: Validate package metadata
77
+ run: python -m twine check dist/*
78
+ - name: Store distribution packages
79
+ uses: actions/upload-artifact@v7
80
+ with:
81
+ name: python-package-distributions
82
+ path: dist/
83
+ if-no-files-found: error
84
+
85
+ publish-to-testpypi:
86
+ name: Publish to TestPyPI
87
+ if: >-
88
+ github.event_name == 'workflow_dispatch' &&
89
+ inputs.target == 'testpypi'
90
+ needs: build
91
+ runs-on: ubuntu-latest
92
+ environment:
93
+ name: testpypi
94
+ url: https://test.pypi.org/p/idare2
95
+ permissions:
96
+ contents: read
97
+ id-token: write
98
+ steps:
99
+ - name: Download all the dists
100
+ uses: actions/download-artifact@v8
101
+ with:
102
+ name: python-package-distributions
103
+ path: dist/
104
+ - name: Publish to TestPyPI
105
+ uses: pypa/gh-action-pypi-publish@release/v1
106
+ with:
107
+ repository-url: https://test.pypi.org/legacy/
108
+ skip-existing: true
109
+
110
+ publish-to-pypi:
111
+ name: Publish to PyPI
112
+ if: >-
113
+ github.event_name == 'release' ||
114
+ (github.event_name == 'workflow_dispatch' && inputs.target == 'pypi')
115
+ needs: build
116
+ runs-on: ubuntu-latest
117
+ environment:
118
+ name: pypi
119
+ url: https://pypi.org/p/idare2
120
+ permissions:
121
+ contents: read
122
+ id-token: write
123
+ steps:
124
+ - name: Download all the dists
125
+ uses: actions/download-artifact@v8
126
+ with:
127
+ name: python-package-distributions
128
+ path: dist/
129
+ - name: Publish to PyPI
130
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,223 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ *.lcov
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ # Pipfile.lock
97
+
98
+ # uv
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ # poetry.lock
110
+ # poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
115
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
116
+ # pdm.lock
117
+ # pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # pixi
122
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
123
+ # pixi.lock
124
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
125
+ # in the .venv directory. It is recommended not to include this directory in version control.
126
+ .pixi/*
127
+ !.pixi/config.toml
128
+
129
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130
+ __pypackages__/
131
+
132
+ # Celery stuff
133
+ celerybeat-schedule*
134
+ celerybeat.pid
135
+
136
+ # Redis
137
+ *.rdb
138
+ *.aof
139
+ *.pid
140
+
141
+ # RabbitMQ
142
+ mnesia/
143
+ rabbitmq/
144
+ rabbitmq-data/
145
+
146
+ # ActiveMQ
147
+ activemq-data/
148
+
149
+ # SageMath parsed files
150
+ *.sage.py
151
+
152
+ # Environments
153
+ .env
154
+ .envrc
155
+ .venv
156
+ env/
157
+ venv/
158
+ ENV/
159
+ env.bak/
160
+ venv.bak/
161
+
162
+ # Spyder project settings
163
+ .spyderproject
164
+ .spyproject
165
+
166
+ # Rope project settings
167
+ .ropeproject
168
+
169
+ # mkdocs/Zensical documentation
170
+ /site
171
+
172
+ # mypy
173
+ .mypy_cache/
174
+ .dmypy.json
175
+ dmypy.json
176
+
177
+ # Pyre type checker
178
+ .pyre/
179
+
180
+ # pytype static type analyzer
181
+ .pytype/
182
+
183
+ # Cython debug symbols
184
+ cython_debug/
185
+
186
+ # PyCharm
187
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
188
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
189
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
190
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
191
+ # .idea/
192
+
193
+ # Abstra
194
+ # Abstra is an AI-powered process automation framework.
195
+ # Ignore directories containing user credentials, local state, and settings.
196
+ # Learn more at https://abstra.io/docs
197
+ .abstra/
198
+
199
+ # Visual Studio Code
200
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
201
+ # can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
202
+ # and can be added to the global gitignore or merged into this file. However, if you prefer, you
203
+ # could uncomment the following to ignore the entire vscode folder
204
+ # .vscode/
205
+ # Temporary file for partial code execution
206
+ tempCodeRunnerFile.py
207
+
208
+ # Ruff stuff:
209
+ .ruff_cache/
210
+
211
+ # PyPI configuration file
212
+ .pypirc
213
+
214
+ # Marimo
215
+ marimo/_static/
216
+ marimo/_lsp/
217
+ __marimo__/
218
+
219
+ # Streamlit
220
+ .streamlit/secrets.toml
221
+
222
+ # Local-only design/development notes (contain environment-specific paths).
223
+ /docs/
@@ -0,0 +1,34 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.1.0] - 2026-11-13
11
+
12
+ ### Added
13
+
14
+ - Initial public release.
15
+ - radare2-style interactive and batch CLI over IDA Pro databases through
16
+ `ida-nexus`.
17
+ - Disassembly, memory, information, analysis, search, write, metadata, type,
18
+ flag, and session commands, including radare2 operators such as `@`, `~`, `|`,
19
+ `>`, and `@@`.
20
+ - JSON output via `-j` and command-level `j` suffixes.
21
+ - Raw-binary import hints for architecture, bitness, byte order, and load base.
22
+ - Attach/detach support for running IDA GUI sessions and managed idalib workers.
23
+ - Startup rc files, persistent command history, and tab completion.
24
+ - Optional `pasm2` fallback for processors without an IDA assembler.
25
+
26
+ ### Packaging
27
+
28
+ - PEP 639 license metadata, a single-sourced version, and validated sdist/wheel
29
+ builds.
30
+ - GitHub Actions CI across Python 3.11-3.14 and PyPI/TestPyPI Trusted
31
+ Publishing workflows.
32
+
33
+ [Unreleased]: https://github.com/fire3/idare2/compare/v0.1.0...HEAD
34
+ [0.1.0]: https://github.com/fire3/idare2/releases/tag/v0.1.0
idare2-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 fire3
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.