Skip to main content

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)

Source distribution for wish-command-execution 0.6.28
File Size Uploaded
wish_command_execution-0.6.28.tar.gz 43.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wish-command-execution 0.6.28
File Interpreter ABI Platform
wish_command_execution-0.6.28-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.6.28 This release

2 release files

0.6.27

2 release files

0.6.26

2 release files

0.6.25

2 release files

0.6.24

2 release files

0.6.23

2 release files

0.6.22

2 release files

0.6.21

2 release files

0.6.20

2 release files

0.6.19

2 release files

0.6.17

2 release files

0.6.16

2 release files

0.6.15

2 release files

0.6.14

2 release files

0.6.13

2 release files

0.6.12

2 release files

0.6.11

2 release files

0.6.10

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page