Jump to content

stripcodesig V1.5 for macOS, Linux and Windows


5 posts in this topic

Recommended Posts

I've updated stripcodesig.

It now supports resigning of stripped binaries.

It is built as a universal binary (ARM64 Silicon and X86_64 Intel).

EDIT: New features is that it now supports swapped binaries and 64 bit fat files

EDIT2: Added PowerPC support decently and swapped architectures

EDIT3: Added mach/machine.h, mach-o/fat.h mach-o/loader.h for building on older Mac OS. It even supports 10.5.


EDIT4: Added Github repo

https://github.com/andyvand/stripcodesig

 

EDIT5: It now runs on macOS 11.0 for Silicon ARM64, Mac OS X 10.6 for Intel and better

EDIT6: Swapping issue fixed

EDIT7: Fixed issue

EDIT8: Windows builds, Linux builds and macOS builds

EDIT9: Added legacy Mac OS X builds for Mac OS X 10.4 and better (PPC, PPC64, I386, X86_64)

EDIT10: Added signed legacy Mac OS X build

EDIT11: New version with extra architectures and better support for Mach-O FAT/FAT64 

EDIT12: Code cleanup (better code)

EDIT13: Fix CPU type for swapped binaries

stripcodesig.zip

Edited by Andy Vandijck
  • Like 5
Link to comment
Share on other sites

Added new support

Link to comment
Share on other sites

Hi @Andy Vandijck

unfortunately it doesn't seem to build on x86_64 (i'm on 10.13.6)

unless...

CC=clang
CODESIGN=codesign -f -s - -i "Apple Development"
#CODESIGN=codesign -f -s "-"
# CFLAGS=-arch arm64 -arch x86_64 -mmacosx-version-min=10.6 -O3
	
SHELL:=/bin/bash
.ONESHELL:
	ARCH=$(uname -m)

	if [[ ${ARCH} == x86_64 ]]; then
		CFLAGS=-arch x86_64 -mmacosx-version-min=10.6 -O3
	else
		CFLAGS=-arch arm64 -arch x86_64 -mmacosx-version-min=10.6 -O3
	fi
	
all: stripcodesig
		
stripcodesig: stripcodesig.c
		$(CC) $(CFLAGS) -g -O2 -I. -o $@ $<
		$(CODESIGN) $@

clean:
	rm -f stripcodesig

install: stripcodesig
	cp -f stripcodesig /usr/local/bin/

I did add:

- arch build support

- optimization level and dubug to clang

- the identifier flag to codesign which is required when using one or codesignature will fail.

Edited by LAbyOne
Link to comment
Share on other sites

Posted (edited)

Added Windows and Linux versions

EDIT: Added legacy Mac OS X version for Mac OS X 10.4 or better

EDIT2: Added signed legacy Mac OS X build
EDIT3: Legacy support works!

 

stripcodesig-MacOSX-legacy.png

Edited by Andy Vandijck
  • Like 1
Link to comment
Share on other sites

I have updated the code.

It now works for more binaries.

stripcodesig-macOS.png

  • Like 2
Link to comment
Share on other sites

 Share

×
×
  • Create New...