Skip to content
Security
Command

/op-wipe

Securely wipe files, directories, or free space using multi-pass overwrite

From plugin
fsociety
2263 skills7 agents63 commands
> /plugin marketplace add ogrodev/fsociety
> /plugin install fsociety@ogrodev-fsociety

Command definition

op-wipe.md
description: Securely wipe files, directories, or free space using multi-pass overwrite
allowed-tools: Bash, Read, AskUserQuestion
argument-hint: <path> [--passes 3|7|35] [--method shred|srm|dd]

> **Storage Policy**: ALL output files MUST be saved in the project directory. NEVER write to /tmp/ or any system temporary directory.

Secure File Wipe

Target and options: `$ARGUMENTS`

1. Parse `$ARGUMENTS` for target path, `--passes` (default `3`), and `--method` (default `shred`). Validate that the target path exists and is accessible.

2. **ALWAYS** ask the user for explicit confirmation before wiping via `AskUserQuestion`. Display the exact paths that will be destroyed, the number of passes, and the method. Make clear this operation is **irreversible**.

3. **For files**: Execute the secure wipe using the selected method:

  • `shred`: `shred -vfz -n <passes> <file>` — overwrite with random data, then zero-fill final pass
  • `srm`: `srm -z <file>` — secure remove with zero-fill
  • `dd`: `dd if=/dev/urandom of=<file> bs=4096 count=<filesize/4096> conv=notrunc && sync && rm <file>` — overwrite with urandom then delete

4. **For directories**: Recursively wipe all file contents within the directory first (applying the selected method to each file), then remove the empty directory structure with `rm -rf`.

5. **For free space**: Fill remaining free space on the mount point with random data, sync, then remove:

   dd if=/dev/urandom of=<mount>/wipefile bs=1M
   sync
   rm <mount>/wipefile

6. Log the wipe operation to the ops tracker:

   node "${CLAUDE_PLUGIN_ROOT}/scripts/ops-tracker.js" add <target> secure-wipe <method> "<path>" <passes> <result>

7. Verify the file or directory is completely gone. Attempt to read the path and confirm it no longer exists. For free space wipes, confirm the wipefile was removed.

Read more
@ogrodev
Ships withfsociety

Multi-plugin marketplace for Claude Code offensive security plugins

2225 skills7 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
22
Star history of ogrodev/fsociety on GitHub, a chart by star-history.com

Other commands on fsociety.

apiscan

apiscan

Command

API security audit — REST, GraphQL, JWT analysis, parameter discovery

@ogrodev@ogrodevInstall Command

More commands from other plugins.

deslop-reborn

deslop-reborn

Command

One iteration of the IronClaw Reborn de-slop loop — take ONE Reborn crate, fan out parallel review sub-agents (thermo-nuclear…

@nearai@nearaiInstall Command
audit

audit

Command

Audit a file, directory, or whole repo for insecure default configuration: fallback secrets, default credentials, fail-open…

@trailofbits@trailofbitsInstall Command
arsenal

arsenal

Command

Show which external bug-bounty tools are installed on this machine and print install hints for the missing ones. Curated from…

@awarexone@awarexoneInstall Command