Skip to content

courasneto/DevPen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevPen — USB Drive Analyzer & Repair Tool

Professional USB flash drive testing, verification, and repair tool for Windows.

Features

  • Drive Detection — Auto-detect USB drives with detailed hardware info (WMI)
  • Speed Test — Sequential read/write, random 4K IOPS, and data integrity verification
  • Capacity Verification — Detect fake/counterfeit drives with block-by-block validation using SHA-256
  • Format — Quick or full format with exFAT, NTFS, or FAT32
  • Repair — CHKDSK integration for filesystem error correction and bad sector recovery
  • Risk Assessment — Automatic analysis of suspicious drive characteristics
  • Reports — Generate detailed TXT or HTML reports

Requirements

  • Windows 10 or later (x64)
  • .NET 8 Runtime (included in self-contained build)
  • Administrator privileges for Format and Repair operations

Building from Source

Prerequisites

Build

# Quick build
dotnet build src\DevPen\DevPen.csproj -c Release

# Publish self-contained executable
.\build.ps1

# Publish + create installer
.\build.ps1 -CreateInstaller -Clean

Project Structure

C:\DevPen\
├── src\DevPen\
│   ├── Models\          — Data models
│   ├── ViewModels\      — MVVM ViewModels
│   ├── Services\        — Business logic (detection, tests, format, repair)
│   ├── Infrastructure\  — MVVM base classes (ObservableObject, RelayCommand)
│   ├── Converters\      — WPF value converters
│   ├── Themes\          — Dark theme resources
│   ├── Assets\          — Icons and images
│   └── MainWindow.xaml  — Main application UI
├── installer\           — Inno Setup installer script
├── build.ps1            — Build and publish script
├── LICENSE
└── README.md

How It Works

Speed Test

Writes and reads a test file using FileOptions.WriteThrough (bypass OS cache) to measure true sequential speed. Random 4K tests measure small-file performance (IOPS). Data integrity is verified with SHA-256 hash comparison.

Capacity Verification

Writes blocks of deterministic random data across the drive, then reads them back and compares SHA-256 hashes. After each new block is written, the first block is re-verified to detect overwrite corruption (the hallmark of fake drives).

Risk Assessment

Analyzes drive characteristics to flag suspicious indicators:

  • Generic manufacturer/model names (common in counterfeits)
  • Unrealistic capacity claims (>512 GB for USB flash drives)
  • FAT32 filesystem on large drives
  • Non-standard sector sizes
  • Unhealthy SMART status

License

MIT License — see LICENSE for details.

Disclaimer

DevPen is provided as-is. Format and destructive operations cannot be undone. Always backup important data before using repair or format features.

About

USB Drive Analyzer & Repair Tool - Test speed, verify capacity, detect fake drives, format and repair. WPF .NET 8

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors