Skip to content

Instantly share code, notes, and snippets.

@joedj
Last active January 2, 2016 11:38
Show Gist options
  • Save joedj/8297527 to your computer and use it in GitHub Desktop.
Save joedj/8297527 to your computer and use it in GitHub Desktop.
{ Filter = { Bundles = ( "com.apple.mobilemail" ); }; }
Package: net.joedj.closecrash
Name: closecrash
Depends: firmware (>= 4.3), mobilesubstrate (>= 0.9.5000)
Version: 0.0.1
Architecture: iphoneos-arm
Description: crashy crash
Maintainer: joedj
Author: joedj
Section: Tweaks
DEBUG=1
TARGET := iphone:clang::4.3
ARCHS := armv7 arm64
ifdef CCC_ANALYZER_OUTPUT_FORMAT
TARGET_CXX = $(CXX)
TARGET_LD = $(TARGET_CXX)
endif
ADDITIONAL_LDFLAGS += -Wl,-map,$@.map -x c /dev/null -x none
TWEAK_NAME = closecrash
closecrash_FILES = Tweak.c
include theos/makefiles/common.mk
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec "killall -9 MobileMail"
#include <substrate.h>
#include <unistd.h>
MSHook(int, close, int fildes) {
return _close(fildes);
}
static __attribute__((constructor)) void init() {
MSHookFunction(close, $close, (void **)&_close);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment