#!/bin/bash here=$(dirname "$0") test -n "$here" -a -d "$here" || exit cd $here if ! which osslsigncode > /dev/null 2>&1; then echo "Please install osslsigncode" exit fi if [ $# -ne 2 ]; then echo "Usage: $0 signed_binary unsigned_binary" exit fi out="$1-stripped.exe" set -ex echo "Step 1: Remove PE signature from signed binary" osslsigncode remove-signature -in $1 -out $out echo "Step 2: Remove checksum from signed binary" python3 <