From 7fa3ba0b7d314570bff1a56229de38a9a11f92b9 Mon Sep 17 00:00:00 2001 From: nganhkhoa Date: Mon, 26 Aug 2024 16:01:42 +0700 Subject: [PATCH] remote strings PoC for C/Obj-C/Swift --- research/strings_empty/build.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/research/strings_empty/build.sh b/research/strings_empty/build.sh index a7fd74b..b5e6be4 100755 --- a/research/strings_empty/build.sh +++ b/research/strings_empty/build.sh @@ -48,28 +48,28 @@ swiftc -o $OUT/swift_code tests/swift_code.swift clang++ -mmacosx-version-min=$VERSION -o $OUT/librestore_c.dylib -shared -Wl,-reexport_library restore.cc # objc program -# ../../macho-go/bin/ios-wrapper pepe -o $OUT/objc_code_fixed -b $OUT/objc_code.bcell -l $OUT/librestore_objc.dylib --remove-strings $OUT/objc_code -# ../../macho-go/bin/ios-wrapper bcell2header -b $OUT/c_code.bcell -o $OUT/restore.h -# clang++ -mmacosx-version-min=$VERSION -o $OUT/librestore_objc.dylib -shared -Wl,-reexport_library restore.cc +../../macho-go/bin/ios-wrapper pepe -o $OUT/objc_code_fixed -b $OUT/objc_code.bcell -l $OUT/librestore_objc.dylib --remove-strings $OUT/objc_code +../../macho-go/bin/ios-wrapper bcell2header -b $OUT/c_code.bcell -o $OUT/restore.h +clang++ -mmacosx-version-min=$VERSION -o $OUT/librestore_objc.dylib -shared -Wl,-reexport_library restore.cc # swift program -# ../../macho-go/bin/ios-wrapper pepe -o $OUT/swift_code_fixed -b $OUT/swift_code.bcell -l $OUT/librestore_swift.dylib --remove-strings $OUT/swift_code -# ../../macho-go/bin/ios-wrapper bcell2header -b $OUT/c_code.bcell -o $OUT/restore.h -# clang++ -mmacosx-version-min=$VERSION -o $OUT/librestore_swift.dylib -shared -Wl,-reexport_library restore.cc +../../macho-go/bin/ios-wrapper pepe -o $OUT/swift_code_fixed -b $OUT/swift_code.bcell -l $OUT/librestore_swift.dylib --remove-strings $OUT/swift_code +../../macho-go/bin/ios-wrapper bcell2header -b $OUT/c_code.bcell -o $OUT/restore.h +clang++ -mmacosx-version-min=$VERSION -o $OUT/librestore_swift.dylib -shared -Wl,-reexport_library restore.cc # executable chmod +x $OUT/c_code_fixed -# chmod +x $OUT/objc_code_fixed -# chmod +x $OUT/swift_code_fixed +chmod +x $OUT/objc_code_fixed +chmod +x $OUT/swift_code_fixed # resign codesign --force --deep -s - $OUT/c_code_fixed -# codesign --force --deep -s - $OUT/objc_code_fixed -# codesign --force --deep -s - $OUT/swift_code_fixed +codesign --force --deep -s - $OUT/objc_code_fixed +codesign --force --deep -s - $OUT/swift_code_fixed # run $OUT/c_code_fixed -# $OUT/objc_code_fixed -# $OUT/swift_code_fixed +$OUT/objc_code_fixed +$OUT/swift_code_fixed fi