#!/bin/bash ########################################################################### ## Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 ## ## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ## ## rights of fair usage, the disclaimer and warranty conditions. ## ########################################################################### SILENT=0 if [[ $1 == "-s" ]]; then SILENT=1 fi for i in `find . -type f`; do FT=`file -b $i | awk '{ print $1 }'` case $FT in Mach-O ) EXE=`file -b $i | awk '{ print $2 }'` if [[ $EXE == "executable" ]]; then OP="Signed: " sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' $i ldid -S $i fi ;; Korn ) ;& Bourne ) OP="Exec: " chmod +x $i ;; * ) OP="" ;; esac if ( [[ $SILENT -eq 0 ]] && [[ ! -z $OP ]] ); then echo -n $OP echo $i fi done