Like a simplfied 'dd' with extra security checks!
Find a file
2026-02-09 14:42:28 +01:00
.clang-format Clang-format 2026-02-07 17:20:00 +01:00
.gitignore Initial 2026-02-04 22:59:39 +01:00
crc32.h Bring in single-header crc32 2026-02-07 13:22:29 +01:00
LICENSE BSD 2-Clause 2026-02-04 23:22:53 +01:00
Makefile Remove commented CFLAGS appends for libudev 2026-02-09 13:53:26 +01:00
README.md Formatting 2026-02-07 18:44:40 +01:00
test.sh Simple test 2026-02-09 13:59:10 +01:00
writeimg.c Rename dev_name and filename to iname/oname in preparation for enabling file outputs 2026-02-09 14:42:28 +01:00

Simple dd-like image writer with additional security checks.

This tool verifies your image automatically. The block size is currently set to 1 MiB, which should be enough to avoid trouble.

writeimg v0.2.0, Rev. 5323932-dirty
In honor of SwePwnage - the OG disk destroyer
Copyright (C) 2026 Imbus, BSD-2-Clause
Build date: 2026-02-07

Usage:
   writeimg [-v] -d <device> <file.img>

Args:
   <file.img>          Binary image file
   -v                  Verify only
   -d device           Target block device
   -h, --help          Print this help message
   -n, --noconfirm     Do not ask for premission
   -V, --version       Print version

Testing

dd if=/dev/zero of=./disk.img bs=1M count=1024
losetup -fP ./disk.img
losetup -a
losedup -d /dev/loop0

Inspiration

See: