Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: python -m twine check --strict dist/*
- name: Test installed wheel
run: |
python -m pip install dist/*.whl
python -m pip install "$(echo dist/*.whl)[tui]"
python -I tests/test_qltool.py InstalledQltool_Test -v
- uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 4 additions & 2 deletions ARCHITECTURE/modules/cli-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ examples/tests belongs to its runtime owner.

Use the [root baseline](../../ARCHITECTURE.md#code-conventions).
`argparse` actions convert enum/environment inputs and build `Qiling` keyword
arguments. Preserve option names and exit status. TUI uses questionary/fx/
termcolor; testing its import is not testing its prompts. Keep build metadata
arguments. Preserve option names and exit status. TUI uses questionary/termcolor/fx, all
shipped in the `tui` extra and absent from a default install; `qiling.cli`
must degrade with an install hint rather than traceback when it is missing.
Testing its import is not testing its prompts. Keep build metadata
in the manifest, resolve its lock with Poetry, and retain package license
and resource attribution. Documentation here contains coding context only.

Expand Down
2 changes: 1 addition & 1 deletion ARCHITECTURE/modules/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ paths are explicitly owned by hardware/bare-metal modules.
## Local Conventions

Use [root conventions](../../ARCHITECTURE.md#code-conventions); optional
packages use manifest extras `fuzz` and `RE`. Format classes expose
packages use manifest extras `fuzz` and `RE` (the terminal UI uses `tui`). Format classes expose
`FORMAT_NAME` and activate/deactivate/dump methods; imports register subclasses
with factories. No common C standard is declared for fuzz harnesses; inspect
the local `fuzz.c`/build instructions. Generated SDK stubs require review;
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ Qiling also provides a friendly tool named `qltool` to quickly emulate shellcode
Installing Qiling with pip also installs the `qltool` command, including
`qltool qltui` for the terminal UI. In a source checkout, use `./qltool` as
shown below. Example binaries and rootfs files must be downloaded separately.
The `qltool qltui` terminal UI is an optional extra: install it with
`pip install qiling[tui]`.

With qltool, easy execution can be performed:

Expand Down
79 changes: 50 additions & 29 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,20 @@ gevent = ">=24.10"
multiprocess = ">=0.70.12.2"
windows-curses = { version = "^2.1.0", markers = "platform_system == 'Windows'" }
pyyaml = "^6.0.1"
python-fx = "*"
questionary = "*"
termcolor = "*"

unicornafl = { version = "^2.0.0", markers = "platform_system != 'Windows'", optional = true }
fuzzercorn = { version = "^0.0.1", markers = "platform_system == 'Linux'", optional = true }

r2libr = { version = "^5.7.4", optional = true }

python-fx = { version = "*", optional = true }
questionary = { version = "*", optional = true }
termcolor = { version = "*", optional = true }

[tool.poetry.extras]
fuzz = ["unicornafl", "fuzzercorn"]
RE = ["r2libr"]
tui = ["python-fx", "questionary", "termcolor"]

[build-system]
requires = ["poetry-core>=2.0,<3.0"]
Expand Down
6 changes: 5 additions & 1 deletion qiling/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ def run():
ql_args = {}

if options.subcommand == 'qltui':
import qltui
try:
import qltui
except ImportError:
parser.error('the qltui subcommand requires the "tui" extra; install it with: pip install qiling[tui]')

options = qltui.get_data()
qltui_enabled = True

Expand Down
Loading