Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Hard Drive Testing & Resale Tool

Interactive Python tool to automate hard drive testing, data checking, and resale listing generation.

Features

  • 🔍 Auto-detect newly plugged drives
  • 🏥 SMART health checks with detailed diagnostics
  • 📊 Data scanning to check for personal files
  • 🧹 Auto-format drives for resale
  • 📝 Generate Facebook Marketplace listings automatically
  • 📈 Track statistics (pass/fail rates, total value)
  • 💾 JSON logging of all tested drives

Requirements

  • Python 3.6+
  • Linux system with smartctl, lsblk, parted
  • sudo access

Installation

cd ~/drive-tester
chmod +x drive_tester.py

Usage

Run the interactive tool:

sudo ./drive_tester.py

Workflow

  1. Start the tool - Opens interactive menu
  2. Plug in drive - Tool auto-detects new drive
  3. Health check - Runs SMART diagnostics
  4. Data scan - Checks for personal files/data
  5. Wipe & format - Prepares drive for resale
  6. Generate listing - Creates Facebook Marketplace post with pricing

Menu Options

  • Test new drive - Start testing workflow for newly plugged drive
  • View statistics - See summary of all tested drives
  • Exit - Quit the application

Output Files

  • drive_test_log.json - Complete history of all tested drives
  • listing_<drive>_<timestamp>.txt - Generated marketplace listings

Pricing Logic

The tool automatically suggests prices based on:

  • Capacity (larger = higher price)
  • RPM (7200 RPM = premium over 5400 RPM)
  • Form factor (3.5" desktop vs 2.5" laptop)
  • Brand/Model (WD Green = energy efficient pricing)
  • Usage hours (affects condition rating)

Price Ranges

  • 1TB 7200 RPM: $25-30
  • 1TB 5400 RPM: $20-25
  • 750GB 7200 RPM (2.5"): $20-25
  • 500GB-750GB: $15-20
  • 250GB: $10-15

Safety Features

  • Warns before wiping data
  • Shows data found on drive
  • Requires confirmation before formatting
  • Automatically releases drive after test

Example Session

Main Menu:
1. Test new drive
2. View statistics
3. Exit

Select option: 1

[Plug in drive and press Enter...]

════════════════════════════════════════════
          Scanning for Drive
════════════════════════════════════════════

✓ Drive detected: /dev/sdb (931.5G)

════════════════════════════════════════════
     Health Check: /dev/sdb
════════════════════════════════════════════

✓ SMART Health: PASSED

Drive Information:
  Model: ST1000DM003-1ER162
  Capacity: 1.00 TB
  Form Factor: 3.5 inches
  RPM: 7200 rpm
  Interface: SATA 6.0 Gb/s
  Power-on Hours: 509

✓ No concerning attributes found

[... continues with data scan, format, listing generation ...]

Log File Format

{
  "drives": [
    {
      "model": "ST1000DM003-1ER162",
      "capacity": "1.00 TB",
      "health": "PASSED",
      "power_on_hours": "509",
      "price": 30,
      "timestamp": "2025-12-10T12:30:00"
    }
  ]
}

Notes

  • Always run with sudo for drive operations
  • Keep sda as system drive (automatically filtered)
  • Unplug drive after "safe to unplug" message
  • Review generated listings before posting

Author

Created for automated hard drive resale workflow.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages