Skip to content

Instantly share code, notes, and snippets.

View fiechr's full-sized avatar

Christian Fiebig fiechr

View GitHub Profile
@fiechr
fiechr / wipedev.sh
Created July 17, 2023 10:23
Simple shell script to overwrite beginning and end of block devices with zeros.
#!/bin/bash
#set -x
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you need to be root to do that."
exit 1
fi
if [ -b "$1" ]; then
DEVICE="$1"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import hashlib
import os
import re
import shutil
import sys