semvec/pypi-packages huggingface dataset:
rabboni-multi-python-sdk 1.0.0b1
Rabboni Python SDK
License: MIT
Requires Python: >=3.8

# rabboni-multi-python-sdk

## Requirements

requires Python >=3.8

## Installation

``` sh
pip install rabboni-multi-python-sdk
```

or

``` sh
python3 setup.py install
```

## Example

`rab_example.py`
``` sh
> python .\example\rab_example.py
已連接到 F6:20:ED:F3:5B:F2
Connected!
平放
平放
平放
直放
倒平放
倒平放
倒平放
倒平放
倒平放
倒平放
倒平放
倒平放
倒平放
倒平放
橫放
平放
平放
```

`rab_demo.py`

``` sh
> python .\example\rab_demo.py
已連接到 F6:20:ED:F3:5B:F2
Config: 16 2000 50
Power threshold :  605
You have 3 seconds!
Ready..Go!
GO!
3!
Power threshold: 605
Your Power :  10.316483999999999
You Loss!
Power threshold: 605
Your Power :  10.316483999999999
You Loss!
Power threshold: 605
Your Power :  10.316483999999999
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
2!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
1!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Power threshold: 605
Your Power :  12.0
You Loss!
Time's Up!
```
rlogfi 0.10
Detached PowerShell interactive session, but with full control
License: MIT
Keywords: PowerShell, Asyncio



## rlogfi provides a way to interact with PowerShell subprocesses in a detached and asynchronous manner

## pip install rlogfi

### Tested against Windows 10 / Python 3.11 / Anaconda / BlueStacks

### Asynchronous I/O: 
By using asyncio and aiofiles, the script can perform I/O operations asynchronously, allowing for more efficient handling of multiple subprocess streams simultaneously. This can be particularly useful when dealing with long-running commands or when responsiveness is crucial. It also helps to avoid deadlocks, since Start-Process allows the redirection of stdout/stdin: -RedirectStandardOutput / -RedirectStandardError 

### Detached Execution: 
The script creates a detached subprocess for running PowerShell commands, which means it operates independently of the parent process. This can be advantageous in scenarios where you need to run commands in the background or interact with PowerShell without blocking the main Python program. Instead of cmd.exe, you can start any other app that loops forever (e.g., a proxy server). The process won't close when Python closes.

### Error Handling and Reconnection: 
The script includes error handling mechanisms to handle exceptions and reconnect to the subprocess if the connection to stdin is lost. This ensures robustness in scenarios where the subprocess may encounter issues or terminate unexpectedly.

### Customization and Control: 
The class structure allows for customization of various parameters such as execution policy, working directory, and output redirection. Users can tailor the behavior of the subprocess to suit their specific requirements.

```py 
from rlogfi import PowerShellDetachedInteractive

interactivepwsh = PowerShellDetachedInteractive(
    executable=r"c:\windows\system32\cmd.exe",
    logfolder="c:\\newlogggg",
    working_dir=None,
    execution_policy="Unrestricted",
    arguments=["dir", "c:\\Windows"],
    WhatIf="",
    Verb="",
    UseNewEnvironment="",
    Wait="",
    stdinadd="",
    WindowStyle="Hidden",
)

# executing commandos 
stdout, stderr = interactivepwsh.sendcommand("dir")
print(stdout, stderr)
so, se = interactivepwsh.sendcommand("netstat")
so, se = interactivepwsh.sendcommand("cd\\")
so, se = interactivepwsh.sendcommand("ls")
```