r/PowerShell • u/SlashRevet • Jun 14 '26
Misc I built Disbatch — point it at a PowerShell script and it generates a GUI (with a static risk analyzer)
I never really trusted running .ps1 scripts I found online — I couldn't always tell what they actually did before hitting enter. So I built Disbatch to make scripts easier to understand and use: open one, and it shows you a readable preview, flags risky patterns, reads the param() block and generates matching controls — folder/file pickers, checkboxes, dropdowns (ValidateSet), number/text fields — then runs it in an embedded ConPTY terminal with a live progress bar.
A few things I cared about:
- Static risk analyzer — flags download-and-execute, encoded commands, keyloggers, persistence, shadow-copy deletion, etc., and gates the Run button on warning-level findings. It's a heuristic speed-bump, not antivirus — obfuscated code can evade it, and "no findings" never means "safe." It just surfaces what a script can do so you read it before running.
- Mapper — when detection misses something, you click a line in the preview to bind it to a control. No config files to hand-edit.
- Sidecar — control mappings, hints and last-used values save to
<script>.disbatch.jsonnext to the script, so you can commit it and share with your team.
Single ~4 MB exe, 100% offline, no telemetry. Built in Rust (egui). Also does basic .bat/.cmd positional args.
Heads up: the released binary is unsigned, so SmartScreen will warn — there's a note in the README explaining why and how to verify (or just build from source).
It's an early release and I'd love feedback, especially on the analyzer rules and any param patterns the parser mis-reads.