wish-command-execution
Command execution package for wish.
Overview
wish-command-execution is a Python package that provides command execution functionality for the wish ecosystem. It allows executing commands on different backend shells (bash, Sliver C2, etc.) and tracking their execution status.
Installation
pip install wish-command-execution
Or for development:
git clone https://github.com/SecDev-Lab/wish.git
cd wish/wish-command-execution
uv pip install -e .
Usage
Basic Usage
from wish_models import Wish
from wish_command_execution import CommandExecutor
from wish_command_execution.backend import BashBackend
def main():
# Create a wish
wish = Wish.create("List files")
# Create a backend
backend = BashBackend()
# Create a command executor
executor = CommandExecutor(backend)
# Execute a command
cmd_num = 1
executor.execute_command(wish, "ls -la", cmd_num)
# Check running commands
executor.check_running_commands()
# Print the result when completed
for result in wish.command_results:
print(f"Command: {result.command}")
print(f"Exit code: {result.exit_code}")
print(f"State: {result.state}")
if __name__ == "__main__":
main()
Using Different Backends
from wish_command_execution.backend import create_backend
from wish_command_execution.backend.factory import BashConfig, SliverConfig
# Using Bash backend with custom log summarizer
def my_log_summarizer(log_files):
return "Custom log summary"
config = BashConfig(log_summarizer=my_log_summarizer)
backend = create_backend(config)
# Using Sliver backend
config = SliverConfig(
session_id="your-session-id",
client_config_path="/path/to/sliver/config"
)
backend = create_backend(config) # Will raise NotImplementedError currently
Metadata
Release files for wish-command-execution 0.6.28
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wish_command_execution-0.6.28.tar.gz | 43.6 kB | Without provenance | Details for wish_command_execution-0.6.28.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wish_command_execution-0.6.28-py3-none-any.whl | Python 3 | none | any | Details for wish_command_execution-0.6.28-py3-none-any.whl |
Total release size: 85.5 kB
Release files / wish_command_execution-0.6.28.tar.gz
| Download URL | wish_command_execution-0.6.28.tar.gz |
|---|---|
| Size | 43.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f50109bd6d0361d879edf1e1a91b81c74dc5b019063496aa83f65108e2374ff
|
|
BLAKE2b-256 checksum How to use checksums |
971a12a255987e050403ddfda56e00d96f68e6207422f3d4b2417cf4bb524f7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / wish_command_execution-0.6.28-py3-none-any.whl
| Download URL | wish_command_execution-0.6.28-py3-none-any.whl |
|---|---|
| Size | 41.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18c59bf67b66e57ff7d3da99369f2b8619b9afcfafd19dd05226382448b4673e
|
|
BLAKE2b-256 checksum How to use checksums |
2b1b7b7c695d25f68396671045da361cdc4d54f703b32740ffe9cdf1613cfd06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for wish-command-execution 0.6.28
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.