RedC2
- 3 Devlogs
- 3 Total hours
Custom Remote Administration Research Platform
Custom Remote Administration Research Platform
REDC2 DEVLOG 3 - squashed two nasty bugs
Spent today hunting down two bugs that were making the SSH terminal panel basically unusable.
Bug #1: crashing on select
Selecting a machine from the command bar threw a DuplicateIds exception and killed the terminal widget. Turns out Textual’s Widget.remove() is async — it just schedules the removal, it doesn’t happen instantly. My code was removing the old terminal widget and then immediately mounting a new one with the same hardcoded id (ssh-terminal), so the two calls raced each other and Textual saw two widgets claiming the same id at once. Fixed it by giving each terminal instance a unique id (ssh-terminal-1, ssh-terminal-2, …) instead of reusing one.
Bug #2: invisible typing in the command bar
Typing into the main redc2> input box showed nothing on screen even though the input was working fine under the hood. Textual’s Input widget defaults to a border: tall style that needs ~3 rows to actually render the text row. My CSS forced the input down to height: 1 without accounting for the border, so the text row got squeezed to zero height and effectively vanished. Fix: stripped the border and added proper padding on the compact input.
Both fixed now — dashboard select → terminal open → typing all work smoothly. Butter on warm bread. 🧈🍞
REDC2 Devlog 2 - Floating Terminal Feature
Date: Aug 16, 2026
So I added a floating terminal panel to REDC2. The whole thing took a few hours.
Why
The dashboard was fine but having all command output in a separate section meant you couldn’t see both the machine status and what you just ran at the same time. Wanted the output accessible with a quick keybind without cluttering the main view.
How
Added a new FloatingTerminal container that sits in an overlay layer. It’s reactive so toggling visibility is smooth. Ctrl+T brings it up/down. All command output gets mirrored there automatically via the logging pipeline.
Used Textual’s layer system to keep it from blocking the dashboard. Size and position are just CSS (width/height/offset), so it’s easy to customize.
The Issues
Initial CSS used right/bottom which Textual doesn’t support. Switched to offset. That fixed it.Paramiko had version issues with keys. Downgraded to 3.4.1 and added password auth support to the config since most people just want to use passwords anyway.SSH key format stuff is annoying. Just went with password auth as default and made it dead simple.
What Works
Toggle with Ctrl+TReal-time command outputScrollable history (max 2000 lines)Doesn’t block dashboard interactionWorks over SSH fine
What’s Left
Draggable terminal (low priority)Copy/paste in terminal (Textual limitation)Separate shell session option (would need more work)
It’s production ready though. Deployed to homelab and it just works.
Stats:
~100 lines of new code1 file modified (app.py)0 breaking changesWorks with password or key authNo new dependencies
Pretty solid for an afternoon’s work.
REDC2 devlog #1
Started REDC2, a small terminal tool for SSHing into my own machines (an Ubuntu server and a Raspberry Pi) without opening a new terminal every time. You type list, get an id for each machine, then select 0 and it just runs real ssh under the hood. No custom protocol, just a nicer front end for something I already do constantly.
Spent today mostly fixing bugs from the first rough version. select was calling ssh_into(), a function that didn’t exist, so picking a machine just crashed. Also had bad indentation, the quit/exit handling was nested inside the select block instead of next to it, and the main guard was indented inside main() so the script never actually ran.
Fixed both, then added colorama for colored output (green connecting, red errors, yellow on abort), and handling for when ssh isn’t installed at all, it checks /etc/os-release to find the distro and offers to install openssh instead of just crashing.
Machines are still hardcoded in a list at the top of the file, works but doesn’t scale. Next up is moving that into a config file so I don’t have to edit the script to add a machine, and adding a status check so list shows which machines are actually reachable.