The `ChannelFile` implementation raised a BlockingIOError in certain
circumstances which is against the documented implementation for a
subclass of `RawIOBase`. This was causing odd behaviour like occasional
missing command output (e.g. empty environment variables)
- Added return statement to `sessions` in case of out-of-bounds session ID
- Replaced the `$fg[color]` syntax with the basic color interface as defined in `man 1 zshmisc`
The older variable value isn't working, I have modified it accordingly matching the original color scheme. However, I have used a different value to show current working directory so that the home directory appears as '~', you may want to use '$PWD' instead
The zsh shell uses a different syntax for colored prompts. As such, I've
divided the prompt setup into three different options based on the
basename of the active shell: `sh` (uncolored), `zsh` and `default`.
Other shells can be added to `Linux.PROMPTS` as needed in the future.
- Added rust requirements for cryptography.
- Removed installing requirements.txt as it's no longer needed.
- Added a call to `--download-plugins` to ensure plugins are bundled automatically.
For linux, we used to send one or two EOFs via C-d to the process to
signal exit, however this was inconsistent. Depending on the previous
input from the attacker, sometimes one was needed, sometimes two.
Sometimes, we even observed more than two being needed. Instead, we now
simply loop sending one at a time and checking for the end delimeter.
This will be slightly slower, but avoids hangups or accidentally closing
the shell.
The old logic for exiting the process when writing to a file was flawed.
I also increased the block size for `dd` to ensure it reads data as
quickly as possible while we upload.
- Updated documentation for Plugin API
- Updated README with notes on Windows support
- Added plugin API to Windows C2
- Added GitHub Action to package Windows plugins and attach to releases automatically.
- Added early support for BadPotato supported by [pwncat-badpotato](https://github.com/calebstewart/pwncat-badpotato) plugin (step toward #106)
Windows.abspath used to cause a FileNotFoundError when the file did not
exist. It now correctly resolves relative paths for files which don't
yet exist.