Skip to content

TimeBather/WCDBRepair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WCDBRepair (Windows)

Based on WCDB C++ Corruption/Backup/Repair, this repo provides a Windows WCDB database repair CLI tool and builds artifacts via GitHub Actions.

Features

  • Corruption check: check (Database::checkIfCorrupted())
  • Manual backup: backup (Database::backup())
  • Repair: repair (Database::retrieve() with progress + score)
  • Deposit & cleanup: deposit / contains-deposited / remove-deposited
  • Encrypted DB: --key-hex / --cipher-page-size / --cipher-version
  • Plaintext key: --key (ASCII/UTF-8)
  • SQLCipher compatibility pragmas: --kdf-iter / --cipher-hmac-algorithm
  • More SQLCipher params: --cipher-default-kdf-algorithm / --cipher
  • SQL trace: enabled by default (disable via --no-sql-trace)

Build locally (Windows)

Requires: Visual Studio (MSVC), CMake, Ninja (recommended).

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
.\build\wcdb-repair.exe --help

Examples

# Check corruption (may be slow)
.\wcdb-repair.exe check "C:\path\to\db.sqlite"

# Repair (prints PROGRESS=... and RESULT=repair score=...)
.\wcdb-repair.exe repair "C:\path\to\db.sqlite"

# Encrypted DB repair (hex key)
.\wcdb-repair.exe repair "C:\path\to\db.sqlite" --key-hex 001122AABBCC --cipher-version 4 --cipher-page-size 4096

# Encrypted DB repair (plaintext key)
.\wcdb-repair.exe repair "C:\path\to\db.sqlite" --key "my-plaintext-key"

# Encrypted DB with non-default SQLCipher params
.\wcdb-repair.exe repair "C:\path\to\db.sqlite" --key-hex 001122AABBCC --kdf-iter 4000 --cipher-hmac-algorithm HMAC_SHA1

# SQLCipher: custom algorithms/cipher
.\wcdb-repair.exe repair "C:\path\to\db.sqlite" --key-hex 001122AABBCC --cipher-default-kdf-algorithm PBKDF2_HMAC_SHA512 --cipher aes-256-cbc

# Deposit (when repair fails or you want to postpone repair)
.\wcdb-repair.exe deposit "C:\path\to\db.sqlite"

GitHub Actions

Workflow: .github/workflows/build-windows.yml
Every push/PR builds on windows-latest and uploads wcdb-repair-windows.zip.

About

A simple repair tool for wcdb

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors