Interactive Python tool to automate hard drive testing, data checking, and resale listing generation.
- 🔍 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
- Python 3.6+
- Linux system with
smartctl,lsblk,parted - sudo access
cd ~/drive-tester
chmod +x drive_tester.pyRun the interactive tool:
sudo ./drive_tester.py- Start the tool - Opens interactive menu
- Plug in drive - Tool auto-detects new drive
- Health check - Runs SMART diagnostics
- Data scan - Checks for personal files/data
- Wipe & format - Prepares drive for resale
- Generate listing - Creates Facebook Marketplace post with pricing
- Test new drive - Start testing workflow for newly plugged drive
- View statistics - See summary of all tested drives
- Exit - Quit the application
drive_test_log.json- Complete history of all tested driveslisting_<drive>_<timestamp>.txt- Generated marketplace listings
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)
- 1TB 7200 RPM: $25-30
- 1TB 5400 RPM: $20-25
- 750GB 7200 RPM (2.5"): $20-25
- 500GB-750GB: $15-20
- 250GB: $10-15
- Warns before wiping data
- Shows data found on drive
- Requires confirmation before formatting
- Automatically releases drive after test
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 ...]
{
"drives": [
{
"model": "ST1000DM003-1ER162",
"capacity": "1.00 TB",
"health": "PASSED",
"power_on_hours": "509",
"price": 30,
"timestamp": "2025-12-10T12:30:00"
}
]
}- Always run with
sudofor drive operations - Keep sda as system drive (automatically filtered)
- Unplug drive after "safe to unplug" message
- Review generated listings before posting
Created for automated hard drive resale workflow.