├── kiki └── ios │ ├── obj │ ├── .stamp │ ├── kiki │ ├── exception │ ├── jailbreak │ ├── kiki.m.427bfc02.o │ ├── tfp.m.427bfc02.o │ ├── nvram.c.427bfc02.o │ ├── untar.c.427bfc02.o │ ├── untar.c.4b819886.o │ ├── untar.c.ee1a46d5.o │ ├── exception.m.a7dbb5ae.o │ ├── exploit.c.427bfc02.o │ ├── jailbreak.m.4b819886.o │ ├── jailbreak.m.ee1a46d5.o │ ├── zone_fix.m.427bfc02.o │ ├── findmemmove.c.427bfc02.o │ ├── patchfinder.c.427bfc02.o │ ├── call_function.s.427bfc02.o │ ├── kiki-offsets.m.427bfc02.o │ ├── sb_evaluate_hook.s.427bfc02.o │ ├── jailbreakinstaller.m.427bfc02.o │ ├── jailbreakinstaller.m.4b819886.o │ ├── jailbreakinstaller.m.ee1a46d5.o │ └── sb_evaluate_trampoline.s.427bfc02.o │ ├── save_symbols │ ├── headers │ ├── IOKit │ │ ├── usb │ │ │ ├── USB.h │ │ │ └── IOUSBLib.h │ │ ├── DV │ │ │ └── DVFamily.h │ │ ├── firewire │ │ │ ├── IOFWIsoch.h │ │ │ └── IOFireWireFamilyCommon.h │ │ ├── hid │ │ │ ├── IOHIDUsageTables.h │ │ │ └── IOHIDLib.h │ │ ├── hidsystem │ │ │ └── event_status_driver.h │ │ ├── video │ │ │ ├── IOVideoDeviceShared.h │ │ │ ├── IOVideoDeviceClientInit.h │ │ │ ├── IOVideoStreamFormatDictionary.h │ │ │ └── IOVideoStreamDictionary.h │ │ ├── storage │ │ │ ├── IOMediaBSDClient.h │ │ │ ├── IOFilterScheme.h │ │ │ ├── IOBDBlockStorageDevice.h │ │ │ ├── IOCDBlockStorageDevice.h │ │ │ ├── IODVDBlockStorageDevice.h │ │ │ ├── IOBlockStorageDevice.h │ │ │ ├── IOCDPartitionScheme.h │ │ │ ├── IOFireWireStorageCharacteristics.h │ │ │ ├── IOBDMedia.h │ │ │ ├── IOPartitionScheme.h │ │ │ ├── IOAppleLabelScheme.h │ │ │ ├── IOGUIDPartitionScheme.h │ │ │ └── IOCDMedia.h │ │ ├── IOSharedLock.h │ │ ├── graphics │ │ │ ├── IOAccelClientConnect.h │ │ │ ├── IOGraphicsEngine.h │ │ │ └── IOAccelTypes.h │ │ ├── IOCFBundle.h │ │ ├── IOCFSerialize.h │ │ ├── IOBSD.h │ │ ├── pwr_mgt │ │ │ └── IOPMLibDefs.h │ │ ├── IOCFUnserialize.h │ │ ├── audio │ │ │ └── IOAudioLib.h │ │ └── IOCFPlugIn.h │ ├── IOSurface │ │ ├── IOSurface.h │ │ └── IOSurfaceBase.h │ ├── xpc │ │ ├── endpoint.h │ │ └── debug.h │ └── sys │ │ └── sys_domain.h │ ├── zone_fix.h │ ├── nvram.h │ ├── untar.h │ ├── findmemmove.h │ ├── platform-application-entitlement.plist │ ├── debug.plist │ ├── jailbreakinstaller.h │ ├── sb_evaluate_trampoline.s │ ├── call_function.s │ ├── exploit.h │ ├── tfp.h │ ├── Makefile │ ├── jailbreak.m │ ├── kiki-offsets.h │ ├── nvram.c │ └── sb_evaluate_hook.s ├── kernel ├── ios │ ├── theos │ ├── kiki.m │ ├── tfp.h │ ├── tfp.m │ ├── headers │ ├── nvram.c │ ├── nvram.h │ ├── untar.c │ ├── untar.h │ ├── exception.m │ ├── exploit.c │ ├── exploit.h │ ├── zone_fix.h │ ├── zone_fix.m │ ├── findmemmove.c │ ├── findmemmove.h │ ├── patchfinder.c │ ├── patchfinder.h │ ├── save_symbols │ ├── call_function.s │ ├── kiki-offsets.h │ ├── kiki-offsets.m │ ├── sb_evaluate_hook.s │ ├── jailbreakinstaller.h │ ├── jailbreakinstaller.m │ ├── sb_evaluate_trampoline.s │ ├── logo.png │ ├── platform-application-entitlement.plist │ ├── localize.h │ ├── wdt.h │ ├── kiki-log.h │ ├── deadman.h │ ├── watermark-id.sh │ ├── get-watermark.py │ ├── framebuffer.h │ ├── wdt.c │ ├── generate-watermark.sh │ ├── kiki-log.m │ ├── Makefile │ ├── localize.m │ └── deadman.c ├── extras │ ├── dirhelper │ ├── com.evad3rs.evasi0n.postrm │ ├── com.evad3rs.evasi0n.extrainst_ │ ├── com.evad3rs.evasi0n.prerm │ ├── com.planetbeing.exception.plist │ ├── com.evad3rs.evasi0n.list │ └── Makefile ├── generate_confuse_amfi_dylib.c ├── Cydia.tar.lzma ├── cydia-default-images │ ├── Default.png │ ├── Default@2x.png │ ├── Default-568h@2x.png │ ├── Default-Landscape.png │ ├── Default-Portrait.png │ ├── Default-Landscape@2x.png │ └── Default-Portrait@2x.png └── Makefile ├── res ├── evasi0n ├── amfi.dylib ├── extras.tar ├── fstab ├── backup_kbag.bin ├── gui │ ├── win32 │ │ ├── res.rc │ │ ├── e_logo.ico │ │ ├── evasi0n.ico │ │ ├── background.bmp │ │ └── manifest.xml │ ├── osx │ │ ├── Icon.icns │ │ ├── e_logo.png │ │ ├── background.png │ │ └── Info.plist │ └── linux │ │ └── evasi0n-launcher.sh ├── DemoApp.app │ ├── Icon.png │ ├── Icon-72.png │ ├── Icon@2x.png │ ├── Icon-72@2x.png │ └── Info.plist ├── shebang ├── launchd.conf └── languages │ └── aliases.plist ├── src ├── Cydia.tar.lzma ├── packagelist.tar.lzma ├── version.h ├── cli.rc ├── idevicebackup2.h ├── common.h ├── localize.h ├── bsdprocesslist.h ├── iTunesKiller.h ├── cpio.h ├── jailbreak.h ├── JailbreakHandler.h ├── shim.c ├── DeviceHandler.h ├── cpio.c ├── build_supported.h ├── debug.h ├── device_types.h ├── JailbreakHandler.cpp ├── file.h ├── common.c ├── mbdb.h ├── bsdprocesslist.c ├── backup.h ├── hashmap.h ├── iTunesKiller.cpp ├── endianness.h └── MainWnd.h ├── untether ├── .gitignore ├── scripts │ ├── postrm │ ├── extrainst_ │ ├── make.sh │ ├── Makefile │ ├── Cydia.hpp │ ├── Cydia.mm │ ├── LaunchDaemons.hpp │ └── postrm.mm ├── package-debian │ ├── control │ └── prerm └── package.sh ├── .DS_Store ├── icons ├── Icon.png ├── Icon-72.png ├── Icon@2x.png ├── source.png ├── source.xcf ├── Icon-72@2x.png ├── Icon-Small.png ├── Icon-Small-50.png ├── Icon-Small@2x.png ├── iTunesArtwork.png ├── Icon-Small-50@2x.png └── batch-resize-icons.sh ├── staticlibs ├── osx │ ├── libplist.a │ ├── libusbmuxd.a │ └── libimobiledevice.a ├── win32 │ ├── libssl.a │ ├── libz.a │ ├── libplist.a │ ├── libxml2.a │ ├── libcrypto.a │ ├── libusbmuxd.a │ └── libimobiledevice.a ├── linux.x86 │ ├── libplist.a │ ├── libusbmuxd.a │ └── libimobiledevice.a └── linux.x86_64 │ ├── libplist.a │ ├── libusbmuxd.a │ └── libimobiledevice.a ├── misc └── bin2c ├── include ├── openssl │ ├── ebcdic.h │ ├── whrlpool.h │ ├── comp.h │ └── modes.h ├── plist │ ├── plist++.h │ ├── Real.h │ ├── Boolean.h │ ├── Key.h │ ├── Date.h │ ├── Integer.h │ ├── Data.h │ ├── String.h │ ├── Node.h │ ├── Array.h │ ├── Structure.h │ └── Dictionary.h └── libimobiledevice │ ├── screenshotr.h │ ├── file_relay.h │ ├── misagent.h │ ├── house_arrest.h │ ├── mobile_image_mounter.h │ ├── restore.h │ └── sbservices.h ├── changelog.txt ├── generate_languages.py ├── generate_en.py ├── package.sh └── readme.txt /kiki/ios/obj/.stamp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kernel/ios/theos: -------------------------------------------------------------------------------- 1 | /opt/theos -------------------------------------------------------------------------------- /res/evasi0n: -------------------------------------------------------------------------------- 1 | ../kernel/evasi0n -------------------------------------------------------------------------------- /kernel/ios/kiki.m: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/kiki.m -------------------------------------------------------------------------------- /kernel/ios/tfp.h: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/tfp.h -------------------------------------------------------------------------------- /kernel/ios/tfp.m: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/tfp.m -------------------------------------------------------------------------------- /res/amfi.dylib: -------------------------------------------------------------------------------- 1 | ../kernel/amfi.dylib -------------------------------------------------------------------------------- /res/extras.tar: -------------------------------------------------------------------------------- 1 | ../kernel/extras.tar -------------------------------------------------------------------------------- /kernel/ios/headers: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/headers -------------------------------------------------------------------------------- /kernel/ios/nvram.c: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/nvram.c -------------------------------------------------------------------------------- /kernel/ios/nvram.h: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/nvram.h -------------------------------------------------------------------------------- /kernel/ios/untar.c: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/untar.c -------------------------------------------------------------------------------- /kernel/ios/untar.h: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/untar.h -------------------------------------------------------------------------------- /src/Cydia.tar.lzma: -------------------------------------------------------------------------------- 1 | ../kernel/Cydia.tar.lzma -------------------------------------------------------------------------------- /untether/.gitignore: -------------------------------------------------------------------------------- 1 | package 2 | *.deb 3 | -------------------------------------------------------------------------------- /kernel/extras/dirhelper: -------------------------------------------------------------------------------- 1 | ../../kiki/ddi/dirhelper -------------------------------------------------------------------------------- /kernel/ios/exception.m: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/exception.m -------------------------------------------------------------------------------- /kernel/ios/exploit.c: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/exploit.c -------------------------------------------------------------------------------- /kernel/ios/exploit.h: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/exploit.h -------------------------------------------------------------------------------- /kernel/ios/zone_fix.h: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/zone_fix.h -------------------------------------------------------------------------------- /kernel/ios/zone_fix.m: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/zone_fix.m -------------------------------------------------------------------------------- /kernel/ios/findmemmove.c: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/findmemmove.c -------------------------------------------------------------------------------- /kernel/ios/findmemmove.h: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/findmemmove.h -------------------------------------------------------------------------------- /kernel/ios/patchfinder.c: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/patchfinder.c -------------------------------------------------------------------------------- /kernel/ios/patchfinder.h: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/patchfinder.h -------------------------------------------------------------------------------- /kernel/ios/save_symbols: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/save_symbols -------------------------------------------------------------------------------- /kernel/ios/call_function.s: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/call_function.s -------------------------------------------------------------------------------- /kernel/ios/kiki-offsets.h: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/kiki-offsets.h -------------------------------------------------------------------------------- /kernel/ios/kiki-offsets.m: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/kiki-offsets.m -------------------------------------------------------------------------------- /src/packagelist.tar.lzma: -------------------------------------------------------------------------------- 1 | ../kernel/packagelist.tar.lzma -------------------------------------------------------------------------------- /src/version.h: -------------------------------------------------------------------------------- 1 | #define EVASI0N_VERSION_STRING "1.5.3" 2 | -------------------------------------------------------------------------------- /kernel/ios/sb_evaluate_hook.s: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/sb_evaluate_hook.s -------------------------------------------------------------------------------- /kiki/ios/save_symbols: -------------------------------------------------------------------------------- 1 | _catch_exception_raise_state_identity 2 | -------------------------------------------------------------------------------- /kernel/ios/jailbreakinstaller.h: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/jailbreakinstaller.h -------------------------------------------------------------------------------- /kernel/ios/jailbreakinstaller.m: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/jailbreakinstaller.m -------------------------------------------------------------------------------- /kernel/extras/com.evad3rs.evasi0n.postrm: -------------------------------------------------------------------------------- 1 | ../../untether/scripts/postrm -------------------------------------------------------------------------------- /kernel/generate_confuse_amfi_dylib.c: -------------------------------------------------------------------------------- 1 | ../kiki/generate_confuse_amfi_dylib.c -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/.DS_Store -------------------------------------------------------------------------------- /kernel/extras/com.evad3rs.evasi0n.extrainst_: -------------------------------------------------------------------------------- 1 | ../../untether/scripts/extrainst_ -------------------------------------------------------------------------------- /kernel/extras/com.evad3rs.evasi0n.prerm: -------------------------------------------------------------------------------- 1 | ../../untether/package-debian/prerm -------------------------------------------------------------------------------- /kernel/ios/sb_evaluate_trampoline.s: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/sb_evaluate_trampoline.s -------------------------------------------------------------------------------- /icons/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/icons/Icon.png -------------------------------------------------------------------------------- /res/fstab: -------------------------------------------------------------------------------- 1 | /dev/disk0s1s1 / hfs rw 0 1 2 | /dev/disk0s1s2 /private/var hfs rw 0 2 3 | -------------------------------------------------------------------------------- /icons/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/icons/Icon-72.png -------------------------------------------------------------------------------- /icons/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/icons/Icon@2x.png -------------------------------------------------------------------------------- /icons/source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/icons/source.png -------------------------------------------------------------------------------- /icons/source.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/icons/source.xcf -------------------------------------------------------------------------------- /kernel/extras/com.planetbeing.exception.plist: -------------------------------------------------------------------------------- 1 | ../../kiki/ddi/com.planetbeing.exception.plist -------------------------------------------------------------------------------- /kiki/ios/obj/kiki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/kiki -------------------------------------------------------------------------------- /src/cli.rc: -------------------------------------------------------------------------------- 1 | cydia 10 "Cydia.tar.lzma" 2 | packagelist 10 "../kernel/packagelist.tar.lzma" 3 | -------------------------------------------------------------------------------- /icons/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/icons/Icon-72@2x.png -------------------------------------------------------------------------------- /icons/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/icons/Icon-Small.png -------------------------------------------------------------------------------- /kernel/ios/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kernel/ios/logo.png -------------------------------------------------------------------------------- /res/backup_kbag.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/backup_kbag.bin -------------------------------------------------------------------------------- /res/gui/win32/res.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/gui/win32/res.rc -------------------------------------------------------------------------------- /kernel/Cydia.tar.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kernel/Cydia.tar.lzma -------------------------------------------------------------------------------- /kernel/ios/platform-application-entitlement.plist: -------------------------------------------------------------------------------- 1 | ../../kiki/ios/platform-application-entitlement.plist -------------------------------------------------------------------------------- /kiki/ios/obj/exception: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/exception -------------------------------------------------------------------------------- /kiki/ios/obj/jailbreak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/jailbreak -------------------------------------------------------------------------------- /res/gui/osx/Icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/gui/osx/Icon.icns -------------------------------------------------------------------------------- /res/gui/osx/e_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/gui/osx/e_logo.png -------------------------------------------------------------------------------- /icons/Icon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/icons/Icon-Small-50.png -------------------------------------------------------------------------------- /icons/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/icons/Icon-Small@2x.png -------------------------------------------------------------------------------- /icons/iTunesArtwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/icons/iTunesArtwork.png -------------------------------------------------------------------------------- /res/DemoApp.app/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/DemoApp.app/Icon.png -------------------------------------------------------------------------------- /res/gui/win32/e_logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/gui/win32/e_logo.ico -------------------------------------------------------------------------------- /res/gui/win32/evasi0n.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/gui/win32/evasi0n.ico -------------------------------------------------------------------------------- /staticlibs/osx/libplist.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/osx/libplist.a -------------------------------------------------------------------------------- /staticlibs/win32/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/win32/libssl.a -------------------------------------------------------------------------------- /staticlibs/win32/libz.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/win32/libz.a -------------------------------------------------------------------------------- /untether/scripts/postrm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/untether/scripts/postrm -------------------------------------------------------------------------------- /icons/Icon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/icons/Icon-Small-50@2x.png -------------------------------------------------------------------------------- /res/DemoApp.app/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/DemoApp.app/Icon-72.png -------------------------------------------------------------------------------- /res/DemoApp.app/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/DemoApp.app/Icon@2x.png -------------------------------------------------------------------------------- /res/gui/osx/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/gui/osx/background.png -------------------------------------------------------------------------------- /staticlibs/osx/libusbmuxd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/osx/libusbmuxd.a -------------------------------------------------------------------------------- /staticlibs/win32/libplist.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/win32/libplist.a -------------------------------------------------------------------------------- /staticlibs/win32/libxml2.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/win32/libxml2.a -------------------------------------------------------------------------------- /untether/scripts/extrainst_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/untether/scripts/extrainst_ -------------------------------------------------------------------------------- /kiki/ios/obj/kiki.m.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/kiki.m.427bfc02.o -------------------------------------------------------------------------------- /kiki/ios/obj/tfp.m.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/tfp.m.427bfc02.o -------------------------------------------------------------------------------- /res/DemoApp.app/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/DemoApp.app/Icon-72@2x.png -------------------------------------------------------------------------------- /res/gui/win32/background.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/res/gui/win32/background.bmp -------------------------------------------------------------------------------- /staticlibs/win32/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/win32/libcrypto.a -------------------------------------------------------------------------------- /staticlibs/win32/libusbmuxd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/win32/libusbmuxd.a -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/usb/USB.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/headers/IOKit/usb/USB.h -------------------------------------------------------------------------------- /kiki/ios/obj/nvram.c.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/nvram.c.427bfc02.o -------------------------------------------------------------------------------- /kiki/ios/obj/untar.c.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/untar.c.427bfc02.o -------------------------------------------------------------------------------- /kiki/ios/obj/untar.c.4b819886.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/untar.c.4b819886.o -------------------------------------------------------------------------------- /kiki/ios/obj/untar.c.ee1a46d5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/untar.c.ee1a46d5.o -------------------------------------------------------------------------------- /staticlibs/linux.x86/libplist.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/linux.x86/libplist.a -------------------------------------------------------------------------------- /kiki/ios/obj/exception.m.a7dbb5ae.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/exception.m.a7dbb5ae.o -------------------------------------------------------------------------------- /kiki/ios/obj/exploit.c.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/exploit.c.427bfc02.o -------------------------------------------------------------------------------- /kiki/ios/obj/jailbreak.m.4b819886.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/jailbreak.m.4b819886.o -------------------------------------------------------------------------------- /kiki/ios/obj/jailbreak.m.ee1a46d5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/jailbreak.m.ee1a46d5.o -------------------------------------------------------------------------------- /kiki/ios/obj/zone_fix.m.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/zone_fix.m.427bfc02.o -------------------------------------------------------------------------------- /staticlibs/linux.x86/libusbmuxd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/linux.x86/libusbmuxd.a -------------------------------------------------------------------------------- /staticlibs/linux.x86_64/libplist.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/linux.x86_64/libplist.a -------------------------------------------------------------------------------- /staticlibs/osx/libimobiledevice.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/osx/libimobiledevice.a -------------------------------------------------------------------------------- /staticlibs/win32/libimobiledevice.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/win32/libimobiledevice.a -------------------------------------------------------------------------------- /kernel/ios/localize.h: -------------------------------------------------------------------------------- 1 | #ifndef LOCALIZE_H 2 | #define LOCALIZE_H 3 | 4 | CFStringRef localize(const char* str); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /kernel/ios/wdt.h: -------------------------------------------------------------------------------- 1 | #ifndef WDT_H 2 | #define WDT_H 3 | 4 | void wdt_reset(uint32_t timeout); 5 | void wdt_off(); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/DV/DVFamily.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/headers/IOKit/DV/DVFamily.h -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/usb/IOUSBLib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/headers/IOKit/usb/IOUSBLib.h -------------------------------------------------------------------------------- /kiki/ios/obj/findmemmove.c.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/findmemmove.c.427bfc02.o -------------------------------------------------------------------------------- /kiki/ios/obj/patchfinder.c.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/patchfinder.c.427bfc02.o -------------------------------------------------------------------------------- /kiki/ios/zone_fix.h: -------------------------------------------------------------------------------- 1 | #ifndef ZONE_FIX_H 2 | #define ZONE_FIX_H 3 | 4 | void clean_up_io_connect_method_leak(); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /staticlibs/linux.x86_64/libusbmuxd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/linux.x86_64/libusbmuxd.a -------------------------------------------------------------------------------- /kernel/cydia-default-images/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kernel/cydia-default-images/Default.png -------------------------------------------------------------------------------- /kiki/ios/obj/call_function.s.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/call_function.s.427bfc02.o -------------------------------------------------------------------------------- /kiki/ios/obj/kiki-offsets.m.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/kiki-offsets.m.427bfc02.o -------------------------------------------------------------------------------- /staticlibs/linux.x86/libimobiledevice.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/linux.x86/libimobiledevice.a -------------------------------------------------------------------------------- /kernel/cydia-default-images/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kernel/cydia-default-images/Default@2x.png -------------------------------------------------------------------------------- /kiki/ios/obj/sb_evaluate_hook.s.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/sb_evaluate_hook.s.427bfc02.o -------------------------------------------------------------------------------- /staticlibs/linux.x86_64/libimobiledevice.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/staticlibs/linux.x86_64/libimobiledevice.a -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/firewire/IOFWIsoch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/headers/IOKit/firewire/IOFWIsoch.h -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/hid/IOHIDUsageTables.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/headers/IOKit/hid/IOHIDUsageTables.h -------------------------------------------------------------------------------- /kiki/ios/obj/jailbreakinstaller.m.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/jailbreakinstaller.m.427bfc02.o -------------------------------------------------------------------------------- /kiki/ios/obj/jailbreakinstaller.m.4b819886.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/jailbreakinstaller.m.4b819886.o -------------------------------------------------------------------------------- /kiki/ios/obj/jailbreakinstaller.m.ee1a46d5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/jailbreakinstaller.m.ee1a46d5.o -------------------------------------------------------------------------------- /kernel/cydia-default-images/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kernel/cydia-default-images/Default-568h@2x.png -------------------------------------------------------------------------------- /kernel/ios/kiki-log.h: -------------------------------------------------------------------------------- 1 | #ifndef KIKI_LOG_H 2 | #define KIKI_LOG_H 3 | 4 | void jb_log(const char* format, ...); 5 | void jb_end_log(); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /kernel/cydia-default-images/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kernel/cydia-default-images/Default-Landscape.png -------------------------------------------------------------------------------- /kernel/cydia-default-images/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kernel/cydia-default-images/Default-Portrait.png -------------------------------------------------------------------------------- /kiki/ios/obj/sb_evaluate_trampoline.s.427bfc02.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/obj/sb_evaluate_trampoline.s.427bfc02.o -------------------------------------------------------------------------------- /kernel/cydia-default-images/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kernel/cydia-default-images/Default-Landscape@2x.png -------------------------------------------------------------------------------- /kernel/cydia-default-images/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kernel/cydia-default-images/Default-Portrait@2x.png -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/hidsystem/event_status_driver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/headers/IOKit/hidsystem/event_status_driver.h -------------------------------------------------------------------------------- /res/shebang: -------------------------------------------------------------------------------- 1 | #!/bin/launchctl submit -l remount -o /var/mobile/Media/mount.stdout -e /var/mobile/Media/mount.stderr -- /sbin/mount -v -t hfs -o rw /dev/disk0s1s1 2 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/firewire/IOFireWireFamilyCommon.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/evasi0n6/HEAD/kiki/ios/headers/IOKit/firewire/IOFireWireFamilyCommon.h -------------------------------------------------------------------------------- /kernel/extras/com.evad3rs.evasi0n.list: -------------------------------------------------------------------------------- 1 | /. 2 | /var 3 | /var/evasi0n 4 | /var/evasi0n/amfi.dylib 5 | /var/evasi0n/evasi0n 6 | /usr 7 | /usr/libexec 8 | /usr/libexec/dirhelper 9 | -------------------------------------------------------------------------------- /kernel/ios/deadman.h: -------------------------------------------------------------------------------- 1 | #ifndef DEADMAN_H 2 | #define DEADMAN_H 3 | 4 | void deadman_activate(int timeout); 5 | void deadman_reset(int timeout); 6 | void deadman_deactivate(); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /kernel/ios/watermark-id.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ID=`echo "$1probably sha1 of their name + secret nonce, and then put that in the binary and also use that to decrypt some other piece of info." | openssl sha1` 4 | echo $ID 5 | -------------------------------------------------------------------------------- /kernel/ios/get-watermark.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | 5 | data = open(sys.argv[1], 'rb').read() 6 | offset = data.find("W$PP") 7 | if offset != -1: 8 | print data[offset + 4:offset + 4 + 20].encode('hex') 9 | -------------------------------------------------------------------------------- /src/idevicebackup2.h: -------------------------------------------------------------------------------- 1 | #ifndef IDEVICEBACKUP2_H 2 | #define IDEVICEBACKUP2_H 3 | 4 | int idevicebackup2(int argc, char** argv); 5 | void idevicebackup2_set_ignore_error(int errorcode); 6 | void idevicebackup2_set_clean_exit(int sig); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /untether/scripts/make.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for x in postrm extrainst_; do 4 | clang -o $x -isysroot /Developer/iPhoneOS6.0.sdk -arch armv7 -miphoneos-version-min=6.0 -framework CoreFoundation -framework Foundation Cydia.mm $x.mm 5 | done 6 | -------------------------------------------------------------------------------- /kiki/ios/nvram.h: -------------------------------------------------------------------------------- 1 | #ifndef NVRAM_H 2 | #define NVRAM_H 3 | 4 | void nvram_set(const char* name, const char* value); 5 | const char* nvram_get(const char* name); 6 | void nvram_unset(const char* name); 7 | void nvram_sync(const char* name); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /res/gui/linux/evasi0n-launcher.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR=`dirname $0` 4 | PLAT=`uname -m` 5 | case $PLAT in 6 | x86_64) 7 | ${DIR}/evasi0n.x86_64 8 | ;; 9 | i386|i586|i686) 10 | ${DIR}/evasi0n.x86 11 | ;; 12 | *) 13 | echo Sorry, platform $PLAT is not supported. 14 | ;; 15 | esac 16 | -------------------------------------------------------------------------------- /src/common.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMMON_H 2 | #define __COMMON_H 3 | 4 | typedef void (*status_cb_t)(const char* message, int progress, int attention); 5 | 6 | int __mkdir(const char* path, int mode); 7 | int mkdir_with_parents(const char *dir, int mode); 8 | char* build_path(const char* elem, ...); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /src/localize.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOCALIZE_H 2 | #define __LOCALIZE_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | const char* localize(const char* str); 9 | 10 | #ifdef WIN32 11 | wchar_t* utf8_to_wchar(const char* text); 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /kiki/ios/untar.h: -------------------------------------------------------------------------------- 1 | // 2 | // untar.h 3 | // utility 4 | // 5 | // Created by Yiduo Wang on 10/31/12. 6 | // Copyright (c) 2012 Yiduo Wang. All rights reserved. 7 | // 8 | 9 | #ifndef utility_untar_h 10 | #define utility_untar_h 11 | 12 | void untar(const char *filename, const char *basepath); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /kiki/ios/findmemmove.h: -------------------------------------------------------------------------------- 1 | #ifndef FINDMEMMOVE_H 2 | #define FINDMEMMOVE_H 3 | 4 | #include 5 | #include 6 | 7 | uint32_t get_memmove(); 8 | uint32_t get_memmove2(io_connect_t connect); 9 | void kernel_read_section(io_connect_t connect, uint32_t memmove, uint32_t addr, void* buffer); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOSurface/IOSurface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IOSurface.h 3 | * IOSurface 4 | * 5 | * Copyright 2006-2008 Apple Computer, Inc. All rights reserved. 6 | * 7 | */ 8 | 9 | #ifndef _IOSURFACE_H 10 | #define _IOSURFACE_H 1 11 | 12 | #include 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/bsdprocesslist.h: -------------------------------------------------------------------------------- 1 | #ifndef __bsdprocesslist_h 2 | #define __bsdprocesslist_h 3 | 4 | #include 5 | #include 6 | 7 | typedef struct kinfo_proc kinfo_proc; 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | int GetBSDProcessList(kinfo_proc **procList, size_t *procCount); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /res/launchd.conf: -------------------------------------------------------------------------------- 1 | bsexec .. /sbin/mount -u -o rw,suid,dev / 2 | setenv DYLD_INSERT_LIBRARIES /private/var/evasi0n/amfi.dylib 3 | load /System/Library/LaunchDaemons/com.apple.MobileFileIntegrity.plist 4 | bsexec .. /private/var/evasi0n/evasi0n 5 | unsetenv DYLD_INSERT_LIBRARIES 6 | bsexec .. /bin/rm -f /private/var/evasi0n/sock 7 | bsexec .. /bin/ln -f /var/tmp/launchd/sock /private/var/evasi0n/sock 8 | -------------------------------------------------------------------------------- /kiki/ios/platform-application-entitlement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | platform-application 6 | 7 | get-task-allow 8 | 9 | task_for_pid-allow 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /kiki/ios/debug.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | keychain-access-groups 6 | 7 | lockdown-identities 8 | apple 9 | 10 | get-task-allow 11 | 12 | task_for_pid-allow 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /untether/package-debian/control: -------------------------------------------------------------------------------- 1 | Package: com.evad3rs.evasi0n 2 | Priority: optional 3 | Section: System 4 | Maintainer: evad3rs 5 | Architecture: iphoneos-arm 6 | Version: 0.4.1-1 7 | Depends: coreutils-bin, firmware (>= 6.0), firmware (<= 6.1.2) 8 | Description: untethered jailbreak based on planetbeing and nikias exploits 9 | Author: evad3rs 10 | Name: evasi0n 6.0-6.1.2 Untether 11 | Depiction: http://cydia.saurik.com/info/com.evad3rs.evasi0n/ 12 | -------------------------------------------------------------------------------- /kernel/ios/framebuffer.h: -------------------------------------------------------------------------------- 1 | #ifndef FRAMEBUFFER_H 2 | #define FRAMEBUFFER_H 3 | 4 | #define IOSFC_BUILDING_IOSFC 5 | #include 6 | #include 7 | 8 | CGContextRef get_display_context(); 9 | IOSurfaceRef get_display_surface(); 10 | void fb_setup(); 11 | void fb_update_status(float progress, CFStringRef text); 12 | void fb_update_status_blinking(float progress, CFStringRef text); 13 | void fb_cleanup(); 14 | int get_scale(); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /res/languages/aliases.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | zh_HK 6 | zh-Hant 7 | zh_TW 8 | zh-Hant 9 | zh_MO 10 | zh-Hant 11 | zh_CN 12 | zh-Hans 13 | zh_SG 14 | zh-Hans 15 | 16 | 17 | -------------------------------------------------------------------------------- /icons/batch-resize-icons.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sips -z 144 144 source.png --out Icon-72\@2x.png 3 | sips -z 72 72 source.png --out Icon-72.png 4 | sips -z 50 50 source.png --out Icon-Small-50.png 5 | sips -z 100 100 source.png --out Icon-Small-50\@2x.png 6 | sips -z 29 29 source.png --out Icon-Small.png 7 | sips -z 58 58 source.png --out Icon-Small\@2x.png 8 | sips -z 57 57 source.png --out Icon.png 9 | sips -z 114 114 source.png --out Icon\@2x.png 10 | sips -z 512 512 source.png --out iTunesArtwork.png 11 | 12 | -------------------------------------------------------------------------------- /kiki/ios/jailbreakinstaller.h: -------------------------------------------------------------------------------- 1 | // 2 | // jailbreakinstaller.h 3 | // utility 4 | // 5 | // Created by Yiduo Wang on 10/31/12. 6 | // Copyright (c) 2012 Yiduo Wang. All rights reserved. 7 | // 8 | 9 | #ifndef utility_jailbreakinstaller_h 10 | #define utility_jailbreakinstaller_h 11 | 12 | void uicache(); 13 | void prepare_jailbreak_install(); 14 | void delete_dir(const char *path); 15 | int run(char **argv, char **envp); 16 | void disable_ota_updates(); 17 | void hide_weather_on_ipads(); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/iTunesKiller.h: -------------------------------------------------------------------------------- 1 | #ifndef __ITUNESKILLER_H 2 | #define __ITUNESKILLER_H 3 | #if defined(__APPLE__) || defined(WIN32) 4 | 5 | #ifdef WIN32 6 | #include 7 | #else 8 | #include 9 | #endif 10 | 11 | class iTunesKiller 12 | { 13 | private: 14 | int* watchit; 15 | #ifdef WIN32 16 | HANDLE thread; 17 | #else 18 | pthread_t thread; 19 | #endif 20 | 21 | public: 22 | iTunesKiller(int* watchdog); 23 | void Start(void); 24 | void* Entry(void* data); 25 | }; 26 | #endif 27 | #endif /* __ITUNESKILLER_H */ 28 | -------------------------------------------------------------------------------- /src/cpio.h: -------------------------------------------------------------------------------- 1 | #ifndef __CPIO_H 2 | #define __CPIO_H 3 | 4 | typedef struct { 5 | unsigned char magic[6]; 6 | unsigned char dev[6]; 7 | unsigned char ino[6]; 8 | unsigned char mode[6]; 9 | unsigned char uid[6]; 10 | unsigned char gid[6]; 11 | unsigned char nlink[6]; 12 | unsigned char rdev[6]; 13 | unsigned char mtime[11]; 14 | unsigned char namesize[6]; 15 | unsigned char filesize[11]; 16 | } cpio_record_t; 17 | 18 | unsigned int cpio_get_namesize(cpio_record_t *record); 19 | unsigned long long cpio_get_filesize(cpio_record_t *record); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /misc/bin2c: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Converts binary files into C arrays 4 | # usage: bin2c fileA varA [fileB varB] ... 5 | import os 6 | import sys 7 | if len(sys.argv) < 3: 8 | print 'usage: bin2c fileA varA [fileB varB] ...' 9 | exit(1); 10 | arg = iter(sys.argv[1:]) 11 | for f in arg: 12 | sz = os.path.getsize(f) 13 | if sz <= 0: 14 | arg.next() 15 | continue 16 | print 'static const unsigned char ' + arg.next() + '[' + str(sz) + '] = {\n' + \ 17 | ''.join([('0x%02x, ' % ord(x)) for x in open(f,'rb').read()]) + '\n};' 18 | -------------------------------------------------------------------------------- /kiki/ios/sb_evaluate_trampoline.s: -------------------------------------------------------------------------------- 1 | .globl _sb_evaluate_trampoline 2 | .globl _sb_evaluate_trampoline_hook_address 3 | .globl _sb_evaluate_trampoline_len 4 | 5 | .thumb_func _sb_evaluate_trampoline 6 | 7 | .thumb 8 | .code 16 9 | .align 2 10 | _sb_evaluate_trampoline: 11 | push {r0, r1} 12 | ldr r0, _sb_evaluate_trampoline_hook_address 13 | bx r0 14 | .align 2 15 | _sb_evaluate_trampoline_hook_address: .word 0x0 16 | 17 | .align 2 18 | _sb_evaluate_trampoline_end: 19 | 20 | .align 2 21 | _sb_evaluate_trampoline_len: .word (_sb_evaluate_trampoline_end - _sb_evaluate_trampoline) 22 | -------------------------------------------------------------------------------- /src/jailbreak.h: -------------------------------------------------------------------------------- 1 | #ifndef __JAILBREAK_H 2 | #define __JAILBREAK_H 3 | 4 | #include 5 | #include "common.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | int jb_device_is_supported(const char* ptype, const char* bver); 12 | void jb_device_event_cb(const idevice_event_t *event, void* userdata); 13 | void jb_signal_handler(int sig); 14 | 15 | int jailbreak(const char* udid, status_cb_t status_cb); 16 | 17 | const char* get_languages_plist(); 18 | size_t get_languages_plist_size(); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /kernel/ios/wdt.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | void wdt_set(uint32_t value) 6 | { 7 | io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOWatchDogTimer")); 8 | CFNumberRef n = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &value); 9 | IORegistryEntrySetCFProperties(service, n); 10 | CFRelease(n); 11 | IOObjectRelease(service); 12 | } 13 | 14 | void wdt_reset(uint32_t timeout) 15 | { 16 | wdt_set(timeout); 17 | } 18 | 19 | void wdt_off() 20 | { 21 | wdt_set(600); 22 | } 23 | -------------------------------------------------------------------------------- /res/gui/win32/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | elevate execution level 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/JailbreakHandler.h: -------------------------------------------------------------------------------- 1 | #ifndef __JAILBREAKHANDLER_H 2 | #define __JAILBREAKHANDLER_H 3 | 4 | #ifdef WIN32 5 | #include 6 | #else 7 | #include 8 | #endif 9 | 10 | #include "DeviceHandler.h" 11 | 12 | class JailbreakHandler 13 | { 14 | private: 15 | DeviceHandler* devhandler; 16 | #ifdef WIN32 17 | HANDLE thread; 18 | #else 19 | pthread_t thread; 20 | #endif 21 | 22 | public: 23 | JailbreakHandler(DeviceHandler* devhandler); 24 | void Start(void); 25 | void statusCallback(const char* message, int progress, int attention); 26 | void* Entry(void* data); 27 | }; 28 | 29 | #endif /* __JAILBREAKHANDLER_H */ 30 | -------------------------------------------------------------------------------- /include/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | /* crypto/ebcdic.h */ 2 | 3 | #ifndef HEADER_EBCDIC_H 4 | #define HEADER_EBCDIC_H 5 | 6 | #include 7 | 8 | /* Avoid name clashes with other applications */ 9 | #define os_toascii _openssl_os_toascii 10 | #define os_toebcdic _openssl_os_toebcdic 11 | #define ebcdic2ascii _openssl_ebcdic2ascii 12 | #define ascii2ebcdic _openssl_ascii2ebcdic 13 | 14 | extern const unsigned char os_toascii[256]; 15 | extern const unsigned char os_toebcdic[256]; 16 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); 17 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /kiki/ios/call_function.s: -------------------------------------------------------------------------------- 1 | .globl _call_function_shellcode 2 | .globl _call_function_shellcode_end 3 | .globl _call_function_shellcode_len 4 | 5 | 6 | .thumb_func _call_function_shellcode 7 | .thumb 8 | .code 16 9 | .align 2 10 | _call_function_shellcode: 11 | push {r4-r7, lr} 12 | mov r5, r2 13 | mov r6, r1 14 | ldr r4, [r6, #0x0] 15 | ldr r0, [r6, #0x4] 16 | ldr r1, [r6, #0x8] 17 | ldr r2, [r6, #0xC] 18 | ldr r3, [r6, #0x10] 19 | blx r4 20 | str r0, [r5] 21 | mov r0, #0 22 | pop {r4-r7, pc} 23 | 24 | .align 2 25 | _call_function_shellcode_end: 26 | 27 | .align 2 28 | _call_function_shellcode_len: .word (_call_function_shellcode_end - _call_function_shellcode) 29 | -------------------------------------------------------------------------------- /untether/scripts/Makefile: -------------------------------------------------------------------------------- 1 | CC=clang 2 | CXX=clang++ 3 | SDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk 4 | CFLAGS=-arch armv7 -Wall -Werror -fPIC -O2 -std=gnu99 -isysroot $(SDK) -miphoneos-version-min=6.0 5 | CPPFLAGS=-arch armv7 -Wall -Werror -fPIC -O2 -isysroot $(SDK) -miphoneos-version-min=6.0 6 | FRAMEWORKS=-framework Foundation -framework CoreFoundation -lMobileGestalt 7 | 8 | all: extrainst_ postrm 9 | 10 | extrainst_: extrainst_.mm Cydia.mm 11 | $(CXX) $(CPPFLAGS) $(FRAMEWORKS) $^ -o $@ 12 | ldid -S $@ 13 | 14 | postrm: postrm.mm Cydia.mm 15 | $(CXX) $(CPPFLAGS) $(FRAMEWORKS) $^ -o $@ 16 | ldid -S $@ 17 | 18 | clean: 19 | rm -f extrainst_ postrm 20 | -------------------------------------------------------------------------------- /kiki/ios/exploit.h: -------------------------------------------------------------------------------- 1 | #ifndef EXPLOIT_H 2 | #define EXPLOIT_H 3 | 4 | #include 5 | #include 6 | 7 | uint32_t get_kernel_region(io_connect_t connect); 8 | uint32_t get_kernel_text_start(); 9 | 10 | void call_direct(io_connect_t connect, uint32_t fn, uint32_t arg1, uint32_t arg2); 11 | void call_indirect(io_connect_t connect, uint32_t fn, uint32_t arg1_address, uint32_t arg2); 12 | 13 | uint8_t* kernel_read_exception_vector(io_connect_t connect, uint32_t start, uint32_t size); 14 | uint8_t* kernel_read_exception_vector2(io_connect_t connect, uint32_t start, uint32_t size, uint32_t* crash_pc); 15 | 16 | int kernel_read(io_connect_t connect, uint32_t memmove, uint32_t address, void* buffer, uint32_t size); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/shim.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | void *memcpy(void *dest, const void *src, size_t n) 10 | { 11 | return memmove(dest, src, n); 12 | } 13 | 14 | unsigned long int __fdelt_chk (unsigned long int d) 15 | { 16 | if (d >= FD_SETSIZE) 17 | abort(); 18 | 19 | return d / __NFDBITS; 20 | } 21 | 22 | int __isoc99_sscanf(const char *str, const char *format, ...) 23 | { 24 | va_list arg; 25 | int done; 26 | 27 | va_start (arg, format); 28 | done = vsscanf(str, format, arg); 29 | va_end (arg); 30 | 31 | return done; 32 | } 33 | 34 | void __stack_chk_fail() 35 | { 36 | abort(); 37 | } 38 | -------------------------------------------------------------------------------- /src/DeviceHandler.h: -------------------------------------------------------------------------------- 1 | #ifndef __DEVICEHANDLER_H 2 | #define __DEVICEHANDLER_H 3 | 4 | #include 5 | #include 6 | 7 | #include "MainWnd.h" 8 | 9 | class MainWnd; 10 | 11 | class DeviceHandler 12 | { 13 | private: 14 | MainWnd* mainWnd; 15 | int device_count; 16 | char* current_udid; 17 | public: 18 | DeviceHandler(MainWnd* main); 19 | ~DeviceHandler(void); 20 | void setUDID(const char* udid); 21 | char* getUDID(); 22 | void DeviceEventCB(const idevice_event_t *event, void *user_data); 23 | void checkDevice(); 24 | void processStart(void); 25 | void processStatus(const char* msg, int progress, int attention); 26 | void processFinished(const char* error); 27 | }; 28 | 29 | #endif /* __DEVICEHANDLER_H */ 30 | -------------------------------------------------------------------------------- /kiki/ios/headers/xpc/endpoint.h: -------------------------------------------------------------------------------- 1 | #ifndef __XPC_ENDPOINT_H__ 2 | #define __XPC_ENDPOINT_H__ 3 | 4 | /*! 5 | * @function xpc_endpoint_create 6 | * Creates a new endpoint from a connection that is suitable for embedding into 7 | * messages. 8 | * 9 | * @param connection 10 | * Only connections obtained through calls to xpc_connection_create*() may be 11 | * given to this API. Passing any other type of connection is not supported and 12 | * will result in undefined behavior. 13 | * 14 | * @result 15 | * A new endpoint object. 16 | */ 17 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) 18 | XPC_EXPORT XPC_NONNULL1 XPC_WARN_RESULT XPC_MALLOC XPC_RETURNS_RETAINED 19 | xpc_endpoint_t 20 | xpc_endpoint_create(xpc_connection_t connection); 21 | 22 | #endif /* __XPC_ENDPOINT_H__ */ 23 | -------------------------------------------------------------------------------- /untether/package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $(id -u) != "0" ]; then 4 | echo Please run this with fakeroot or sudo. 5 | exit 1 6 | fi 7 | 8 | # copy files 9 | rm -rf package/ 10 | 11 | mkdir -p package/DEBIAN 12 | cp -a package-debian/* package/DEBIAN/ 13 | cp -a scripts/postrm scripts/extrainst_ package/DEBIAN/ 14 | 15 | mkdir -p package/var/evasi0n 16 | cp ../kernel/evasi0n package/var/evasi0n/evasi0n 17 | cp ../kernel/amfi.dylib package/var/evasi0n/amfi.dylib 18 | mkdir -p package/usr/libexec 19 | cp ../kernel/extras/dirhelper package/usr/libexec/dirhelper 20 | 21 | chown -R 0:0 package 22 | 23 | # build package 24 | PKG=`grep Package: package/DEBIAN/control |cut -d " " -f 2` 25 | VER=`grep Version: package/DEBIAN/control |cut -d " " -f 2` 26 | sudo dpkg-deb -z9 -Zlzma -b package ${PKG}_${VER}_iphoneos-arm.deb 27 | 28 | -------------------------------------------------------------------------------- /src/cpio.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "cpio.h" 5 | 6 | unsigned int cpio_get_namesize(cpio_record_t *record) 7 | { 8 | char buf[8]; 9 | if (!record) { 10 | return 0; 11 | } 12 | memcpy(buf, record->namesize, 6); 13 | buf[6] = '\0'; 14 | 15 | char* ep = NULL; 16 | unsigned int res = strtoul(buf, &ep, 8); 17 | if (!ep || (strlen(ep) == 0)) { 18 | return res; 19 | } else { 20 | return 0; 21 | } 22 | } 23 | 24 | unsigned long long cpio_get_filesize(cpio_record_t *record) 25 | { 26 | char buf[12]; 27 | if (!record) { 28 | return 0; 29 | } 30 | memcpy(buf, record->filesize, 11); 31 | buf[11] = '\0'; 32 | 33 | char* ep = NULL; 34 | unsigned int res = strtoull(buf, &ep, 8); 35 | if (!ep || (strlen(ep) == 0)) { 36 | return res; 37 | } else { 38 | return 0; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /res/DemoApp.app/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | Jailbreak 9 | CFBundleExecutable 10 | DemoApp 11 | CFBundleIdentifier 12 | com.apple.DemoApp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | 24 | 25 | -------------------------------------------------------------------------------- /kiki/ios/headers/xpc/debug.h: -------------------------------------------------------------------------------- 1 | #ifndef __XPC_DEBUG_H__ 2 | #define __XPC_DEBUG_H__ 3 | 4 | /*! 5 | * @function xpc_debugger_api_misuse_info 6 | * Returns a pointer to a string describing the reason XPC aborted the calling 7 | * process. On OS X, this will be the same string present in the "Application 8 | * Specific Information" section of the crash report. 9 | * 10 | * @result 11 | * A pointer to the human-readable string describing the reason the caller was 12 | * aborted. If XPC was not responsible for the program's termination, NULL will 13 | * be returned. 14 | * 15 | * @discussion 16 | * This function is only callable from within a debugger. It is not meant to be 17 | * called by the program directly. 18 | */ 19 | XPC_DEBUGGER_EXCL 20 | const char * 21 | xpc_debugger_api_misuse_info(void); 22 | 23 | #endif /* __XPC_DEBUG_H__ */ 24 | -------------------------------------------------------------------------------- /kernel/ios/generate-watermark.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ID=`echo "$1probably sha1 of their name + secret nonce, and then put that in the binary and also use that to decrypt some other piece of info." | /usr/bin/openssl sha1` 4 | ID_COMMAS=`echo $ID | sed 's/\([0-9a-f][0-9a-f]\)/0x\1, /g'` 5 | ID_INITIALIZER="{'W', '$', 'P', 'P', $ID_COMMAS 0x0}" 6 | 7 | CRC_FILE=`mktemp -t crc` 8 | echo "0000: ${ID}00" | xxd -r -c 256 > $CRC_FILE 9 | ID_CRC32=`crc32 $CRC_FILE` 10 | rm $CRC_FILE 11 | 12 | cat > watermark.h << END_WATERMARK 13 | #include 14 | #include 15 | 16 | static inline uint32_t watermark_static() 17 | { 18 | return 0x$ID_CRC32; 19 | } 20 | 21 | static inline uint32_t watermark_generate() 22 | { 23 | const uint8_t watermark[] = $ID_INITIALIZER; 24 | return crc32(0, watermark + 4, sizeof(watermark) - 4); 25 | } 26 | 27 | END_WATERMARK 28 | 29 | -------------------------------------------------------------------------------- /untether/package-debian/prerm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CORONA_DIR=/var/evasi0n 4 | 5 | TETHER_BOOT_OK="iPad1,1 6 | iPhone2,1 7 | iPhone3,1 8 | iPhone3,3 9 | iPod3,1 10 | iPod4,1" 11 | 12 | OS=`sysctl -n kern.osversion` 13 | PROD=`sysctl -n hw.machine` 14 | 15 | case "$1" in 16 | upgrade) 17 | exit 0 18 | ;; 19 | *) 20 | for I in $TETHER_BOOT_OK; do 21 | if [ "$I" == "$PROD" ]; then 22 | rm -f $CORONA_DIR/memmove.cache 23 | rm -f $CORONA_DIR/cache 24 | rm -f $CORONA_DIR/udid 25 | echo "WARNING: You've might've just rendered your device unbootable! Consider reinstalling evasi0n 6.0-6.1 untether before you reboot if you're not near a computer." 26 | exit 0 27 | fi 28 | done 29 | echo "Refusing to remove this package as this action will render the device unbootable and possibly permanently unjailbreakable." 30 | exit 1 31 | ;; 32 | esac 33 | 34 | -------------------------------------------------------------------------------- /kiki/ios/tfp.h: -------------------------------------------------------------------------------- 1 | #ifndef TFP_H 2 | #define TFP_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "kiki-offsets.h" 9 | 10 | struct offsets* get_offsets_from_cache(); 11 | 12 | mach_port_t get_kernel_task(); 13 | uint32_t get_kernel_region_tfp(); 14 | int kernel_read_tfp(uint32_t addr, void* buffer, uint32_t size); 15 | int kernel_write_tfp(uint32_t addr, void* buffer, uint32_t size); 16 | void kernel_write_dword_tfp(uint32_t address, uint32_t value); 17 | uint32_t kernel_read_dword_tfp(uint32_t address); 18 | void kernel_write_uint16_tfp(uint32_t address, uint16_t value); 19 | void set_kernel_page_writable_tfp(uint32_t page); 20 | void set_kernel_page_writable_tfp2(io_connect_t connect, uint32_t page); 21 | uint32_t kernel_call_tfp(uint32_t fn, uint32_t r0, uint32_t r1, uint32_t r2, uint32_t r3); 22 | void setup_tfp(io_connect_t connect); 23 | void unsetup_tfp(); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/build_supported.h: -------------------------------------------------------------------------------- 1 | #ifndef __BUILD_SUPPORTED_H 2 | #define __BUILD_SUPPORTED_H 3 | 4 | struct build_supported_t { 5 | const char* buildVersion; 6 | int supported; 7 | }; 8 | 9 | static struct build_supported_t build_supported[] = { 10 | // 6.0 11 | {"10A403", 1}, 12 | {"10A405", 1}, 13 | {"10A406", 1}, 14 | {"10A407", 1}, 15 | 16 | // 6.0.1 17 | {"10A523", 1}, 18 | {"10A525", 1}, 19 | {"10A8426", 1}, 20 | 21 | // 6.0.2 22 | {"10A550", 1}, 23 | {"10A551", 1}, 24 | {"10A8500", 1}, 25 | 26 | // 6.1 27 | {"10B141", 1}, 28 | {"10B142", 1}, 29 | {"10B143", 1}, 30 | {"10B144", 1}, 31 | 32 | // 6.1.1 4S 33 | {"10B145", 1}, 34 | 35 | // 6.1.2 36 | {"10B146", 1}, 37 | {"10B147", 1}, 38 | 39 | // 6.1.1 beta 40 | {"10B311", 1}, 41 | 42 | {NULL, 0} 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /kiki/ios/Makefile: -------------------------------------------------------------------------------- 1 | include theos/makefiles/common.mk 2 | 3 | export TARGET_STRIP=strip 4 | export TARGET_STRIP_FLAGS=-s save_symbols -i 5 | export ARCHS=armv7 6 | 7 | override TARGET_CODESIGN_FLAGS = -Splatform-application-entitlement.plist 8 | 9 | TOOL_NAME = jailbreak kiki exception 10 | 11 | jailbreak_FILES = jailbreak.m jailbreakinstaller.m untar.c 12 | jailbreak_FRAMEWORKS = CoreFoundation 13 | jailbreak_PRIVATE_FRAMEWORKS = MobileCoreServices 14 | jailbreak_LIBRARIES = MobileGestalt 15 | jailbreak_CFLAGS = -Iheaders 16 | 17 | exception_FILES = exception.m 18 | exception_FRAMEWORKS = CoreFoundation Foundation 19 | 20 | kiki_FILES = kiki.m kiki-offsets.m patchfinder.c exploit.c findmemmove.c nvram.c sb_evaluate_trampoline.s sb_evaluate_hook.s zone_fix.m tfp.m call_function.s 21 | kiki_FRAMEWORKS = CoreFoundation IOKit 22 | kiki_LIBRARIES = z 23 | kiki_CFLAGS = -Iheaders 24 | 25 | include $(THEOS_MAKE_PATH)/library.mk 26 | include $(THEOS_MAKE_PATH)/tool.mk 27 | -------------------------------------------------------------------------------- /kernel/extras/Makefile: -------------------------------------------------------------------------------- 1 | extras.tar: dirhelper com.evad3rs.evasi0n.list com.evad3rs.evasi0n.prerm com.evad3rs.evasi0n.postrm com.evad3rs.evasi0n.extrainst_ 2 | $(eval TEMPDIR := $(shell mktemp -d -t evasi0n-extras)) 3 | mkdir -p $(TEMPDIR)/usr/libexec 4 | mkdir -p $(TEMPDIR)/private/var/lib/dpkg/info 5 | cp dirhelper $(TEMPDIR)/usr/libexec/dirhelper 6 | cp com.evad3rs.evasi0n.list $(TEMPDIR)/private/var/lib/dpkg/info/com.evad3rs.evasi0n.list 7 | cp com.evad3rs.evasi0n.prerm $(TEMPDIR)/private/var/lib/dpkg/info/com.evad3rs.evasi0n.prerm 8 | cp com.evad3rs.evasi0n.postrm $(TEMPDIR)/private/var/lib/dpkg/info/com.evad3rs.evasi0n.postrm 9 | cp com.evad3rs.evasi0n.extrainst_ $(TEMPDIR)/private/var/lib/dpkg/info/com.evad3rs.evasi0n.extrainst_ 10 | sudo chmod a+rx $(TEMPDIR) 11 | sudo chown -R 0:0 $(TEMPDIR) 12 | cd $(TEMPDIR); COPYFILE_DISABLE=1 COPY_EXTENDED_ATTRIBUTES_DISABLE=1 tar cvf $(CURDIR)/$@ . 13 | sudo rm -rf $(TEMPDIR) 14 | 15 | clean: 16 | rm -f extras.tar 17 | -------------------------------------------------------------------------------- /kiki/ios/jailbreak.m: -------------------------------------------------------------------------------- 1 | // 2 | // jailbreak.c 3 | // utility 4 | // 5 | // Created by Yiduo Wang on 10/31/12. 6 | // Copyright (c) 2012 Yiduo Wang. All rights reserved. 7 | // 8 | 9 | #include 10 | #include "untar.h" 11 | #include "jailbreakinstaller.h" 12 | 13 | #define RB_AUTOBOOT 0 14 | int reboot(int); 15 | 16 | CFTypeRef MGCopyAnswer(CFStringRef key, int unknown); 17 | 18 | int main(int argc, const char* argv[]) 19 | { 20 | NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 21 | 22 | prepare_jailbreak_install(); 23 | untar("/Developer/Cydia.tar", "/"); 24 | untar("/Developer/packagelist.tar", "/"); 25 | untar("/Developer/hack.tar", "/"); 26 | uicache(); 27 | 28 | CFStringRef udid = MGCopyAnswer(CFSTR("UniqueDeviceID"), 0); 29 | [(NSString *)udid writeToFile:@"/private/var/kiki/udid" atomically:YES encoding:NSUTF8StringEncoding error:NULL]; 30 | CFRelease(udid); 31 | 32 | reboot(RB_AUTOBOOT); 33 | [pool release]; 34 | } 35 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/video/IOVideoDeviceShared.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: IOVideoDeviceShared.h 3 | 4 | Contains: 5 | 6 | Copyright: © 2006-2010 by Apple Inc., all rights reserved. 7 | */ 8 | 9 | #if !defined(__IOKIT_IOVIDEODEVICESHARED_H) 10 | #define __IOKIT_IOVIDEODEVICESHARED_H 11 | 12 | #include 13 | #include 14 | 15 | /*! 16 | @header IOVideoDeviceShared.h 17 | IOVideoDevice definitions shared between kernel and user space. 18 | */ 19 | 20 | __BEGIN_DECLS 21 | 22 | /*! 23 | @enum Mach port types 24 | @constant kIOVideoDevicePortTypeNotification 25 | @constant kIOVideoDevicePortTypeOutput 26 | @constant kIOVideoDevicePortTypeInput 27 | @abstract Port types used with IOConnectSetNotificationPort(). 28 | */ 29 | enum 30 | { 31 | kIOVideoDevicePortTypeNotification, 32 | kIOVideoDevicePortTypeOutput, 33 | kIOVideoDevicePortTypeInput 34 | }; 35 | 36 | __END_DECLS 37 | 38 | #endif /* ! __IOKIT_IOVIDEODEVICESHARED_H */ 39 | 40 | -------------------------------------------------------------------------------- /kernel/ios/kiki-log.m: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | static char log_path[PATH_MAX]; 6 | 7 | void jb_log(const char* format, ...) 8 | { 9 | static FILE* f = NULL; 10 | struct timeval tv; 11 | gettimeofday(&tv, NULL); 12 | 13 | if(!f) 14 | { 15 | snprintf(log_path, sizeof(log_path), "/private/var/mobile/Media/jailbreak-%lu.log", tv.tv_sec); 16 | f = fopen(log_path, "wb"); 17 | } 18 | 19 | fprintf(f, "[%lu.%llu] ", tv.tv_sec, (unsigned long long)tv.tv_usec); 20 | 21 | va_list args; 22 | va_start(args, format); 23 | vfprintf(f, format, args); 24 | vsyslog(LOG_EMERG, format, args); 25 | va_end(args); 26 | 27 | if(format[strlen(format) - 1] != '\n') 28 | fprintf(f, "\n"); 29 | 30 | fflush(f); 31 | sync(); 32 | } 33 | 34 | void jb_end_log() 35 | { 36 | unlink("/private/var/mobile/Media/jailbreak.log"); 37 | rename(log_path, "/private/var/mobile/Media/jailbreak.log"); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /res/gui/osx/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | evasi0n 9 | CFBundleIconFile 10 | Icon.icns 11 | CFBundleIdentifier 12 | com.evad3rs.evasi0n 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | evasi0n 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0.0 21 | LSApplicationCategoryType 22 | 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0.0 27 | NSHighResolutionCapable 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOSurface/IOSurfaceBase.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IOSurfaceBase.h 3 | * IOSurface 4 | * 5 | * Copyright 2006-2008 Apple, Inc. All rights reserved. 6 | * 7 | */ 8 | 9 | #ifndef _IOSURFACE_BASE_H 10 | #define _IOSURFACE_BASE_H 11 | 12 | #include 13 | 14 | # include 15 | # if defined(MAC_OS_X_VERSION_10_6) 16 | # include 17 | # endif /* defined(MAC_OS_X_VERSION_10_6) */ 18 | 19 | #if !defined(MAC_OS_X_VERSION_10_6) || defined(IOSFC_BUILDING_IOSFC) 20 | # define IOSFC_DEPRECATED 21 | # define IOSFC_AVAILABLE_STARTING(_mac,_iphone) 22 | # define IOSFC_AVAILABLE_BUT_DEPRECATED(_mac,_macDep,_iphone,_iphoneDep) 23 | #else /* !defined(IOSFC_BUILDING_IOSFC) */ 24 | # define IOSFC_DEPRECATED DEPRECATED_ATTRIBUTE 25 | # define IOSFC_AVAILABLE_STARTING __OSX_AVAILABLE_STARTING 26 | # define IOSFC_AVAILABLE_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED 27 | #endif /* !defined(IOSFC_BUILDING_IOSFC) */ 28 | 29 | #include 30 | #include 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/video/IOVideoDeviceClientInit.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: IOVideoDeviceClientInit.h 3 | 4 | Contains: This class is used to add an IOProviderMergeProperties dictionary entry to a provider's property list, thus providing a tie between hardware and a CFBundle at hardware 5 | load time. This property usually contains the user client class name and the CFPlugInTypes UUID's but it can contain other properties. 6 | 7 | 8 | Copyright: © 2006-2010 by Apple Inc., all rights reserved. 9 | */ 10 | 11 | #ifndef __IOVIDEODEVICECLIENTINIT_H 12 | #define __IOVIDEODEVICECLIENTINIT_H 13 | 14 | #include 15 | 16 | class IOVideoDeviceUserClientInit : public IOService 17 | { 18 | OSDeclareDefaultStructors(IOVideoDeviceUserClientInit); 19 | 20 | public: 21 | virtual bool start(IOService* provider) ; 22 | virtual bool MergeDictionaryIntoProvider(IOService* provider, OSDictionary* mergeDicttionary); 23 | virtual bool MergeDictionaryIntoDictionary(OSDictionary* sourceDictionary, OSDictionary* targetDictionary); 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /untether/scripts/Cydia.hpp: -------------------------------------------------------------------------------- 1 | /* Cydia Substrate - Powerful Code Insertion Platform 2 | * Copyright (C) 2008-2011 Jay Freeman (saurik) 3 | */ 4 | 5 | /* GNU Lesser General Public License, Version 3 {{{ */ 6 | /* 7 | * Substrate is free software: you can redistribute it and/or modify it under 8 | * the terms of the GNU Lesser General Public License as published by the 9 | * Free Software Foundation, either version 3 of the License, or (at your 10 | * option) any later version. 11 | * 12 | * Substrate is distributed in the hope that it will be useful, but WITHOUT 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 15 | * License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with Substrate. If not, see . 19 | **/ 20 | /* }}} */ 21 | 22 | #ifndef SUBSTRATE_CYDIA_HPP 23 | #define SUBSTRATE_CYDIA_HPP 24 | 25 | void FinishCydia(const char *finish); 26 | 27 | #endif//SUBSTRATE_CYDIA_HPP 28 | -------------------------------------------------------------------------------- /include/openssl/whrlpool.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_WHRLPOOL_H 2 | #define HEADER_WHRLPOOL_H 3 | 4 | #include 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define WHIRLPOOL_DIGEST_LENGTH (512/8) 12 | #define WHIRLPOOL_BBLOCK 512 13 | #define WHIRLPOOL_COUNTER (256/8) 14 | 15 | typedef struct { 16 | union { 17 | unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; 18 | /* double q is here to ensure 64-bit alignment */ 19 | double q[WHIRLPOOL_DIGEST_LENGTH/sizeof(double)]; 20 | } H; 21 | unsigned char data[WHIRLPOOL_BBLOCK/8]; 22 | unsigned int bitoff; 23 | size_t bitlen[WHIRLPOOL_COUNTER/sizeof(size_t)]; 24 | } WHIRLPOOL_CTX; 25 | 26 | #ifndef OPENSSL_NO_WHIRLPOOL 27 | int WHIRLPOOL_Init (WHIRLPOOL_CTX *c); 28 | int WHIRLPOOL_Update (WHIRLPOOL_CTX *c,const void *inp,size_t bytes); 29 | void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c,const void *inp,size_t bits); 30 | int WHIRLPOOL_Final (unsigned char *md,WHIRLPOOL_CTX *c); 31 | unsigned char *WHIRLPOOL(const void *inp,size_t bytes,unsigned char *md); 32 | #endif 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | Version 1.5.3 2 | ~~~~~~~~~~~~~ 3 | - Fix bugs with the Windows version. 4 | 5 | Version 1.5.2 6 | ~~~~~~~~~~~~~ 7 | - Added French translation. 8 | - Added Chinese translation. 9 | - Added German translation. 10 | - Updated bundled Cydia with localization fixes. 11 | - Updated included Cydia package list. 12 | 13 | Version 1.5.1 14 | ~~~~~~~~~~~~~ 15 | - Updated included Cydia package list. 16 | 17 | Version 1.5 18 | ~~~~~~~~~~~ 19 | - Improved boot-up time. 20 | - Updated included Cydia package list. 21 | 22 | Version 1.4 23 | ~~~~~~~~~~~ 24 | - Support for 6.1.2. 25 | 26 | Version 1.3 27 | ~~~~~~~~~~~ 28 | - Support for 6.1.1 on the iPhone 4S. 29 | 30 | Version 1.2 31 | ~~~~~~~~~~~ 32 | - Disable OTA updates. 33 | - Correct timezone issue in evasi0n binary if client fails to correct it. 34 | 35 | Version 1.1 36 | ~~~~~~~~~~~ 37 | - prevent Weather app from appearing on iPads. 38 | - mitigated the long reboot issue. 39 | - fix issue with not working after connecting multiple iOS devices 40 | - fix blinking of the jailbreak instructions on OS X. 41 | - codesigned Mac app. 42 | 43 | Version 1.0 44 | ~~~~~~~~~~~ 45 | - first public release 46 | 47 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOMediaBSDClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2011 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | #ifndef _IOMEDIABSDCLIENT_H 25 | #define _IOMEDIABSDCLIENT_H 26 | 27 | #include 28 | 29 | #endif /* !_IOMEDIABSDCLIENT_H */ 30 | -------------------------------------------------------------------------------- /generate_languages.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import sys 5 | import plistlib 6 | import generate_en 7 | 8 | def validate(en, language_name, language): 9 | if language_name == 'aliases': 10 | return False 11 | 12 | missing = False 13 | for key in en.keys(): 14 | if key not in language: 15 | sys.stderr.write('MISSING:' + language_name + ':' + key + '\n') 16 | missing = True 17 | return missing 18 | 19 | 20 | def process(d, en, language_name, file_name): 21 | language = plistlib.readPlist(file_name) 22 | d[language_name] = language 23 | return validate(en, language_name, language) 24 | 25 | script_path = os.path.dirname(__file__) 26 | languages_path = os.path.join(script_path, 'res', 'languages') 27 | 28 | generate_en.generate_en() 29 | en = plistlib.readPlist(os.path.join(languages_path, 'en.plist')) 30 | 31 | d = dict() 32 | missing = False 33 | for file_name in os.listdir(languages_path): 34 | if file_name.endswith('.plist'): 35 | language_name = file_name[:file_name.index('.plist')] 36 | if process(d, en, language_name, os.path.join(languages_path, file_name)): 37 | missing = True 38 | 39 | plistlib.writePlist(d, os.path.join(script_path, 'res', 'languages.plist')) 40 | -------------------------------------------------------------------------------- /kiki/ios/kiki-offsets.h: -------------------------------------------------------------------------------- 1 | #ifndef KIKI_OFFSETS_H 2 | #define KIKI_OFFSETS_H 3 | 4 | #include 5 | #include 6 | 7 | struct offsets 8 | { 9 | char platform[20]; 10 | char build[20]; 11 | uint32_t memmove; 12 | uint32_t str_r1_r2_bx_lr; 13 | uint32_t flush_dcache; 14 | uint32_t invalidate_tlb; 15 | uint32_t pmap_location; 16 | uint32_t proc_enforce; 17 | uint32_t cs_enforcement_disable_amfi; 18 | uint32_t cs_enforcement_disable_kernel; 19 | uint32_t i_can_has_debugger_1; 20 | uint32_t i_can_has_debugger_2; 21 | uint32_t vm_map_enter_patch; 22 | uint32_t vm_map_protect_patch; 23 | uint32_t tfp0_patch; 24 | uint32_t sb_patch; 25 | uint32_t vn_getpath; 26 | uint32_t memcmp; 27 | uint32_t p_bootargs; 28 | uint32_t zone_page_table; 29 | uint32_t ipc_kmsg_destroy; 30 | uint32_t syscall0; 31 | uint32_t io_free; 32 | uint32_t IOLog; 33 | uint32_t crc; 34 | }; 35 | 36 | const char* get_platform(); 37 | const char* get_os_build_version(); 38 | void initialize_offsets(io_connect_t connect); 39 | struct offsets* get_offsets(); 40 | void load_offsets(uint32_t region, void (*kernel_read)(void* context, uint32_t address, void* buffer, uint32_t size), void* context); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /include/plist/plist++.h: -------------------------------------------------------------------------------- 1 | /* 2 | * plist++.h 3 | * Main include of libplist C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef LIBPLISTXX_H 23 | #define LIBPLISTXX_H 24 | 25 | #include "plist.h" 26 | #include "Array.h" 27 | #include "Boolean.h" 28 | #include "Data.h" 29 | #include "Date.h" 30 | #include "Dictionary.h" 31 | #include "Integer.h" 32 | #include "Node.h" 33 | #include "Real.h" 34 | #include "String.h" 35 | #include "Structure.h" 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * GreenPois0n Absinthe - debug.h 3 | * Copyright (C) 2010 Chronic-Dev Team 4 | * Copyright (C) 2010 Joshua Hill 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | **/ 19 | 20 | #ifndef DEBUG_H_ 21 | #define DEBUG_H_ 22 | 23 | #ifdef HAVE_CONFIG_H 24 | #include 25 | #endif 26 | 27 | #include 28 | 29 | #ifdef _DEBUG 30 | #define info(...) fprintf(stdout, __VA_ARGS__) 31 | #define error(...) fprintf(stderr, __VA_ARGS__) 32 | #define debug(...) fprintf(stderr, __VA_ARGS__) 33 | #else 34 | #define info(...) printf(__VA_ARGS__) 35 | #define error(...) fprintf(stderr, __VA_ARGS__) 36 | #define debug(...) 37 | #endif 38 | 39 | #endif /* DEBUG_H_ */ 40 | -------------------------------------------------------------------------------- /kernel/ios/Makefile: -------------------------------------------------------------------------------- 1 | include theos/makefiles/common.mk 2 | 3 | export TARGET_STRIP=strip 4 | export TARGET_STRIP_FLAGS=-s save_symbols -i 5 | export ARCHS=armv7 6 | 7 | override TARGET_CODESIGN_FLAGS = -Splatform-application-entitlement.plist 8 | 9 | TOOL_NAME = evasi0n exception 10 | 11 | exception_FILES = exception.m 12 | exception_FRAMEWORKS = CoreFoundation Foundation 13 | 14 | evasi0n_FILES = kiki.m kiki-offsets.m patchfinder.c exploit.c findmemmove.c nvram.c sb_evaluate_trampoline.s sb_evaluate_hook.s zone_fix.m tfp.m untar.c call_function.s jailbreakinstaller.m framebuffer.c deadman.c kiki-log.m wdt.c localize.m 15 | evasi0n_FRAMEWORKS = CoreFoundation IOKit CoreGraphics CoreText IOSurface 16 | evasi0n_PRIVATE_FRAMEWORKS = IOMobileFramebuffer 17 | evasi0n_LIBRARIES = z 18 | evasi0n_CFLAGS = -Iheaders 19 | evasi0n_LDFLAGS = -sectcreate __DATA logo logo.png -sectcreate __DATA control ../../untether/package-debian/control -sectcreate __DATA languages ../../res/languages.plist 20 | 21 | before-evasi0n-all:: watermark.h ../../res/languages.plist 22 | 23 | ../../res/languages.plist: 24 | ../../generate_languages.py 25 | 26 | watermark.h: 27 | ./generate-watermark.sh $(WATERMARK) 28 | 29 | clean:: 30 | rm -f watermark.h 31 | rm -f ../../res/languages.plist 32 | 33 | include $(THEOS_MAKE_PATH)/library.mk 34 | include $(THEOS_MAKE_PATH)/tool.mk 35 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/IOSharedLock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | #ifndef _IOKIT_IOSHAREDLOCK_H 25 | #define _IOKIT_IOSHAREDLOCK_H 26 | 27 | #include 28 | 29 | #define IOSharedLockData OSSpinLock 30 | #define ev_lock_data_t OSSpinLock 31 | 32 | 33 | #endif /* ! _IOKIT_IOSHAREDLOCK_H */ 34 | -------------------------------------------------------------------------------- /generate_en.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import plistlib 5 | import re 6 | 7 | def process_escapes(s): 8 | return s.decode('string_escape').decode('UTF-8') 9 | 10 | def process(s, file_name): 11 | s |= set(map(process_escapes, re.findall(r'localize\("(.*?)"\)', open(file_name, 'r').read()))) 12 | 13 | def generate_en(): 14 | script_path = os.path.dirname(__file__) 15 | 16 | s = set() 17 | src_path = os.path.join(script_path, 'src') 18 | for file_name in os.listdir(src_path): 19 | if file_name.endswith('.m') or file_name.endswith('.c') or file_name.endswith('.cpp') or file_name.endswith('.h'): 20 | process(s, os.path.join(src_path, file_name)) 21 | 22 | src_path = os.path.join(script_path, 'kernel', 'ios') 23 | for file_name in os.listdir(src_path): 24 | if file_name.endswith('.m') or file_name.endswith('.c') or file_name.endswith('.cpp') or file_name.endswith('.h'): 25 | process(s, os.path.join(src_path, file_name)) 26 | 27 | d = dict() 28 | for string in s: 29 | d[string] = string 30 | 31 | languages_path = os.path.join(script_path, 'res', 'languages') 32 | if not os.path.exists(languages_path): 33 | os.makedirs(languages_path) 34 | plistlib.writePlist(d, os.path.join(languages_path, 'en.plist')) 35 | 36 | if __name__ == '__main__': 37 | generate_en() 38 | -------------------------------------------------------------------------------- /src/device_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __DEVICE_TYPES_H 2 | #define __DEVICE_TYPES_H 3 | 4 | struct device_type_t { 5 | const char* productType; 6 | const char* displayName; 7 | }; 8 | 9 | static struct device_type_t device_types[] = { 10 | // iPhones 11 | {"iPhone1,1", "iPhone"}, 12 | {"iPhone1,2", "iPhone 3G"}, 13 | {"iPhone2,1", "iPhone 3GS"}, 14 | {"iPhone3,1", "iPhone 4 (GSM)"}, 15 | {"iPhone3,2", "iPhone 4 (GSM) R2"}, 16 | {"iPhone3,3", "iPhone 4 (CDMA)"}, 17 | {"iPhone4,1", "iPhone 4S"}, 18 | {"iPhone5,1", "iPhone 5 (GSM)"}, 19 | {"iPhone5,2", "iPhone 5 (Global)"}, 20 | // iPods 21 | {"iPod1,1", "iPod Touch"}, 22 | {"iPod2,1", "iPod touch (2G)"}, 23 | {"iPod3,1", "iPod Touch (3G)"}, 24 | {"iPod4,1", "iPod Touch (4G)"}, 25 | {"iPod5,1", "iPod Touch (5G)"}, 26 | // iPads 27 | {"iPad1,1", "iPad"}, 28 | {"iPad2,1", "iPad 2 (Wi-Fi)"}, 29 | {"iPad2,2", "iPad 2 (GSM)"}, 30 | {"iPad2,3", "iPad 2 (CDMA)"}, 31 | {"iPad2,4", "iPad 2 (Wi-Fi) R2"}, 32 | {"iPad3,1", "iPad 3 (Wi-Fi)"}, 33 | {"iPad3,2", "iPad 3 (CDMA)"}, 34 | {"iPad3,3", "iPad 3 (GSM)"}, 35 | {"iPad3,4", "iPad 4 (WiFi)"}, 36 | {"iPad3,5", "iPad 4 (GSM)"}, 37 | {"iPad3,6", "iPad 4 (Global)"}, 38 | // iPad minis 39 | {"iPad2,5", "iPad mini (Wi-Fi)"}, 40 | {"iPad2,6", "iPad mini (GSM)"}, 41 | {"iPad2,7", "iPad mini (Global)"}, 42 | // AppleTV 43 | {"AppleTV2,1", "AppleTV (2G)"}, 44 | {"AppleTV3,1", "AppleTV (3G)"}, 45 | {NULL, NULL} 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /include/plist/Real.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Real.h 3 | * Real node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST__REAL_H 23 | #define PLIST__REAL_H 24 | 25 | #include 26 | 27 | namespace PList 28 | { 29 | 30 | class Real : public Node 31 | { 32 | public : 33 | Real(Node* parent = NULL); 34 | Real(plist_t node, Node* parent = NULL); 35 | Real(Real& d); 36 | Real& operator=(Real& d); 37 | Real(double d); 38 | virtual ~Real(); 39 | 40 | Node* Clone(); 41 | 42 | void SetValue(double d); 43 | double GetValue(); 44 | }; 45 | 46 | }; 47 | 48 | #endif // PLIST__REAL_H 49 | -------------------------------------------------------------------------------- /src/JailbreakHandler.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifdef WIN32 5 | #include 6 | #else 7 | #include 8 | #endif 9 | 10 | #include "JailbreakHandler.h" 11 | #include "jailbreak.h" 12 | 13 | static JailbreakHandler* self; 14 | 15 | static void status_cb(const char* message, int progress, int attention) 16 | { 17 | self->statusCallback(message, progress, attention); 18 | } 19 | 20 | JailbreakHandler::JailbreakHandler(DeviceHandler* devhandler) 21 | : devhandler(devhandler) 22 | { 23 | self = this; 24 | } 25 | 26 | void JailbreakHandler::statusCallback(const char* message, int progress, int attention) 27 | { 28 | devhandler->processStatus(message, progress, attention); 29 | } 30 | 31 | void* JailbreakHandler::Entry(void* data) 32 | { 33 | char* udid = strdup(devhandler->getUDID()); 34 | idevice_event_t event; 35 | event.udid = udid; 36 | event.event = IDEVICE_DEVICE_ADD; 37 | jb_device_event_cb(&event, udid); 38 | jailbreak(udid, status_cb); 39 | free(udid); 40 | 41 | const char* error = "Done!"; 42 | 43 | devhandler->processFinished(error); 44 | return 0; 45 | } 46 | 47 | static void* thread_func(void* data) 48 | { 49 | return self->Entry(data); 50 | } 51 | 52 | void JailbreakHandler::Start(void) 53 | { 54 | #ifdef WIN32 55 | this->thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)thread_func, NULL, 0, NULL); 56 | #else 57 | pthread_create(&this->thread, NULL, thread_func, NULL); 58 | #endif 59 | } 60 | -------------------------------------------------------------------------------- /src/file.h: -------------------------------------------------------------------------------- 1 | /** 2 | * GreenPois0n Absinthe - file.h 3 | * Copyright (C) 2010 Chronic-Dev Team 4 | * Copyright (C) 2010 Joshua Hill 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | **/ 19 | 20 | #ifndef FILE_H_ 21 | #define FILE_H_ 22 | 23 | #include 24 | 25 | typedef struct file_t { 26 | FILE* desc; 27 | char* path; 28 | uint64_t size; 29 | uint64_t offset; 30 | unsigned char* data; 31 | } file_t; 32 | 33 | file_t* file_create(); 34 | void file_close(file_t* file); 35 | void file_free(file_t* file); 36 | file_t* file_open(const char* path); 37 | 38 | int file_read(const char* file, unsigned char** buf, unsigned int* length); 39 | int file_write(const char* file, unsigned char* buf, unsigned int length); 40 | int file_copy(const char* from, const char* to); 41 | 42 | #endif /* FILE_H_ */ 43 | -------------------------------------------------------------------------------- /include/plist/Boolean.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Boolean.h 3 | * Boolean node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST__BOOLEAN_H 23 | #define PLIST__BOOLEAN_H 24 | 25 | #include 26 | 27 | namespace PList 28 | { 29 | 30 | class Boolean : public Node 31 | { 32 | public : 33 | Boolean(Node* parent = NULL); 34 | Boolean(plist_t node, Node* parent = NULL); 35 | Boolean(Boolean& b); 36 | Boolean& operator=(Boolean& b); 37 | Boolean(bool b); 38 | virtual ~Boolean(); 39 | 40 | Node* Clone(); 41 | 42 | void SetValue(bool b); 43 | bool GetValue(); 44 | }; 45 | 46 | }; 47 | 48 | #endif // PLIST__BOOLEAN_H 49 | -------------------------------------------------------------------------------- /include/plist/Key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Key.h 3 | * Key node type for C++ binding 4 | * 5 | * Copyright (c) 2012 Nikias Bassen, All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST__KEY_H 23 | #define PLIST__KEY_H 24 | 25 | #include 26 | #include 27 | 28 | namespace PList 29 | { 30 | 31 | class Key : public Node 32 | { 33 | public : 34 | Key(Node* parent = NULL); 35 | Key(plist_t node, Node* parent = NULL); 36 | Key(Key& s); 37 | Key& operator=(Key& s); 38 | Key(const std::string& s); 39 | virtual ~Key(); 40 | 41 | Node* Clone(); 42 | 43 | void SetValue(const std::string& s); 44 | std::string GetValue(); 45 | }; 46 | 47 | }; 48 | 49 | #endif // PLIST__KEY_H 50 | -------------------------------------------------------------------------------- /include/plist/Date.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Date.h 3 | * Date node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST__DATE_H 23 | #define PLIST__DATE_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace PList 30 | { 31 | 32 | class Date : public Node 33 | { 34 | public : 35 | Date(Node* parent = NULL); 36 | Date(plist_t node, Node* parent = NULL); 37 | Date(Date& d); 38 | Date& operator=(Date& d); 39 | Date(timeval t); 40 | virtual ~Date(); 41 | 42 | Node* Clone(); 43 | 44 | void SetValue(timeval t); 45 | timeval GetValue(); 46 | }; 47 | 48 | }; 49 | 50 | #endif // PLIST__DATE_H 51 | -------------------------------------------------------------------------------- /include/plist/Integer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Integer.h 3 | * Integer node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST__INTEGER_H 23 | #define PLIST__INTEGER_H 24 | 25 | #include 26 | 27 | namespace PList 28 | { 29 | 30 | class Integer : public Node 31 | { 32 | public : 33 | Integer(Node* parent = NULL); 34 | Integer(plist_t node, Node* parent = NULL); 35 | Integer(Integer& i); 36 | Integer& operator=(Integer& i); 37 | Integer(uint64_t i); 38 | virtual ~Integer(); 39 | 40 | Node* Clone(); 41 | 42 | void SetValue(uint64_t i); 43 | uint64_t GetValue(); 44 | }; 45 | 46 | }; 47 | 48 | #endif // PLIST__INTEGER_H 49 | -------------------------------------------------------------------------------- /include/plist/Data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Data.h 3 | * Data node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST__DATA_H 23 | #define PLIST__DATA_H 24 | 25 | #include 26 | #include 27 | 28 | namespace PList 29 | { 30 | 31 | class Data : public Node 32 | { 33 | public : 34 | Data(Node* parent = NULL); 35 | Data(plist_t node, Node* parent = NULL); 36 | Data(Data& d); 37 | Data& operator=(Data& d); 38 | Data(const std::vector& buff); 39 | virtual ~Data(); 40 | 41 | Node* Clone(); 42 | 43 | void SetValue(const std::vector& buff); 44 | std::vector GetValue(); 45 | }; 46 | 47 | }; 48 | 49 | #endif // PLIST__DATA_H 50 | -------------------------------------------------------------------------------- /include/plist/String.h: -------------------------------------------------------------------------------- 1 | /* 2 | * String.h 3 | * String node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST__STRING_H 23 | #define PLIST__STRING_H 24 | 25 | #include 26 | #include 27 | 28 | namespace PList 29 | { 30 | 31 | class String : public Node 32 | { 33 | public : 34 | String(Node* parent = NULL); 35 | String(plist_t node, Node* parent = NULL); 36 | String(String& s); 37 | String& operator=(String& s); 38 | String(const std::string& s); 39 | virtual ~String(); 40 | 41 | Node* Clone(); 42 | 43 | void SetValue(const std::string& s); 44 | std::string GetValue(); 45 | }; 46 | 47 | }; 48 | 49 | #endif // PLIST__STRING_H 50 | -------------------------------------------------------------------------------- /src/common.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #ifdef WIN32 10 | #include 11 | #include 12 | #include 13 | #endif 14 | 15 | int __mkdir(const char* path, int mode) 16 | { 17 | #ifdef WIN32 18 | return _mkdir(path); 19 | #else 20 | return mkdir(path, mode); 21 | #endif 22 | } 23 | 24 | int mkdir_with_parents(const char *dir, int mode) 25 | { 26 | if (!dir) return -1; 27 | if (__mkdir(dir, mode) == 0) { 28 | return 0; 29 | } else { 30 | if (errno == EEXIST) return 0; 31 | } 32 | int res; 33 | char *parent = strdup(dir); 34 | char* parentdir = dirname(parent); 35 | if (parentdir) { 36 | res = mkdir_with_parents(parentdir, mode); 37 | } else { 38 | res = -1; 39 | } 40 | free(parent); 41 | if (res == 0) { 42 | mkdir_with_parents(dir, mode); 43 | } 44 | return res; 45 | } 46 | 47 | char* build_path(const char* elem, ...) 48 | { 49 | if (!elem) return NULL; 50 | va_list args; 51 | int len = strlen(elem)+1; 52 | va_start(args, elem); 53 | char *arg = va_arg(args, char*); 54 | while (arg) { 55 | len += strlen(arg)+1; 56 | arg = va_arg(args, char*); 57 | } 58 | va_end(args); 59 | 60 | char* out = (char*)malloc(len); 61 | strcpy(out, elem); 62 | 63 | va_start(args, elem); 64 | arg = va_arg(args, char*); 65 | while (arg) { 66 | strcat(out, "/"); 67 | strcat(out, arg); 68 | arg = va_arg(args, char*); 69 | } 70 | va_end(args); 71 | return out; 72 | } 73 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/graphics/IOAccelClientConnect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | 23 | #ifndef _IOACCEL_CLIENT_CONNECT_H 24 | #define _IOACCEL_CLIENT_CONNECT_H 25 | 26 | 27 | /* 28 | ** The IOAccelerator service name 29 | */ 30 | #define kIOAcceleratorClassName "IOAccelerator" 31 | 32 | 33 | /* 34 | ** IOAccelerator public client types. Private client types start with 35 | ** kIOAccelNumClientTypes. 36 | */ 37 | enum eIOAcceleratorClientTypes { 38 | kIOAccelSurfaceClientType, 39 | kIOAccelNumClientTypes 40 | }; 41 | 42 | 43 | #endif /* _IOACCEL_CLIENT_CONNECT_H */ 44 | 45 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOFilterScheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2011 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOFilterScheme 26 | * @abstract 27 | * This header contains the IOFilterScheme class definition. 28 | */ 29 | 30 | #ifndef _IOFILTERSCHEME_H 31 | #define _IOFILTERSCHEME_H 32 | 33 | /*! 34 | * @defined kIOFilterSchemeClass 35 | * @abstract 36 | * The name of the IOFilterScheme class. 37 | * @discussion 38 | * kIOFilterSchemeClass is the name of the IOFilterScheme class. 39 | */ 40 | 41 | #define kIOFilterSchemeClass "IOFilterScheme" 42 | 43 | #endif /* !_IOFILTERSCHEME_H */ 44 | -------------------------------------------------------------------------------- /untether/scripts/Cydia.mm: -------------------------------------------------------------------------------- 1 | /* Cydia Substrate - Powerful Code Insertion Platform 2 | * Copyright (C) 2008-2011 Jay Freeman (saurik) 3 | */ 4 | 5 | /* GNU Lesser General Public License, Version 3 {{{ */ 6 | /* 7 | * Substrate is free software: you can redistribute it and/or modify it under 8 | * the terms of the GNU Lesser General Public License as published by the 9 | * Free Software Foundation, either version 3 of the License, or (at your 10 | * option) any later version. 11 | * 12 | * Substrate is distributed in the hope that it will be useful, but WITHOUT 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 15 | * License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with Substrate. If not, see . 19 | **/ 20 | /* }}} */ 21 | 22 | #include 23 | 24 | #include 25 | #include 26 | 27 | #include 28 | 29 | #include "Cydia.hpp" 30 | 31 | void FinishCydia(const char *finish) { 32 | if (finish == NULL) 33 | return; 34 | 35 | const char *cydia(getenv("CYDIA")); 36 | if (cydia == NULL) 37 | return; 38 | 39 | 40 | // XXX: I think I'd like to rewrite this code using C++ 41 | int fd([[[[NSString stringWithUTF8String:cydia] componentsSeparatedByString:@" "] objectAtIndex:0] intValue]); 42 | 43 | FILE *fout(fdopen(fd, "w")); 44 | fprintf(fout, "finish:%s\n", finish); 45 | fclose(fout); 46 | } 47 | -------------------------------------------------------------------------------- /src/mbdb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * GreenPois0n Apparition - mbdb.h 3 | * Copyright (C) 2010 Chronic-Dev Team 4 | * Copyright (C) 2010 Joshua Hill 5 | * Copyright (C) 2012 Hanéne Samara 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | **/ 20 | 21 | #ifndef MBDB_H 22 | #define MBDB_H 23 | 24 | #include "mbdb_record.h" 25 | 26 | #define MBDB_MAGIC "\x6d\x62\x64\x62\x05\x00" 27 | 28 | 29 | typedef struct mbdb_header { 30 | unsigned char magic[6]; // 'mbdb\5\0' 31 | } mbdb_header_t; 32 | 33 | typedef struct mbdb_t { 34 | unsigned int size; 35 | unsigned char* data; 36 | mbdb_header_t* header; 37 | int num_records; 38 | mbdb_record_t** records; 39 | } mbdb_t; 40 | 41 | extern mbdb_t* apparition_mbdb; 42 | 43 | mbdb_t* mbdb_create(); 44 | mbdb_t* mbdb_open(char* file); 45 | mbdb_t* mbdb_parse(unsigned char* data, unsigned int size); 46 | mbdb_record_t* mbdb_get_record(mbdb_t* mbdb, unsigned int offset); 47 | void mbdb_free(mbdb_t* mbdb); 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/IOCFBundle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #ifndef __IOKIT_IOCFBUNDLE_H 24 | #define __IOKIT_IOCFBUNDLE_H 25 | 26 | #include 27 | 28 | #define kIOBundleInfoDictionaryVersionKey CFSTR("CFBundleInfoDictionaryVersion") 29 | #define kIOBundleExecutableKey CFSTR("CFBundleExecutable") 30 | #define kIOBundleIdentifierKey CFSTR("CFBundleIdentifier") 31 | #define kIOBundleVersionKey CFSTR("CFBundleVersion") 32 | #define kIOBundleDevelopmentRegionKey CFSTR("CFBundleDevelopmentRegion") 33 | #define kIOBundleNameKey CFSTR("CFBundleName") 34 | 35 | #endif /* __IOKIT_IOCFBUNDLE_H */ 36 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/video/IOVideoStreamFormatDictionary.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: IOVideoStreamFormat.h 3 | 4 | Contains: 5 | 6 | Copyright: © 2006-2010 by Apple Inc., all rights reserved. 7 | */ 8 | 9 | #if !defined(__IOVideoStreamFormat_h__) 10 | #define __IOVideoStreamFormat_h__ 11 | 12 | // System Includes 13 | #include 14 | 15 | class OSDictionary; 16 | 17 | class IOVideoStreamFormatDictionary 18 | { 19 | public: 20 | static OSDictionary* create(UInt32 codecType, UInt32 codecFlags, UInt32 width, UInt32 height); 21 | static OSDictionary* createWithDescription(const IOVideoStreamDescription& format); 22 | 23 | // Attributes 24 | public: 25 | static UInt32 getCodecType(const OSDictionary* dictionary); 26 | static void setCodecType(OSDictionary* dictionary, UInt32 codecType); 27 | 28 | static UInt32 getCodecFlags(const OSDictionary* dictionary); 29 | static void setCodecFlags(OSDictionary* dictionary, UInt32 codecFlags); 30 | 31 | static UInt32 getWidth(const OSDictionary* dictionary); 32 | static void setWidth(OSDictionary* dictionary, UInt32 width); 33 | 34 | static UInt32 getHeight(const OSDictionary* dictionary); 35 | static void setHeight(OSDictionary* dictionary, UInt32 height); 36 | 37 | static void getDescription(const OSDictionary* dictionary, IOVideoStreamDescription& format); 38 | static void printDescription(const IOVideoStreamDescription& format); 39 | static void printDictionary(const OSDictionary* dictionary); 40 | 41 | static bool isSameSampleFormat(const IOVideoStreamDescription& format1, const IOVideoStreamDescription& format2); 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /include/plist/Node.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Node.h 3 | * Abstract node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST__NODE_H 23 | #define PLIST__NODE_H 24 | 25 | #include 26 | 27 | namespace PList 28 | { 29 | 30 | class Node 31 | { 32 | public : 33 | virtual ~Node(); 34 | 35 | virtual Node* Clone() = 0; 36 | 37 | Node * GetParent(); 38 | plist_type GetType(); 39 | plist_t GetPlist(); 40 | 41 | static Node* FromPlist(plist_t node, Node* parent = NULL); 42 | 43 | protected: 44 | Node(Node* parent = NULL); 45 | Node(plist_t node, Node* parent = NULL); 46 | Node(plist_type type, Node* parent = NULL); 47 | plist_t _node; 48 | 49 | private: 50 | Node* _parent; 51 | friend class Structure; 52 | }; 53 | 54 | }; 55 | 56 | #endif // PLIST__NODE_H 57 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/IOCFSerialize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* 24 | * HISTORY 25 | * 26 | */ 27 | 28 | /* IOCFSerialize serializes CFObjects to a format suitable for passing 29 | * to the kernel. */ 30 | 31 | #ifndef __IOKIT_IOCFSERIALIZE_H 32 | #define __IOKIT_IOCFSERIALIZE_H 33 | 34 | #include 35 | #include 36 | 37 | #if defined(__cplusplus) 38 | extern "C" { 39 | #endif 40 | 41 | enum { 42 | kIOCFSerializeToBinary = 0x00000001 43 | }; 44 | 45 | CFDataRef 46 | IOCFSerialize( CFTypeRef object, CFOptionFlags options ); 47 | 48 | #if defined(__cplusplus) 49 | } 50 | #endif 51 | 52 | #endif /* __IOKIT_IOCFSERIALIZE_H */ 53 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/hid/IOHIDLib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2008 Apple Computer, Inc. All Rights Reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | #ifndef _IOKIT_HID_IOHIDLIB_H_ 25 | #define _IOKIT_HID_IOHIDLIB_H_ 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | #endif /* _IOKIT_HID_IOHIDLIB_H_ */ -------------------------------------------------------------------------------- /include/plist/Array.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Array.h 3 | * Array node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST__ARRAY_H 23 | #define PLIST__ARRAY_H 24 | 25 | #include 26 | #include 27 | 28 | namespace PList 29 | { 30 | 31 | class Array : public Structure 32 | { 33 | public : 34 | Array(Node* parent = NULL); 35 | Array(plist_t node, Node* parent = NULL); 36 | Array(Array& a); 37 | Array& operator=(Array& a); 38 | virtual ~Array(); 39 | 40 | Node* Clone(); 41 | 42 | Node* operator[](unsigned int index); 43 | void Append(Node* node); 44 | void Insert(Node* node, unsigned int pos); 45 | void Remove(Node* node); 46 | void Remove(unsigned int pos); 47 | unsigned int GetNodeIndex(Node* node); 48 | 49 | private : 50 | std::vector _array; 51 | }; 52 | 53 | }; 54 | 55 | #endif // PLIST__ARRAY_H 56 | -------------------------------------------------------------------------------- /src/bsdprocesslist.c: -------------------------------------------------------------------------------- 1 | #include "bsdprocesslist.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | int GetBSDProcessList(kinfo_proc **procList, size_t *procCount) /*{{{*/ 15 | { 16 | int err; 17 | kinfo_proc* result; 18 | bool done; 19 | static const int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL, 0 }; 20 | size_t length; 21 | 22 | assert(procList != NULL); 23 | assert(*procList == NULL); 24 | assert(procCount != NULL); 25 | 26 | *procCount = 0; 27 | 28 | result = NULL; 29 | done = false; 30 | do { 31 | assert(result == NULL); 32 | 33 | length = 0; 34 | err = sysctl( (int *) name, (sizeof(name) / sizeof(*name)) - 1, NULL, &length, NULL, 0); 35 | if (err == -1) { 36 | err = errno; 37 | } 38 | 39 | if (err == 0) { 40 | result = (kinfo_proc*)malloc(length); 41 | if (result == NULL) { 42 | err = ENOMEM; 43 | } 44 | } 45 | 46 | if (err == 0) { 47 | err = sysctl( (int *) name, (sizeof(name) / sizeof(*name)) - 1, result, &length, NULL, 0); 48 | if (err == -1) { 49 | err = errno; 50 | } 51 | if (err == 0) { 52 | done = true; 53 | } else if (err == ENOMEM) { 54 | assert(result != NULL); 55 | free(result); 56 | result = NULL; 57 | err = 0; 58 | } 59 | } 60 | } while (err == 0 && ! done); 61 | 62 | if (err != 0 && result != NULL) { 63 | free(result); 64 | result = NULL; 65 | } 66 | *procList = result; 67 | if (err == 0) { 68 | *procCount = length / sizeof(kinfo_proc); 69 | } 70 | 71 | assert( (err == 0) == (*procList != NULL) ); 72 | 73 | return err; 74 | } /*}}}*/ 75 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOBDBlockStorageDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2009 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOBDBlockStorageDevice 26 | * @abstract 27 | * This header contains the IOBDBlockStorageDevice class definition. 28 | */ 29 | 30 | #ifndef _IOBDBLOCKSTORAGEDEVICE_H 31 | #define _IOBDBLOCKSTORAGEDEVICE_H 32 | 33 | #include 34 | 35 | /*! 36 | * @defined kIOBDBlockStorageDeviceClass 37 | * @abstract 38 | * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. 39 | * @discussion 40 | * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. 41 | */ 42 | 43 | #define kIOBDBlockStorageDeviceClass "IOBDBlockStorageDevice" 44 | 45 | #endif /* !_IOBDBLOCKSTORAGEDEVICE_H */ 46 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOCDBlockStorageDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2009 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOCDBlockStorageDevice 26 | * @abstract 27 | * This header contains the IOCDBlockStorageDevice class definition. 28 | */ 29 | 30 | #ifndef _IOCDBLOCKSTORAGEDEVICE_H 31 | #define _IOCDBLOCKSTORAGEDEVICE_H 32 | 33 | #include 34 | 35 | /*! 36 | * @defined kIOCDBlockStorageDeviceClass 37 | * @abstract 38 | * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. 39 | * @discussion 40 | * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. 41 | */ 42 | 43 | #define kIOCDBlockStorageDeviceClass "IOCDBlockStorageDevice" 44 | 45 | #endif /* !_IOCDBLOCKSTORAGEDEVICE_H */ 46 | -------------------------------------------------------------------------------- /kernel/ios/localize.m: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | 4 | #include "localize.h" 5 | 6 | NSDictionary* get_master_language_table() 7 | { 8 | static NSDictionary* language_table = nil; 9 | if(language_table) 10 | return language_table; 11 | 12 | unsigned long languages_size; 13 | void* languages_data = getsectdata("__DATA", "languages", &languages_size); 14 | if(!languages_data) 15 | return nil; 16 | 17 | NSError* error = nil; 18 | language_table = [NSPropertyListSerialization propertyListWithData:[NSData dataWithBytesNoCopy:languages_data length:languages_size freeWhenDone:NO] options:kCFPropertyListImmutable format:NULL error:&error]; 19 | return language_table; 20 | } 21 | 22 | NSDictionary* get_language_table() 23 | { 24 | static NSDictionary* language_table = nil; 25 | if(language_table) 26 | return language_table; 27 | 28 | @try 29 | { 30 | language_table = [get_master_language_table() objectForKey:[[[NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/.GlobalPreferences.plist"] objectForKey:@"AppleLanguages"] objectAtIndex:0]]; 31 | } @catch(NSException* e) 32 | { 33 | language_table = nil; 34 | return nil; 35 | } 36 | 37 | return language_table; 38 | } 39 | 40 | CFStringRef localize(const char* str) 41 | { 42 | NSDictionary* language_table = get_language_table(); 43 | if(!language_table) 44 | return (CFStringRef)[NSString stringWithUTF8String:str]; 45 | 46 | NSString* localized = [language_table objectForKey:[NSString stringWithUTF8String:str]]; 47 | if(localized) 48 | return (CFStringRef)localized; 49 | 50 | return (CFStringRef)[NSString stringWithUTF8String:str]; 51 | } 52 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IODVDBlockStorageDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2009 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IODVDBlockStorageDevice 26 | * @abstract 27 | * This header contains the IODVDBlockStorageDevice class definition. 28 | */ 29 | 30 | #ifndef _IODVDBLOCKSTORAGEDEVICE_H 31 | #define _IODVDBLOCKSTORAGEDEVICE_H 32 | 33 | #include 34 | 35 | /*! 36 | * @defined kIODVDBlockStorageDeviceClass 37 | * @abstract 38 | * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. 39 | * @discussion 40 | * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. 41 | */ 42 | 43 | #define kIODVDBlockStorageDeviceClass "IODVDBlockStorageDevice" 44 | 45 | #endif /* !_IODVDBLOCKSTORAGEDEVICE_H */ 46 | -------------------------------------------------------------------------------- /kernel/Makefile: -------------------------------------------------------------------------------- 1 | NAME := $(shell uname) 2 | 3 | ifeq ($(NAME),Darwin) 4 | CC=clang 5 | LD=clang 6 | else 7 | CC=gcc 8 | LD=gcc 9 | endif 10 | 11 | SRCS = generate_confuse_amfi_dylib.c 12 | OBJS = $(SRCS:.c=.o) 13 | ifeq ($(NAME),Darwin) 14 | CFLAGS = -O3 -Wall -mmacosx-version-min=10.4 15 | LDFLAGS = -mmacosx-version-min=10.4 16 | else 17 | CFLAGS = -O3 -Wall 18 | LDFLAGS = 19 | endif 20 | 21 | .PHONY: package 22 | 23 | ifeq ($(NAME),Darwin) 24 | all: amfi.dylib extras.tar evasi0n packagelist.tar.lzma 25 | 26 | generate_confuse_amfi_dylib: $(OBJS) 27 | $(LD) $(LDFLAGS) $(OBJS) -o $@ 28 | 29 | amfi.dylib: generate_confuse_amfi_dylib 30 | ./generate_confuse_amfi_dylib $@ 31 | 32 | extras.tar: ios/obj/exception extras/com.planetbeing.exception.plist extras/dirhelper 33 | cd extras; make 34 | cp extras/extras.tar extras.tar 35 | 36 | evasi0n: ios/kiki.m ios/kiki-offsets.m ios/patchfinder.c ios/exploit.c ios/findmemmove.c ios/nvram.c ios/sb_evaluate_trampoline.s ios/sb_evaluate_hook.s ios/zone_fix.m ios/tfp.m ios/untar.c ios/call_function.s ios/jailbreakinstaller.m ios/framebuffer.c 37 | cd ios; make 38 | cp ios/obj/evasi0n evasi0n 39 | 40 | ios/obj/exception: ios/exception.m 41 | cd ios; make 42 | 43 | packagelist.tar.lzma: ../kiki/ddi/packagelist.tar 44 | cp $< . 45 | lzma -9 `basename $<` 46 | printf "%016llx\n" `stat -f %z $<` | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/0000: \8\7\6\5\4\3\2\1/' | xxd -r | dd of=$@ seek=5 bs=1 conv=notrunc 47 | 48 | endif 49 | 50 | clean: 51 | ifeq ($(NAME),Darwin) 52 | rm -f $(OBJS) 53 | rm -f generate_confuse_amfi_dylib 54 | rm -f amfi.dylib 55 | rm -f extras.tar 56 | rm -f evasi0n 57 | rm -f packagelist.tar.lzma 58 | cd extras; make clean 59 | cd ios; make clean 60 | endif 61 | -------------------------------------------------------------------------------- /untether/scripts/LaunchDaemons.hpp: -------------------------------------------------------------------------------- 1 | /* Cydia Evasi0n - Powerful Code Insertion Platform 2 | * Copyright (C) 2008-2011 Jay Freeman (saurik) 3 | */ 4 | 5 | /* GNU Lesser General Public License, Version 3 {{{ */ 6 | /* 7 | * Evasi0n is free software: you can redistribute it and/or modify it under 8 | * the terms of the GNU Lesser General Public License as published by the 9 | * Free Software Foundation, either version 3 of the License, or (at your 10 | * option) any later version. 11 | * 12 | * Evasi0n is distributed in the hope that it will be useful, but WITHOUT 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 15 | * License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with Evasi0n. If not, see . 19 | **/ 20 | /* }}} */ 21 | 22 | #ifndef SUBSTRATE_LAUNCHDAEMONS_HPP 23 | #define SUBSTRATE_LAUNCHDAEMONS_HPP 24 | 25 | #define Evasi0nLaunchDaemons_ "/System/Library/LaunchDaemons" 26 | #define Evasi0nLaunchConfig_ "/etc/launchd.conf" 27 | #define Evasi0nLaunchSocket_ "/var/evasi0n/sock" 28 | 29 | #define Evasi0nRemount_ "bsexec .. /sbin/mount -u -o rw,suid,dev /" 30 | #define Evasi0nSetEnv_ "setenv DYLD_INSERT_LIBRARIES /private/var/evasi0n/amfi.dylib" 31 | #define Evasi0nLoadAmfid_ "load /System/Library/LaunchDaemons/com.apple.MobileFileIntegrity.plist" 32 | #define Evasi0nLaunch_ "bsexec .. /private/var/evasi0n/evasi0n" 33 | #define Evasi0nUnsetEnv_ "unsetenv DYLD_INSERT_LIBRARIES" 34 | #define Evasi0nUnlinkLaunch_ "bsexec .. /bin/rm -f " Evasi0nLaunchSocket_ 35 | #define Evasi0nLinkLaunch_ "bsexec .. /bin/ln -f /var/tmp/launchd/sock " Evasi0nLaunchSocket_ 36 | 37 | #endif//SUBSTRATE_LAUNCHDAEMONS_HPP 38 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/graphics/IOGraphicsEngine.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | /* 23 | * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. 24 | * 25 | * HISTORY 26 | * 27 | * 10 Mar 99 sdouglas created. 28 | */ 29 | 30 | 31 | struct IOGraphicsEngineContext { 32 | IOSharedLockData contextLock; 33 | IOOptionBits state; 34 | void * owner; 35 | UInt32 version; 36 | IOByteCount structSize; 37 | UInt32 reserved[ 8 ]; 38 | }; 39 | #ifndef __cplusplus 40 | typedef volatile struct IOGraphicsEngineContext IOGraphicsEngineContext; 41 | #endif 42 | 43 | enum { 44 | // memory type for IOMapMemory 45 | kIOGraphicsEngineContext = 100 46 | }; 47 | 48 | enum { 49 | // version 50 | kIOGraphicsEngineContextVersion = 1 51 | }; 52 | -------------------------------------------------------------------------------- /include/plist/Structure.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Structure.h 3 | * Structure node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST__STRUCTURE_H 23 | #define PLIST__STRUCTURE_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace PList 30 | { 31 | 32 | class Structure : public Node 33 | { 34 | public : 35 | virtual ~Structure(); 36 | 37 | uint32_t GetSize(); 38 | 39 | std::string ToXml(); 40 | std::vector ToBin(); 41 | 42 | virtual void Remove(Node* node) = 0; 43 | 44 | static Structure* FromXml(const std::string& xml); 45 | static Structure* FromBin(const std::vector& bin); 46 | 47 | protected: 48 | Structure(Node* parent = NULL); 49 | Structure(plist_type type, Node* parent = NULL); 50 | void UpdateNodeParent(Node* node); 51 | 52 | private: 53 | Structure(Structure& s); 54 | Structure& operator=(const Structure& s); 55 | }; 56 | 57 | }; 58 | 59 | #endif // PLIST__STRUCTURE_H 60 | -------------------------------------------------------------------------------- /package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # this script will make a package for the current platform 4 | # .dmg for OSX 5 | # .zip for win32 6 | # .tar.bz2 for linux 7 | 8 | VER=`grep EVASI0N_VERSION_STRING src/version.h |cut -d " " -f 3 |sed 's/"//g'` 9 | PRODUCT=evasi0n 10 | 11 | case `uname` in 12 | Darwin*) 13 | PKGNAME=$PRODUCT-mac-$VER 14 | ;; 15 | Linux*) 16 | PKGNAME=$PRODUCT-linux-$VER 17 | ;; 18 | MINGW*) 19 | PKGNAME=$PRODUCT-win-$VER 20 | ;; 21 | *) 22 | PKGNAME=$PRODUCT-$VER 23 | ;; 24 | esac 25 | 26 | BUILDDIR=build/$PRODUCT/$PKGNAME 27 | COMMIT=`git rev-list HEAD | head -n1` 28 | WATERMARK=$1 29 | 30 | if ! test -d $BUILDDIR; then 31 | ./build.sh 32 | fi 33 | 34 | case `uname` in 35 | Darwin*) 36 | SRCDIR="$BUILDDIR" 37 | MNT="/tmp/dmgmnt" 38 | rm -rf ${MNT} 39 | rm -f $PKGNAME-$COMMIT-$WATERMARK.dmg 40 | rm -f temp.dmg 41 | cp res/gui/osx/Icon.icns ${SRCDIR}/.VolumeIcon.icns 42 | SetFile -c icnC "${SRCDIR}/.VolumeIcon.icns" 43 | SIZE=`du -sk $SRCDIR |cut -f 1` 44 | SIZE=`echo $SIZE+512 |bc` 45 | hdiutil create -srcfolder "${SRCDIR}" -volname "evasi0n ${VER}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}k temp.dmg 46 | mkdir -p ${MNT} 47 | hdiutil attach temp.dmg -mountpoint ${MNT} 48 | SetFile -a C ${MNT} 49 | hdiutil detach ${MNT} 50 | rm -rf ${MNT} 51 | hdiutil convert temp.dmg -format UDBZ -o $PKGNAME-$COMMIT-$WATERMARK.dmg 52 | rm -f temp.dmg 53 | ;; 54 | Linux*) 55 | rm -f $PKGNAME-$COMMIT-$WATERMARK.tar* 56 | tar cvf $PKGNAME-$COMMIT-$WATERMARK.tar --numeric-owner --owner=root --group=root -C build/$PRODUCT $PKGNAME 57 | lzma -9 $PKGNAME-$COMMIT-$WATERMARK.tar 58 | ;; 59 | MINGW*) 60 | rm -f $PKGNAME-$COMMIT-$WATERMARK.zip 61 | PD=`pwd` 62 | cd build/evasi0n 63 | 7z a -tzip -mx=9 -r $PD/$PKGNAME-$COMMIT-$WATERMARK.zip $PKGNAME 64 | cd ${PD} 65 | ;; 66 | esac 67 | -------------------------------------------------------------------------------- /src/backup.h: -------------------------------------------------------------------------------- 1 | /** 2 | * GreenPois0n Apparition - backup.h 3 | * Copyright (C) 2010 Chronic-Dev Team 4 | * Copyright (C) 2010 Joshua Hill 5 | * Copyright (C) 2012 Hanéne Samara 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | **/ 20 | 21 | #ifndef BACKUP_H_ 22 | #define BACKUP_H_ 23 | 24 | #include "backup_file.h" 25 | #include "mbdb.h" 26 | 27 | typedef struct backup_t { 28 | char* path; 29 | //mbdx_t* mbdx; 30 | mbdb_t* mbdb; 31 | /*plist_t info; 32 | plist_t status; 33 | plist_t manifest; 34 | backup_file_t** files; 35 | unsigned int count; 36 | unsigned char* udid; 37 | unsigned char* directory;*/ 38 | } backup_t; 39 | 40 | backup_t* backup_open(const char* directory, const char* udid); 41 | int backup_get_file_index(backup_t* backup, const char* domain, const char* path); 42 | char* backup_get_file_path(backup_t* backup, backup_file_t* bfile); 43 | backup_file_t* backup_get_file(backup_t* backup, const char* domain, const char* path); 44 | int backup_update_file(backup_t* backup, backup_file_t* bfile); 45 | int backup_remove_file(backup_t* backup, backup_file_t* bfile); 46 | void backup_free(backup_t* backup); 47 | 48 | int backup_write_mbdb(backup_t* backup); 49 | 50 | #endif /* BACKUP_H_ */ 51 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/video/IOVideoStreamDictionary.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: IOVideoStreamDictionary.h 3 | 4 | Contains: 5 | 6 | Copyright: © 2006-2010 by Apple Inc., all rights reserved. 7 | */ 8 | 9 | #if !defined(__IOVideoStreamDictionary_h__) 10 | #define __IOVideoStreamDictionary_h__ 11 | 12 | // System Includes 13 | #include 14 | 15 | class OSArray; 16 | class OSDictionary; 17 | 18 | class IOVideoStreamDictionary 19 | { 20 | 21 | // Construction/Destruction 22 | public: 23 | static OSDictionary* create(UInt32 streamID, UInt32 startingDeviceChannelNumber, const OSDictionary* currentFormat, OSArray* availableFormats = NULL); 24 | 25 | // Attributes 26 | public: 27 | static UInt32 getStreamID(const OSDictionary* dictionary); 28 | static void setStreamID(OSDictionary* dictionary, UInt32 streamID); 29 | 30 | static UInt32 getStartingDeviceChannelNumber(const OSDictionary* dictionary); 31 | static void setStartingDeviceChannelNumber(OSDictionary* dictionary, UInt32 startingDeviceChannelNumber); 32 | 33 | static IOOptionBits getBufferMappingOptions(const OSDictionary* dictionary); 34 | static void setBufferMappingOptions(OSDictionary* dictionary, IOOptionBits bufferMappingOptions); 35 | 36 | static bool getCurrentFormat(const OSDictionary* dictionary, IOVideoStreamDescription& format); 37 | static void setCurrentFormat(OSDictionary* dictionary, const IOVideoStreamDescription& format); 38 | static OSDictionary* copyCurrentFormatDictionary(const OSDictionary* dictionary); 39 | static void setCurrentFormatDictionary(OSDictionary* dictionary, const OSDictionary* format); 40 | 41 | static OSArray* copyAvailableFormats(const OSDictionary* dictionary); 42 | static void setAvailableFormats(OSDictionary* dictionary, OSArray* availableFormats); 43 | 44 | static void printDictionary(const OSDictionary* dictionary); 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/IOBSD.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | #ifndef _IOBSD_H 29 | #define _IOBSD_H 30 | 31 | /* 32 | * bsd-related registry properties 33 | */ 34 | 35 | #define kIOBSDNameKey "BSD Name" // (an OSString) 36 | #define kIOBSDNamesKey "BSD Names" // (an OSDictionary of OSString's, for links) 37 | #define kIOBSDMajorKey "BSD Major" // (an OSNumber) 38 | #define kIOBSDMinorKey "BSD Minor" // (an OSNumber) 39 | #define kIOBSDUnitKey "BSD Unit" // (an OSNumber) 40 | 41 | #endif /* !_IOBSD_H */ 42 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOBlockStorageDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2011 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOBlockStorageDevice 26 | * @abstract 27 | * This header contains the IOBlockStorageDevice class definition. 28 | */ 29 | 30 | #ifndef _IOBLOCKSTORAGEDEVICE_H 31 | #define _IOBLOCKSTORAGEDEVICE_H 32 | 33 | #include 34 | #include 35 | 36 | /*! 37 | * @defined kIOBlockStorageDeviceClass 38 | * @abstract 39 | * The name of the IOBlockStorageDevice class. 40 | */ 41 | 42 | #define kIOBlockStorageDeviceClass "IOBlockStorageDevice" 43 | 44 | /*! 45 | * @defined kIOBlockStorageDeviceWriteCacheStateKey 46 | * @abstract 47 | * The name of the property used to get or set the write cache state of the 48 | * block storage device. 49 | */ 50 | #define kIOBlockStorageDeviceWriteCacheStateKey "WriteCacheState" 51 | 52 | #endif /* !_IOBLOCKSTORAGEDEVICE_H */ 53 | -------------------------------------------------------------------------------- /kernel/ios/deadman.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "wdt.h" 6 | 7 | #define RB_AUTOBOOT 0 8 | int reboot(int); 9 | 10 | static pthread_t DeadmanThread = NULL; 11 | static int DeadmanActive = 0; 12 | static int DeadmanTimeRemaining = 0; 13 | static pthread_mutex_t DeadmanMutex = PTHREAD_MUTEX_INITIALIZER; 14 | 15 | #include "kiki-log.h" 16 | 17 | static void deadman_function(void* arg) 18 | { 19 | while(1) 20 | { 21 | sleep(1); 22 | pthread_mutex_lock(&DeadmanMutex); 23 | if(!DeadmanActive) 24 | { 25 | pthread_mutex_unlock(&DeadmanMutex); 26 | continue; 27 | } 28 | 29 | --DeadmanTimeRemaining; 30 | if(DeadmanTimeRemaining <= 0) 31 | { 32 | pthread_mutex_unlock(&DeadmanMutex); 33 | wdt_off(); 34 | reboot(RB_AUTOBOOT); 35 | return; 36 | } 37 | pthread_mutex_unlock(&DeadmanMutex); 38 | } 39 | } 40 | 41 | void deadman_activate(int timeout) 42 | { 43 | pthread_mutex_lock(&DeadmanMutex); 44 | 45 | if(!DeadmanActive) 46 | { 47 | DeadmanTimeRemaining = timeout; 48 | wdt_reset(timeout + 1); 49 | } 50 | 51 | ++DeadmanActive; 52 | 53 | if(!DeadmanThread) 54 | pthread_create(&DeadmanThread, NULL, (void*)deadman_function, NULL); 55 | 56 | pthread_mutex_unlock(&DeadmanMutex); 57 | } 58 | 59 | void deadman_reset(int timeout) 60 | { 61 | pthread_mutex_lock(&DeadmanMutex); 62 | DeadmanTimeRemaining = timeout; 63 | wdt_reset(timeout + 1); 64 | pthread_mutex_unlock(&DeadmanMutex); 65 | } 66 | 67 | void deadman_deactivate() 68 | { 69 | pthread_mutex_lock(&DeadmanMutex); 70 | if(DeadmanActive > 0) 71 | { 72 | --DeadmanActive; 73 | } 74 | if(DeadmanActive <= 0) 75 | { 76 | DeadmanActive = 0; 77 | wdt_off(); 78 | } 79 | pthread_mutex_unlock(&DeadmanMutex); 80 | } 81 | -------------------------------------------------------------------------------- /include/plist/Dictionary.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Dictionary.h 3 | * Dictionary node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST__DICTIONARY_H 23 | #define PLIST__DICTIONARY_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace PList 30 | { 31 | 32 | class Dictionary : public Structure 33 | { 34 | public : 35 | Dictionary(Node* parent = NULL); 36 | Dictionary(plist_t node, Node* parent = NULL); 37 | Dictionary(Dictionary& d); 38 | Dictionary& operator=(Dictionary& d); 39 | virtual ~Dictionary(); 40 | 41 | Node* Clone(); 42 | 43 | typedef std::map::iterator iterator; 44 | 45 | Node* operator[](const std::string& key); 46 | iterator Begin(); 47 | iterator End(); 48 | iterator Find(const std::string& key); 49 | iterator Insert(const std::string& key, Node* node); 50 | void Remove(Node* node); 51 | void Remove(const std::string& key); 52 | std::string GetNodeKey(Node* key); 53 | 54 | private : 55 | std::map _map; 56 | 57 | 58 | }; 59 | 60 | }; 61 | 62 | #endif // PLIST__DICTIONARY_H 63 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/pwr_mgt/IOPMLibDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | 29 | 30 | #define kPMSetAggressiveness 0 31 | #define kPMGetAggressiveness 1 32 | #define kPMSleepSystem 2 33 | #define kPMAllowPowerChange 3 34 | #define kPMCancelPowerChange 4 35 | #define kPMShutdownSystem 5 36 | #define kPMRestartSystem 6 37 | #define kPMSleepSystemOptions 7 38 | #define kPMSetMaintenanceWakeCalendar 8 39 | #define kPMSetUserAssertionLevels 9 40 | 41 | #define kNumPMMethods 10 42 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/IOCFUnserialize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* IOUnserialize.h created by rsulack on Mon 23-Nov-1998 */ 24 | /* IOCFUnserialize.h creates CF collections Mon 30-Aug-1999 */ 25 | 26 | #ifndef __IOKIT_IOCFUNSERIALIZE_H 27 | #define __IOKIT_IOCFUNSERIALIZE_H 28 | 29 | #include 30 | #include 31 | 32 | #if defined(__cplusplus) 33 | extern "C" { 34 | #endif 35 | 36 | // on success IOCFUnserialize sets errorString to 0 and returns 37 | // the unserialized object. 38 | 39 | // on failure IOCFUnserialize sets errorString to a CFString object 40 | // containing a error message suitable for logging and returns 0 41 | 42 | CFTypeRef 43 | IOCFUnserialize(const char *buffer, 44 | CFAllocatorRef allocator, 45 | CFOptionFlags options, 46 | CFStringRef *errorString); 47 | 48 | #if defined(__cplusplus) 49 | } 50 | #endif 51 | 52 | #endif /* __IOKIT_IOCFUNSERIALIZE_H */ 53 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOCDPartitionScheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2009 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOCDPartitionScheme 26 | * @abstract 27 | * This header contains the IOCDPartitionScheme class definition. 28 | */ 29 | 30 | #ifndef _IOCDPARTITIONSCHEME_H 31 | #define _IOCDPARTITIONSCHEME_H 32 | 33 | #include 34 | 35 | /*! 36 | * @defined kIOCDPartitionSchemeClass 37 | * @abstract 38 | * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. 39 | * @discussion 40 | * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. 41 | */ 42 | 43 | #define kIOCDPartitionSchemeClass "IOCDPartitionScheme" 44 | 45 | /*! 46 | * @defined kIOMediaSessionIDKey 47 | * @abstract 48 | * kIOMediaSessionIDKey is property of IOMedia objects. It has an OSNumber 49 | * value. 50 | * @discussion 51 | * The kIOMediaSessionIDKey property is placed into each IOMedia instance 52 | * created by the CD partition scheme. It identifies the session number 53 | * the track was recorded on. 54 | */ 55 | 56 | #define kIOMediaSessionIDKey "Session ID" 57 | 58 | #endif /* !_IOCDPARTITIONSCHEME_H */ 59 | -------------------------------------------------------------------------------- /include/libimobiledevice/screenshotr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file libimobiledevice/screenshotr.h 3 | * @brief Retrieve a screenshot from device. 4 | * @note Requires a mounted developer image. 5 | * \internal 6 | * 7 | * Copyright (c) 2010 Nikias Bassen All Rights Reserved. 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | */ 23 | 24 | #ifndef ISCREENSHOTR_H 25 | #define ISCREENSHOTR_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #include 32 | 33 | /** @name Error Codes */ 34 | /*@{*/ 35 | #define SCREENSHOTR_E_SUCCESS 0 36 | #define SCREENSHOTR_E_INVALID_ARG -1 37 | #define SCREENSHOTR_E_PLIST_ERROR -2 38 | #define SCREENSHOTR_E_MUX_ERROR -3 39 | #define SCREENSHOTR_E_BAD_VERSION -4 40 | 41 | #define SCREENSHOTR_E_UNKNOWN_ERROR -256 42 | /*@}*/ 43 | 44 | /** Represents an error code. */ 45 | typedef int16_t screenshotr_error_t; 46 | 47 | typedef struct screenshotr_client_private screenshotr_client_private; 48 | typedef screenshotr_client_private *screenshotr_client_t; /**< The client handle. */ 49 | 50 | screenshotr_error_t screenshotr_client_new(idevice_t device, uint16_t port, screenshotr_client_t * client); 51 | screenshotr_error_t screenshotr_client_free(screenshotr_client_t client); 52 | screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /include/libimobiledevice/file_relay.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file libimobiledevice/file_relay.h 3 | * @brief Retrieve compressed CPIO archives. 4 | * \internal 5 | * 6 | * Copyright (c) 2010 Nikias Bassen All Rights Reserved. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef IFILE_RELAY_H 24 | #define IFILE_RELAY_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #include 31 | 32 | /** @name Error Codes */ 33 | /*@{*/ 34 | #define FILE_RELAY_E_SUCCESS 0 35 | #define FILE_RELAY_E_INVALID_ARG -1 36 | #define FILE_RELAY_E_PLIST_ERROR -2 37 | #define FILE_RELAY_E_MUX_ERROR -3 38 | #define FILE_RELAY_E_INVALID_SOURCE -4 39 | #define FILE_RELAY_E_STAGING_EMPTY -5 40 | 41 | #define FILE_RELAY_E_UNKNOWN_ERROR -256 42 | /*@}*/ 43 | 44 | /** Represents an error code. */ 45 | typedef int16_t file_relay_error_t; 46 | 47 | typedef struct file_relay_client_private file_relay_client_private; 48 | typedef file_relay_client_private *file_relay_client_t; /**< The client handle. */ 49 | 50 | file_relay_error_t file_relay_client_new(idevice_t device, uint16_t port, file_relay_client_t *client); 51 | file_relay_error_t file_relay_client_free(file_relay_client_t client); 52 | 53 | file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | evasi0n 1.5.3 (c) 2013 @evad3rs 3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | 5 | http://evasi0n.com/ 6 | 7 | 8 | DESCRIPTION: 9 | 10 | - evasi0n 1.5.3 is an untethered jailbreak for all iPhone, iPod touch, iPad and iPad mini models running iOS 6.0 through 6.1 11 | 12 | 13 | SYSTEM REQUIREMENTS: 14 | 15 | - MacOSX 10.5/10.6/10.7/10.8 16 | - Windows (XP minimum) 17 | - Linux x86/x86_64 (Kernel >= 2.6.24, libgtk+-2.0 >= 2.24.13) 18 | 19 | 20 | SUPPORTED FIRMWARES: 21 | 22 | - iOS 6.0, 6.0.1, 6.0.2, 6.1, 6.1.1, and 6.1.2. 23 | 24 | 25 | INSTRUCTIONS: 26 | 27 | - Backup your device using iTunes (or iCloud) before using evasi0n. If something breaks, you'll always be able to recover your data. 28 | - Those who use backup passwords in iTunes must disable them for now. After doing so, iTunes makes a brand new backup. Please wait for that backup to complete before proceeding! Feel free to re-enable your backup password after jailbreaking. 29 | - Please disable the lock passcode of your iOS device before using evasi0n. It can cause issues. 30 | - Launch evasi0n, plug in your device, and click "Jailbreak". Just sit back and observe its progress. Watch for any steps you may be asked to perform. 31 | - Avoid all iOS and iTunes related tasks until evasi0n is complete. Why not just enjoy a brief break from the computer to stretch your legs? 32 | - If the process gets stuck somewhere, it's safe to restart the program, reboot the device (if necessary by holding down Power and Home until it shuts down), and rerun the process. 33 | 34 | 35 | FAQ: 36 | 37 | If you have any questions regarding the jailbreak process or jailbreaking in general 38 | please go to the Jailbreak QA dedicated website: http://www.jailbreakqa.com 39 | or see their help page for evasi0n: http://www.jailbreakqa.com/pages/evasi0n-help 40 | or try /r/jailbreak on Reddit: http://reddit.com/r/jailbreak 41 | 42 | 43 | CREDITS: 44 | 45 | evasi0n is a production of @evad3rs. http://evad3rs.com 46 | 47 | 48 | THANKS TO: 49 | 50 | - @phoenixdev for his research 51 | - @Surenix for evad3rs and evasi0n designs 52 | - Hanene Samara for her work on evasi0n GUI 53 | - @chronicdevteam and @iphone_dev for their support 54 | - Kiki the cat for the inspiration 55 | 56 | -------------------------------------------------------------------------------- /kiki/ios/nvram.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | void nvram_set(const char* name, const char* value) 6 | { 7 | io_registry_entry_t options = IORegistryEntryFromPath(kIOMasterPortDefault, "IODeviceTree:/options"); 8 | if(!options) 9 | return; 10 | 11 | CFStringRef cf_name = CFStringCreateWithCString(kCFAllocatorDefault, name, kCFStringEncodingUTF8); 12 | CFStringRef cf_value = CFStringCreateWithCString(kCFAllocatorDefault, value, kCFStringEncodingUTF8); 13 | 14 | IORegistryEntrySetCFProperty(options, cf_name, cf_value); 15 | 16 | CFRelease(cf_name); 17 | CFRelease(cf_value); 18 | 19 | IOObjectRelease(options); 20 | } 21 | 22 | const char* nvram_get(const char* name) 23 | { 24 | static char buffer[1024]; 25 | io_registry_entry_t options = IORegistryEntryFromPath(kIOMasterPortDefault, "IODeviceTree:/options"); 26 | if(!options) 27 | return NULL; 28 | 29 | CFStringRef cf_name = CFStringCreateWithCString(kCFAllocatorDefault, name, kCFStringEncodingUTF8); 30 | 31 | CFTypeRef cf_value = IORegistryEntryCreateCFProperty(options, cf_name, kCFAllocatorDefault, 0); 32 | if(!cf_value) 33 | { 34 | CFRelease(cf_name); 35 | IOObjectRelease(options); 36 | return NULL; 37 | } 38 | 39 | CFStringRef cf_value_str = CFCopyDescription(cf_value); 40 | if(!cf_value_str) 41 | { 42 | CFRelease(cf_value); 43 | CFRelease(cf_name); 44 | IOObjectRelease(options); 45 | return NULL; 46 | } 47 | 48 | if(!CFStringGetCString(cf_value_str, buffer, sizeof(buffer), kCFStringEncodingUTF8)) 49 | { 50 | CFRelease(cf_value_str); 51 | CFRelease(cf_value); 52 | CFRelease(cf_name); 53 | IOObjectRelease(options); 54 | return NULL; 55 | } 56 | 57 | CFRelease(cf_value_str); 58 | CFRelease(cf_value); 59 | CFRelease(cf_name); 60 | 61 | IOObjectRelease(options); 62 | 63 | return buffer; 64 | } 65 | 66 | void nvram_unset(const char* name) 67 | { 68 | nvram_set(kIONVRAMDeletePropertyKey, name); 69 | } 70 | 71 | void nvram_sync(const char* name) 72 | { 73 | nvram_set(kIONVRAMSyncNowPropertyKey, name); 74 | } 75 | -------------------------------------------------------------------------------- /kiki/ios/headers/sys/sys_domain.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | 29 | 30 | #ifndef _SYSTEM_DOMAIN_H_ 31 | #define _SYSTEM_DOMAIN_H_ 32 | 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | 39 | /* Kernel Events Protocol */ 40 | #define SYSPROTO_EVENT 1 /* kernel events protocol */ 41 | 42 | /* Kernel Control Protocol */ 43 | #define SYSPROTO_CONTROL 2 /* kernel control protocol */ 44 | #define AF_SYS_CONTROL 2 /* corresponding sub address type */ 45 | 46 | /* System family socket address */ 47 | struct sockaddr_sys 48 | { 49 | u_char ss_len; /* sizeof(struct sockaddr_sys) */ 50 | u_char ss_family; /* AF_SYSTEM */ 51 | u_int16_t ss_sysaddr; /* protocol address in AF_SYSTEM */ 52 | u_int32_t ss_reserved[7]; /* reserved to the protocol use */ 53 | }; 54 | 55 | 56 | 57 | #endif /* _SYSTEM_DOMAIN_H_ */ 58 | 59 | 60 | -------------------------------------------------------------------------------- /include/openssl/comp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef HEADER_COMP_H 3 | #define HEADER_COMP_H 4 | 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | typedef struct comp_ctx_st COMP_CTX; 12 | 13 | typedef struct comp_method_st 14 | { 15 | int type; /* NID for compression library */ 16 | const char *name; /* A text string to identify the library */ 17 | int (*init)(COMP_CTX *ctx); 18 | void (*finish)(COMP_CTX *ctx); 19 | int (*compress)(COMP_CTX *ctx, 20 | unsigned char *out, unsigned int olen, 21 | unsigned char *in, unsigned int ilen); 22 | int (*expand)(COMP_CTX *ctx, 23 | unsigned char *out, unsigned int olen, 24 | unsigned char *in, unsigned int ilen); 25 | /* The following two do NOTHING, but are kept for backward compatibility */ 26 | long (*ctrl)(void); 27 | long (*callback_ctrl)(void); 28 | } COMP_METHOD; 29 | 30 | struct comp_ctx_st 31 | { 32 | COMP_METHOD *meth; 33 | unsigned long compress_in; 34 | unsigned long compress_out; 35 | unsigned long expand_in; 36 | unsigned long expand_out; 37 | 38 | CRYPTO_EX_DATA ex_data; 39 | }; 40 | 41 | 42 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 43 | void COMP_CTX_free(COMP_CTX *ctx); 44 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 45 | unsigned char *in, int ilen); 46 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, 47 | unsigned char *in, int ilen); 48 | COMP_METHOD *COMP_rle(void ); 49 | COMP_METHOD *COMP_zlib(void ); 50 | void COMP_zlib_cleanup(void); 51 | 52 | #ifdef HEADER_BIO_H 53 | #ifdef ZLIB 54 | BIO_METHOD *BIO_f_zlib(void); 55 | #endif 56 | #endif 57 | 58 | /* BEGIN ERROR CODES */ 59 | /* The following lines are auto generated by the script mkerr.pl. Any changes 60 | * made after this point may be overwritten when the script is next run. 61 | */ 62 | void ERR_load_COMP_strings(void); 63 | 64 | /* Error codes for the COMP functions. */ 65 | 66 | /* Function codes. */ 67 | #define COMP_F_BIO_ZLIB_FLUSH 99 68 | #define COMP_F_BIO_ZLIB_NEW 100 69 | #define COMP_F_BIO_ZLIB_READ 101 70 | #define COMP_F_BIO_ZLIB_WRITE 102 71 | 72 | /* Reason codes. */ 73 | #define COMP_R_ZLIB_DEFLATE_ERROR 99 74 | #define COMP_R_ZLIB_INFLATE_ERROR 100 75 | #define COMP_R_ZLIB_NOT_SUPPORTED 101 76 | 77 | #ifdef __cplusplus 78 | } 79 | #endif 80 | #endif 81 | -------------------------------------------------------------------------------- /include/libimobiledevice/misagent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file libimobiledevice/misagent.h 3 | * @brief Manage provisioning profiles. 4 | * \internal 5 | * 6 | * Copyright (c) 2012 Nikias Bassen, All Rights Reserved. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef MISAGENT_H 24 | #define MISAGENT_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #include 31 | 32 | /** @name Error Codes */ 33 | /*@{*/ 34 | #define MISAGENT_E_SUCCESS 0 35 | #define MISAGENT_E_INVALID_ARG -1 36 | #define MISAGENT_E_PLIST_ERROR -2 37 | #define MISAGENT_E_CONN_FAILED -3 38 | #define MISAGENT_E_REQUEST_FAILED -4 39 | 40 | #define MISAGENT_E_UNKNOWN_ERROR -256 41 | /*@}*/ 42 | 43 | /** Represents an error code. */ 44 | typedef int16_t misagent_error_t; 45 | 46 | typedef struct misagent_client_private misagent_client_private; 47 | typedef misagent_client_private *misagent_client_t; /**< The client handle. */ 48 | 49 | /* Interface */ 50 | misagent_error_t misagent_client_new(idevice_t device, uint16_t port, misagent_client_t *client); 51 | misagent_error_t misagent_client_free(misagent_client_t client); 52 | 53 | misagent_error_t misagent_install(misagent_client_t client, plist_t profile); 54 | misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles); 55 | misagent_error_t misagent_remove(misagent_client_t client, const char* profileID); 56 | int misagent_get_status_code(misagent_client_t client); 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOFireWireStorageCharacteristics.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2009 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | 25 | #ifndef _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ 26 | #define _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ 27 | 28 | // 29 | // Bridge Characteristics - Characteristics defined for FireWire bridges. 30 | // 31 | 32 | /*! 33 | @defined kIOPropertyBridgeCharacteristicsKey 34 | @discussion This key is used to define Bridge Characteristics for a particular 35 | devices's bridge chipset. It has an associated dictionary which lists the 36 | bridge characteristics. 37 | 38 | Requirement: Optional 39 | 40 | Example: 41 |
42 | @textblock
43 | 
44 | 	Bridge Characteristics
45 | 	
46 | 		Bridge Vendor Name
47 | 		Oxford Semiconductor
48 | 		Bridge Model Name
49 | 		FW911
50 | 		Bridge Revision Level
51 | 		3.7
52 | 	
53 | 
54 | @/textblock
55 | 
56 | */ 57 | 58 | #define kIOPropertyBridgeCharacteristicsKey "Bridge Characteristics" 59 | #define kIOPropertyBridgeVendorNameKey "Bridge Vendor Name" 60 | #define kIOPropertyBridgeModelNameKey "Bridge Model Name" 61 | #define kIOPropertyBridgeRevisionLevelKey "Bridge Revision Level" 62 | 63 | #endif /* _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ */ -------------------------------------------------------------------------------- /kiki/ios/sb_evaluate_hook.s: -------------------------------------------------------------------------------- 1 | .globl _sb_evaluate_hook 2 | .globl _sb_evaluate_hook_orig_addr 3 | .globl _sb_evaluate_hook_vn_getpath 4 | .globl _sb_evaluate_hook_memcmp 5 | .globl _sb_evaluate_hook_len 6 | 7 | .thumb_func _sb_evaluate_hook 8 | 9 | .thumb 10 | .code 16 11 | .align 2 12 | _sb_evaluate_hook: 13 | pop {r0, r1} 14 | push {r0-r4, lr} 15 | sub sp, #0x44 16 | ldr r4, [r3, #0x14] 17 | cmp r4, #0 18 | beq Lactually_eval 19 | ldr r3, _sb_evaluate_hook_vn_getpath 20 | mov r1, sp 21 | mov r0, #0x40 22 | add r2, sp, #0x40 23 | str r0, [r2] 24 | mov r0, r4 25 | blx r3 26 | cmp r0, #28 27 | beq Lenospc 28 | cmp r0, #0 29 | bne Lactually_eval 30 | Lenospc: 31 | # that error's okay... 32 | 33 | mov r0, sp 34 | adr r1, var_mobile 35 | mov r2, #19 ;# len(var_mobile) 36 | ldr r3, _sb_evaluate_hook_memcmp 37 | blx r3 38 | cmp r0, #0 39 | bne Lallow 40 | 41 | mov r0, sp 42 | adr r1, preferences_com_apple 43 | mov r2, #49 ;# len(preferences_com_apple) 44 | ldr r3, _sb_evaluate_hook_memcmp 45 | blx r3 46 | cmp r0, #0 47 | beq Lactually_eval 48 | 49 | mov r0, sp 50 | adr r1, preferences 51 | mov r2, #39 ;# len(preferences) 52 | ldr r3, _sb_evaluate_hook_memcmp 53 | blx r3 54 | cmp r0, #0 55 | bne Lactually_eval 56 | 57 | Lallow: 58 | # it's not in /var/mobile but we have a path, let it through 59 | add sp, #0x44 60 | pop {r0} 61 | mov r1, #0 62 | str r1, [r0] 63 | mov r1, #0x18 64 | str r1, [r0, #4] 65 | pop {r1-r4, pc} 66 | 67 | Lactually_eval: 68 | add sp, #0x44 69 | ldr r0, [sp, #5*4] 70 | mov lr, r0 71 | ldr r1, _sb_evaluate_hook_orig_addr 72 | mov r9, r1 73 | 74 | pop {r0-r4} 75 | add sp, #4 76 | 77 | b Ljump_back 78 | 79 | .align 2 80 | var_mobile: .ascii "/private/var/mobile" 81 | .align 2 82 | preferences_com_apple: .ascii "/private/var/mobile/Library/Preferences/com.apple" 83 | .align 2 84 | preferences: .ascii "/private/var/mobile/Library/Preferences" 85 | .align 2 86 | _sb_evaluate_hook_orig_addr: .word 0x0 87 | _sb_evaluate_hook_vn_getpath: .word 0x0 88 | _sb_evaluate_hook_memcmp: .word 0x0 89 | 90 | .align 2 91 | Ljump_back: 92 | 93 | .align 2 94 | _sb_evaluate_hook_end: 95 | 96 | .align 2 97 | _sb_evaluate_hook_len: .word (_sb_evaluate_hook_end - _sb_evaluate_hook) 98 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOBDMedia.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2009 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOBDMedia 26 | * @abstract 27 | * This header contains the IOBDMedia class definition. 28 | */ 29 | 30 | #ifndef _IOBDMEDIA_H 31 | #define _IOBDMEDIA_H 32 | 33 | /*! 34 | * @defined kIOBDMediaClass 35 | * @abstract 36 | * kIOBDMediaClass is the name of the IOBDMedia class. 37 | * @discussion 38 | * kIOBDMediaClass is the name of the IOBDMedia class. 39 | */ 40 | 41 | #define kIOBDMediaClass "IOBDMedia" 42 | 43 | /*! 44 | * @defined kIOBDMediaTypeKey 45 | * @abstract 46 | * kIOBDMediaTypeKey is a property of IOBDMedia objects. It has an OSString 47 | * value. 48 | * @discussion 49 | * The kIOBDMediaTypeKey property identifies the BD media type (BD-ROM, BD-R, 50 | * BD-RE, etc). See the kIOBDMediaType contants for possible values. 51 | */ 52 | 53 | #define kIOBDMediaTypeKey "Type" 54 | 55 | /*! 56 | * @defined kIOBDMediaTypeROM 57 | * The kIOBDMediaTypeKey constant for BD-ROM media. 58 | */ 59 | 60 | #define kIOBDMediaTypeROM "BD-ROM" 61 | 62 | /*! 63 | * @defined kIOBDMediaTypeR 64 | * The kIOBDMediaTypeKey constant for BD-R media. 65 | */ 66 | 67 | #define kIOBDMediaTypeR "BD-R" 68 | 69 | /*! 70 | * @defined kIOBDMediaTypeRE 71 | * The kIOBDMediaTypeKey constant for BD-RE media. 72 | */ 73 | 74 | #define kIOBDMediaTypeRE "BD-RE" 75 | 76 | #endif /* !_IOBDMEDIA_H */ 77 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/audio/IOAudioLib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* 24 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 25 | */ 26 | 27 | /*! 28 | * @header IOAudioLib 29 | * C interface to IOAudio functions 30 | */ 31 | 32 | #ifndef _IOAUDIOLIB_H 33 | #define _IOAUDIOLIB_H 34 | 35 | #include 36 | 37 | #if 0 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | /*! 44 | * @function IOAudioIsOutput 45 | * @abstract Determines if the audio stream is an output stream 46 | * @param service 47 | * @param out 48 | * @result kern_return_t 49 | */ 50 | kern_return_t IOAudioIsOutput(io_service_t service, int *out); 51 | 52 | /*! 53 | * @function IOAudioFlush 54 | * @abstract Indicate the position at which the audio stream can be stopped. 55 | * @param connect the audio stream 56 | * @param end the position 57 | * @result kern_return_t 58 | */ 59 | kern_return_t IOAudioFlush(io_connect_t connect, IOAudioStreamPosition *end); 60 | 61 | /*! 62 | * @function IOAudioSetErase 63 | * @abstract Set autoerase flag, returns old value 64 | * @param connect the audio stream 65 | * @param erase true to turn off, false otherwise 66 | * @param oldVal previous value 67 | * @result kern_return_t 68 | */ 69 | kern_return_t IOAudioSetErase(io_connect_t connect, int erase, int *oldVal); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif /* 0 */ 76 | 77 | #endif /* ! _IOAUDIOLIB_H */ 78 | -------------------------------------------------------------------------------- /src/hashmap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generic hashmap manipulation functions 3 | * 4 | * Originally by Elliot C Back - http://elliottback.com/wp/hashmap-implementation-in-c/ 5 | * 6 | * Modified by Pete Warden to fix a serious performance problem, support strings as keys 7 | * and removed thread synchronization - http://petewarden.typepad.com 8 | */ 9 | #ifndef __HASHMAP_H__ 10 | #define __HASHMAP_H__ 11 | 12 | #define MAP_MISSING -3 /* No such element */ 13 | #define MAP_FULL -2 /* Hashmap is full */ 14 | #define MAP_OMEM -1 /* Out of Memory */ 15 | #define MAP_OK 0 /* OK */ 16 | 17 | /* 18 | * any_t is a pointer. This allows you to put arbitrary structures in 19 | * the hashmap. 20 | */ 21 | typedef void *any_t; 22 | 23 | /* 24 | * PFany is a pointer to a function that can take two any_t arguments 25 | * and return an integer. Returns status code.. 26 | */ 27 | typedef int (*PFany)(any_t, any_t); 28 | 29 | /* 30 | * map_t is a pointer to an internally maintained data structure. 31 | * Clients of this package do not need to know how hashmaps are 32 | * represented. They see and manipulate only map_t's. 33 | */ 34 | typedef any_t map_t; 35 | 36 | /* 37 | * Return an empty hashmap. Returns NULL if empty. 38 | */ 39 | extern map_t hashmap_new(); 40 | 41 | /* 42 | * Iteratively call f with argument (item, data) for 43 | * each element data in the hashmap. The function must 44 | * return a map status code. If it returns anything other 45 | * than MAP_OK the traversal is terminated. f must 46 | * not reenter any hashmap functions, or deadlock may arise. 47 | */ 48 | extern int hashmap_iterate(map_t in, PFany f, any_t item); 49 | 50 | /* 51 | * Add an element to the hashmap. Return MAP_OK or MAP_OMEM. 52 | */ 53 | extern int hashmap_put(map_t in, const char* key, any_t value); 54 | 55 | /* 56 | * Get an element from the hashmap. Return MAP_OK or MAP_MISSING. 57 | */ 58 | extern int hashmap_get(map_t in, const char* key, any_t *arg); 59 | 60 | /* 61 | * Remove an element from the hashmap. Return MAP_OK or MAP_MISSING. 62 | */ 63 | extern int hashmap_remove(map_t in, const char* key); 64 | 65 | /* 66 | * Get any element. Return MAP_OK or MAP_MISSING. 67 | * remove - should the element be removed from the hashmap 68 | */ 69 | extern int hashmap_get_one(map_t in, any_t *arg, int remove); 70 | 71 | /* 72 | * Free the hashmap 73 | */ 74 | extern void hashmap_free(map_t in); 75 | 76 | /* 77 | * Get the current size of a hashmap 78 | */ 79 | extern int hashmap_length(map_t in); 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /src/iTunesKiller.cpp: -------------------------------------------------------------------------------- 1 | #if defined(__APPLE__) || defined(WIN32) 2 | #include 3 | #include "iTunesKiller.h" 4 | 5 | #include "debug.h" 6 | 7 | #if defined(__APPLE__) 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include "bsdprocesslist.h" 20 | 21 | #endif 22 | 23 | #if defined(WIN32) 24 | #include 25 | #include 26 | #define sleep(x) Sleep(x*1000) 27 | #endif 28 | 29 | static iTunesKiller* self; 30 | 31 | iTunesKiller::iTunesKiller(int* watchdog) 32 | : watchit(watchdog) 33 | { 34 | self = this; 35 | debug("ITK:init\n"); 36 | } 37 | 38 | void* iTunesKiller::Entry(void* data) 39 | { 40 | #if defined(WIN32) 41 | PROCESSENTRY32 pe; 42 | #endif 43 | while (*(this->watchit)) { 44 | #if defined(__APPLE__) 45 | size_t proc_count = 0; 46 | kinfo_proc *proc_list = NULL; 47 | GetBSDProcessList(&proc_list, &proc_count); 48 | size_t i; 49 | for (i = 0; i < proc_count; i++) { 50 | if ((!strcmp((&proc_list[i])->kp_proc.p_comm, "iTunesHelper")) || (!strcmp((&proc_list[i])->kp_proc.p_comm, "iTunes"))) { 51 | kill((&proc_list[i])->kp_proc.p_pid, SIGKILL); 52 | } 53 | } 54 | free(proc_list); 55 | #endif 56 | #if defined(WIN32) 57 | memset(&pe, 0, sizeof(pe)); 58 | pe.dwSize = sizeof(PROCESSENTRY32); 59 | 60 | HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); 61 | if (hSnapshot == INVALID_HANDLE_VALUE) { 62 | sleep(2); 63 | continue; 64 | } 65 | 66 | BOOL i = Process32First(hSnapshot, &pe); 67 | while (i) { 68 | if (!wcscmp(pe.szExeFile, L"iTunesHelper.exe") || !wcscmp(pe.szExeFile, L"iTunes.exe")) { 69 | HANDLE p = OpenProcess(PROCESS_ALL_ACCESS, 0, pe.th32ProcessID); 70 | if (p != INVALID_HANDLE_VALUE) { 71 | TerminateProcess(p, 0); 72 | CloseHandle(p); 73 | } 74 | } 75 | i = Process32Next(hSnapshot, &pe); 76 | } 77 | CloseHandle(hSnapshot); 78 | #endif 79 | sleep(2); 80 | } 81 | debug("ITK:Exiting.\n"); 82 | return 0; 83 | } 84 | 85 | static void* thread_func(void* data) 86 | { 87 | return self->Entry(data); 88 | } 89 | 90 | void iTunesKiller::Start(void) 91 | { 92 | #ifdef WIN32 93 | this->thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)thread_func, NULL, 0, NULL); 94 | #else 95 | pthread_create(&this->thread, NULL, thread_func, NULL); 96 | #endif 97 | } 98 | #endif 99 | -------------------------------------------------------------------------------- /include/openssl/modes.h: -------------------------------------------------------------------------------- 1 | /* ==================================================================== 2 | * Copyright (c) 2008 The OpenSSL Project. All rights reserved. 3 | * 4 | * Rights for redistribution and usage in source and binary 5 | * forms are granted according to the OpenSSL license. 6 | */ 7 | 8 | #include 9 | 10 | typedef void (*block128_f)(const unsigned char in[16], 11 | unsigned char out[16], 12 | const void *key); 13 | 14 | typedef void (*cbc128_f)(const unsigned char *in, unsigned char *out, 15 | size_t len, const void *key, 16 | unsigned char ivec[16], int enc); 17 | 18 | void CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out, 19 | size_t len, const void *key, 20 | unsigned char ivec[16], block128_f block); 21 | void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out, 22 | size_t len, const void *key, 23 | unsigned char ivec[16], block128_f block); 24 | 25 | void CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out, 26 | size_t len, const void *key, 27 | unsigned char ivec[16], unsigned char ecount_buf[16], 28 | unsigned int *num, block128_f block); 29 | 30 | void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out, 31 | size_t len, const void *key, 32 | unsigned char ivec[16], int *num, 33 | block128_f block); 34 | 35 | void CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, 36 | size_t len, const void *key, 37 | unsigned char ivec[16], int *num, 38 | int enc, block128_f block); 39 | void CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out, 40 | size_t length, const void *key, 41 | unsigned char ivec[16], int *num, 42 | int enc, block128_f block); 43 | void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out, 44 | size_t bits, const void *key, 45 | unsigned char ivec[16], int *num, 46 | int enc, block128_f block); 47 | 48 | size_t CRYPTO_cts128_encrypt_block(const unsigned char *in, unsigned char *out, 49 | size_t len, const void *key, 50 | unsigned char ivec[16], block128_f block); 51 | size_t CRYPTO_cts128_encrypt(const unsigned char *in, unsigned char *out, 52 | size_t len, const void *key, 53 | unsigned char ivec[16], cbc128_f cbc); 54 | size_t CRYPTO_cts128_decrypt_block(const unsigned char *in, unsigned char *out, 55 | size_t len, const void *key, 56 | unsigned char ivec[16], block128_f block); 57 | size_t CRYPTO_cts128_decrypt(const unsigned char *in, unsigned char *out, 58 | size_t len, const void *key, 59 | unsigned char ivec[16], cbc128_f cbc); 60 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOPartitionScheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2011 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOPartitionScheme 26 | * @abstract 27 | * This header contains the IOPartitionScheme class definition. 28 | */ 29 | 30 | #ifndef _IOPARTITIONSCHEME_H 31 | #define _IOPARTITIONSCHEME_H 32 | 33 | /*! 34 | * @defined kIOPartitionSchemeClass 35 | * @abstract 36 | * The name of the IOPartitionScheme class. 37 | * @discussion 38 | * kIOPartitionSchemeClass is the name of the IOPartitionScheme class. 39 | */ 40 | 41 | #define kIOPartitionSchemeClass "IOPartitionScheme" 42 | 43 | /*! 44 | * @defined kIOMediaLiveKey 45 | * @abstract 46 | * A property of IOMedia objects. 47 | * @discussion 48 | * The kIOMediaLiveKey property has an OSBoolean 49 | * value and is placed into an IOMedia instance 50 | * created via the partition scheme. It describes whether the 51 | * partition is live, that is, it is up-to-date with respect 52 | * to the on-disk partition table. 53 | */ 54 | 55 | #define kIOMediaLiveKey "Live" 56 | 57 | /*! 58 | * @defined kIOMediaPartitionIDKey 59 | * @abstract 60 | * A property of IOMedia objects. 61 | * @discussion 62 | * The kIOMediaPartitionIDKey property has an OSNumber 63 | * value and is placed into an IOMedia instance 64 | * created via the partition scheme. It is an ID that differentiates one 65 | * partition from the other (within a given scheme). It is typically an index 66 | * into the on-disk partition table. 67 | */ 68 | 69 | #define kIOMediaPartitionIDKey "Partition ID" 70 | 71 | #endif /* !_IOPARTITIONSCHEME_H */ 72 | -------------------------------------------------------------------------------- /include/libimobiledevice/house_arrest.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file libimobiledevice/house_arrest.h 3 | * @brief Access AppStore application folders and their contents. 4 | * \internal 5 | * 6 | * Copyright (c) 2010 Nikias Bassen, All Rights Reserved. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef HOUSE_ARREST_H 24 | #define HOUSE_ARREST_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #include 31 | #include 32 | 33 | /** @name Error Codes */ 34 | /*@{*/ 35 | #define HOUSE_ARREST_E_SUCCESS 0 36 | #define HOUSE_ARREST_E_INVALID_ARG -1 37 | #define HOUSE_ARREST_E_PLIST_ERROR -2 38 | #define HOUSE_ARREST_E_CONN_FAILED -3 39 | #define HOUSE_ARREST_E_INVALID_MODE -4 40 | 41 | #define HOUSE_ARREST_E_UNKNOWN_ERROR -256 42 | /*@}*/ 43 | 44 | /** Represents an error code. */ 45 | typedef int16_t house_arrest_error_t; 46 | 47 | typedef struct house_arrest_client_private house_arrest_client_private; 48 | typedef house_arrest_client_private *house_arrest_client_t; /**< The client handle. */ 49 | 50 | /* Interface */ 51 | house_arrest_error_t house_arrest_client_new(idevice_t device, uint16_t port, house_arrest_client_t *client); 52 | house_arrest_error_t house_arrest_client_free(house_arrest_client_t client); 53 | 54 | house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, plist_t dict); 55 | house_arrest_error_t house_arrest_send_command(house_arrest_client_t client, const char *command, const char *appid); 56 | house_arrest_error_t house_arrest_get_result(house_arrest_client_t client, plist_t *dict); 57 | 58 | afc_error_t afc_client_new_from_house_arrest_client(house_arrest_client_t client, afc_client_t *afc_client); 59 | 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/IOCFPlugIn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #ifndef _IOKIT_IOCFPLUGIN_H_ 24 | #define _IOKIT_IOCFPLUGIN_H_ 25 | 26 | /* IOCFPlugIn.h 27 | */ 28 | #include 29 | 30 | __BEGIN_DECLS 31 | 32 | #include 33 | #if COREFOUNDATION_CFPLUGINCOM_SEPARATE 34 | #include 35 | #endif 36 | 37 | #include 38 | 39 | /* C244E858-109C-11D4-91D4-0050E4C6426F */ 40 | #define kIOCFPlugInInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, \ 41 | 0xC2, 0x44, 0xE8, 0x58, 0x10, 0x9C, 0x11, 0xD4, \ 42 | 0x91, 0xD4, 0x00, 0x50, 0xE4, 0xC6, 0x42, 0x6F) 43 | 44 | 45 | #define IOCFPLUGINBASE \ 46 | UInt16 version; \ 47 | UInt16 revision; \ 48 | IOReturn (*Probe)(void *thisPointer, CFDictionaryRef propertyTable, \ 49 | io_service_t service, SInt32 * order); \ 50 | IOReturn (*Start)(void *thisPointer, CFDictionaryRef propertyTable, \ 51 | io_service_t service); \ 52 | IOReturn (*Stop)(void *thisPointer) 53 | 54 | typedef struct IOCFPlugInInterfaceStruct { 55 | IUNKNOWN_C_GUTS; 56 | IOCFPLUGINBASE; 57 | } IOCFPlugInInterface; 58 | 59 | 60 | kern_return_t 61 | IOCreatePlugInInterfaceForService(io_service_t service, 62 | CFUUIDRef pluginType, CFUUIDRef interfaceType, 63 | IOCFPlugInInterface *** theInterface, SInt32 * theScore); 64 | 65 | kern_return_t 66 | IODestroyPlugInInterface(IOCFPlugInInterface ** interface); 67 | 68 | __END_DECLS 69 | 70 | #endif /* !_IOKIT_IOCFPLUGIN_H_ */ 71 | -------------------------------------------------------------------------------- /src/endianness.h: -------------------------------------------------------------------------------- 1 | #ifndef ENDIANNESS_H 2 | #define ENDIANNESS_H 3 | 4 | #ifndef __LITTLE_ENDIAN 5 | #define __LITTLE_ENDIAN 1234 6 | #endif 7 | 8 | #ifndef __BIG_ENDIAN 9 | #define __BIG_ENDIAN 4321 10 | #endif 11 | 12 | #ifndef __BYTE_ORDER 13 | #ifdef __LITTLE_ENDIAN__ 14 | #define __BYTE_ORDER __LITTLE_ENDIAN 15 | #else 16 | #ifdef __BIG_ENDIAN__ 17 | #define __BYTE_ORDER __BIG_ENDIAN 18 | #endif 19 | #endif 20 | #endif 21 | 22 | #ifndef be16toh 23 | #if __BYTE_ORDER == __BIG_ENDIAN 24 | #define be16toh(x) (x) 25 | #else 26 | #define be16toh(x) ((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8)) 27 | #endif 28 | #endif 29 | 30 | #ifndef htobe16 31 | #define htobe16 be16toh 32 | #endif 33 | 34 | #ifndef __bswap_32 35 | #define __bswap_32(x) ((((x) & 0xFF000000) >> 24) \ 36 | | (((x) & 0x00FF0000) >> 8) \ 37 | | (((x) & 0x0000FF00) << 8) \ 38 | | (((x) & 0x000000FF) << 24)) 39 | #endif 40 | 41 | #ifndef be32toh 42 | #if __BYTE_ORDER == __BIG_ENDIAN 43 | #define be32toh(x) (x) 44 | #else 45 | #define be32toh(x) __bswap_32(x) 46 | #endif 47 | #endif 48 | 49 | #ifndef htobe32 50 | #define htobe32 be32toh 51 | #endif 52 | 53 | #ifndef le32toh 54 | #if __BYTE_ORDER == __BIG_ENDIAN 55 | #define le32toh(x) __bswap_32(x) 56 | #else 57 | #define le32toh(x) (x) 58 | #endif 59 | #endif 60 | 61 | #ifndef htole32 62 | #define htole32 le32toh 63 | #endif 64 | 65 | #ifndef __bswap_64 66 | #define __bswap_64(x) ((((x) & 0xFF00000000000000ull) >> 56) \ 67 | | (((x) & 0x00FF000000000000ull) >> 40) \ 68 | | (((x) & 0x0000FF0000000000ull) >> 24) \ 69 | | (((x) & 0x000000FF00000000ull) >> 8) \ 70 | | (((x) & 0x00000000FF000000ull) << 8) \ 71 | | (((x) & 0x0000000000FF0000ull) << 24) \ 72 | | (((x) & 0x000000000000FF00ull) << 40) \ 73 | | (((x) & 0x00000000000000FFull) << 56)) 74 | #endif 75 | 76 | #ifndef htobe64 77 | #if __BYTE_ORDER == __BIG_ENDIAN 78 | #define htobe64(x) (x) 79 | #else 80 | #define htobe64(x) __bswap_64(x) 81 | #endif 82 | #endif 83 | 84 | #ifndef be64toh 85 | #define be64toh htobe64 86 | #endif 87 | 88 | #ifndef le64toh 89 | #if __BYTE_ORDER == __LITTLE_ENDIAN 90 | #define le64toh(x) (x) 91 | #else 92 | #define le64toh(x) __bswap_64(x) 93 | #endif 94 | #endif 95 | 96 | #ifndef htole64 97 | #define htole64 le64toh 98 | #endif 99 | 100 | typedef enum { 101 | kBigEndian, 102 | kLittleEndian 103 | } endian_t; 104 | 105 | #endif /* ENDIANNESS_H */ 106 | -------------------------------------------------------------------------------- /include/libimobiledevice/mobile_image_mounter.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file libimobiledevice/mobile_image_mounter.h 3 | * @brief Mount developer/debug disk images on the device. 4 | * \internal 5 | * 6 | * Copyright (c) 2010 Nikias Bassen All Rights Reserved. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef MOBILE_IMAGE_MOUNTER_H 24 | #define MOBILE_IMAGE_MOUNTER_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #include 31 | 32 | /** @name Error Codes */ 33 | /*@{*/ 34 | #define MOBILE_IMAGE_MOUNTER_E_SUCCESS 0 35 | #define MOBILE_IMAGE_MOUNTER_E_INVALID_ARG -1 36 | #define MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR -2 37 | #define MOBILE_IMAGE_MOUNTER_E_CONN_FAILED -3 38 | 39 | #define MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR -256 40 | /*@}*/ 41 | 42 | /** Represents an error code. */ 43 | typedef int16_t mobile_image_mounter_error_t; 44 | 45 | typedef struct mobile_image_mounter_client_private mobile_image_mounter_client_private; 46 | typedef mobile_image_mounter_client_private *mobile_image_mounter_client_t; /**< The client handle. */ 47 | 48 | /* Interface */ 49 | mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, uint16_t port, mobile_image_mounter_client_t *client); 50 | mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client); 51 | mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result); 52 | mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const char *image_signature, uint16_t signature_length, const char *image_type, plist_t *result); 53 | mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOAppleLabelScheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2011 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /* 25 | * This header contains the IOAppleLabelScheme class definition. 26 | */ 27 | 28 | #ifndef _IOAPPLELABELSCHEME_H 29 | #define _IOAPPLELABELSCHEME_H 30 | 31 | #include 32 | 33 | /* 34 | * kIOAppleLabelSchemeClass is the name of the IOAppleLabelScheme class. 35 | */ 36 | 37 | #define kIOAppleLabelSchemeClass "IOAppleLabelScheme" 38 | 39 | /* 40 | * Apple Label Scheme Definitions 41 | */ 42 | 43 | #pragma pack(push, 1) /* (enable 8-bit struct packing) */ 44 | 45 | /* Label scheme. */ 46 | 47 | struct applelabel 48 | { 49 | uint8_t al_boot0[416]; /* (reserved for boot area) */ 50 | uint16_t al_magic; /* (the magic number) */ 51 | uint16_t al_type; /* (label type) */ 52 | uint32_t al_flags; /* (generic flags) */ 53 | uint64_t al_offset; /* (offset of property area, bytes) */ 54 | uint32_t al_size; /* (size of property area, bytes) */ 55 | uint32_t al_checksum; /* (checksum of property area) */ 56 | uint8_t al_boot1[72]; /* (reserved for boot area) */ 57 | }; 58 | 59 | /* Label scheme signature (al_magic). */ 60 | 61 | #define AL_MAGIC 0x414C 62 | 63 | /* Label scheme version (al_type). */ 64 | 65 | #define AL_TYPE_DEFAULT 0x0000 66 | 67 | /* Label scheme flags (al_flags). */ 68 | 69 | #define AL_FLAG_DEFAULT 0x00000000 70 | 71 | #pragma pack(pop) /* (reset to default struct packing) */ 72 | 73 | #endif /* !_IOAPPLELABELSCHEME_H */ 74 | -------------------------------------------------------------------------------- /src/MainWnd.h: -------------------------------------------------------------------------------- 1 | #ifndef __MAINWND_H 2 | #define __MAINWND_H 3 | 4 | #include "version.h" 5 | #include "localize.h" 6 | 7 | /* gui definitions */ 8 | #define APPNAME localize("evasi0n") 9 | #define WND_TITLE localize("%s - Version %s") 10 | #define WND_WIDTH 480 11 | #define WND_HEIGHT 320 12 | 13 | #define WELCOME_LABEL_TEXT localize("Welcome! evasi0n is an untethered jailbreak for iOS 6.0 through 6.1.2.") 14 | #define DISCLAIMER_LABEL_TEXT localize("NOTE: Please make a backup of your device before applying the jailbreak.\nWe don't think there will be any problems, but we can't make any guarantees.\nUse evasi0n at your own risk.") 15 | #define BTN_START_TEXT localize("Jailbreak") 16 | #define COPYRIGHT_LABEL_TEXT localize("evasi0n © 2013") 17 | #define TWITTER_LINK_TEXT localize("@evad3rs") 18 | #define TWITTER_LINK_URL localize("https://twitter.com/evad3rs") 19 | #define CREDITS_LABEL_TEXT localize("jailbreak exploits by @planetbeing and @pimskeks.\ngraphic design by @Surenix - interface by Hanéne Samara.") 20 | #define PAYPAL_LINK_TEXT localize("Support Us (PayPal)") 21 | #define PAYPAL_LINK_URL localize("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=36S6KLTRK7FTQ") 22 | #define HOMEPAGE_LINK_TEXT localize("http://evasi0n.com") 23 | #define HOMEPAGE_LINK_URL localize("http://evasi0n.com/") 24 | 25 | enum { 26 | mb_OK = 1 << 0, 27 | mb_CANCEL = 1 << 1, 28 | mb_YES_NO = 1 << 2, 29 | mb_OK_CANCEL = 1 << 3, 30 | mb_ICON_INFO = 1 << 8, 31 | mb_ICON_WARNING = 1 << 9, 32 | mb_ICON_QUESTION = 1 << 10, 33 | mb_ICON_ERROR = 1 << 11 34 | }; 35 | 36 | #define mb_YES mb_OK 37 | #define mb_NO mb_CANCEL 38 | 39 | #ifdef __linux__ 40 | #include 41 | #define WIDGET_TYPE GtkWidget* 42 | #endif 43 | 44 | #ifdef __APPLE__ 45 | #include 46 | #define WIDGET_TYPE id 47 | #endif 48 | 49 | #ifdef WIN32 50 | #include 51 | #define WIDGET_TYPE HWND 52 | #endif 53 | 54 | #ifndef WIDGET_TYPE 55 | #define WIDGET_TYPE void* 56 | #endif 57 | 58 | #include "DeviceHandler.h" 59 | 60 | class DeviceHandler; 61 | 62 | class MainWnd 63 | { 64 | public: 65 | WIDGET_TYPE mainwnd; 66 | WIDGET_TYPE progressBar; 67 | WIDGET_TYPE btnStart; 68 | WIDGET_TYPE lbStatus; 69 | DeviceHandler* devhandler; 70 | 71 | int closeBlocked; 72 | MainWnd(int* pargc, char*** pargv); 73 | ~MainWnd(); 74 | void run(void); 75 | 76 | int msgBox(const char* message, const char* caption, int style); 77 | 78 | void configureButtonForExit(); 79 | void setButtonEnabled(int enabled); 80 | void setStatusText(const char* text); 81 | void setProgress(int percentage); 82 | 83 | void requestUserAttention(int level); 84 | void cancelUserAttention(); 85 | 86 | void handleStartClicked(void* data); 87 | bool onClose(void* data); 88 | }; 89 | #endif 90 | -------------------------------------------------------------------------------- /untether/scripts/postrm.mm: -------------------------------------------------------------------------------- 1 | /* Cydia Corona - Powerful Code Insertion Platform 2 | * Copyright (C) 2011 Jay Freeman (saurik) 3 | */ 4 | 5 | /* GNU Lesser General Public License, Version 3 {{{ */ 6 | /* 7 | * Corona is free software: you can redistribute it and/or modify it under 8 | * the terms of the GNU Lesser General Public License as published by the 9 | * Free Software Foundation, either version 3 of the License, or (at your 10 | * option) any later version. 11 | * 12 | * Corona is distributed in the hope that it will be useful, but WITHOUT 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 15 | * License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with Corona. If not, see . 19 | **/ 20 | /* }}} */ 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #include 27 | 28 | #include 29 | 30 | #include "LaunchDaemons.hpp" 31 | 32 | int main(int argc, char *argv[]) { 33 | if (argc < 2 || ( 34 | strcmp(argv[1], "abort-install") != 0 && 35 | strcmp(argv[1], "remove") != 0 && 36 | true)) return 0; 37 | 38 | NSAutoreleasePool *pool([[NSAutoreleasePool alloc] init]); 39 | 40 | NSFileManager *manager([NSFileManager defaultManager]); 41 | NSError *error; 42 | 43 | if (NSString *config = [NSString stringWithContentsOfFile:@ Evasi0nLaunchConfig_ encoding:NSNonLossyASCIIStringEncoding error:&error]) { 44 | NSArray *lines([config componentsSeparatedByString:@"\n"]); 45 | 46 | NSMutableArray *copy([NSMutableArray array]); 47 | for (NSString *line in lines) 48 | if ([line rangeOfString:@"evasi0n"].location == NSNotFound) 49 | [copy addObject:line]; 50 | 51 | [copy removeObject:@""]; 52 | 53 | [copy removeObject:@ Evasi0nRemount_]; 54 | [copy removeObject:@ Evasi0nSetEnv_]; 55 | [copy removeObject:@ Evasi0nLoadAmfid_]; 56 | [copy removeObject:@ Evasi0nLaunch_]; 57 | [copy removeObject:@ Evasi0nUnsetEnv_]; 58 | [copy removeObject:@ Evasi0nUnlinkLaunch_]; 59 | [copy removeObject:@ Evasi0nLinkLaunch_]; 60 | 61 | if ([copy count] == 0) 62 | [manager removeItemAtPath:@ Evasi0nLaunchConfig_ error:&error]; 63 | else { 64 | [copy addObject:@""]; 65 | 66 | if (![copy isEqualToArray:lines]) 67 | [[copy componentsJoinedByString:@"\n"] writeToFile:@ Evasi0nLaunchConfig_ atomically:YES encoding:NSNonLossyASCIIStringEncoding error:&error]; 68 | } 69 | } 70 | 71 | [pool release]; 72 | return 0; 73 | } 74 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOGUIDPartitionScheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2011 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /* 25 | * This header contains the IOGUIDPartitionScheme class definition. 26 | */ 27 | 28 | #ifndef _IOGUIDPARTITIONSCHEME_H 29 | #define _IOGUIDPARTITIONSCHEME_H 30 | 31 | #include 32 | 33 | /* 34 | * kIOGUIDPartitionSchemeClass is the name of the IOGUIDPartitionScheme class. 35 | */ 36 | 37 | #define kIOGUIDPartitionSchemeClass "IOGUIDPartitionScheme" 38 | 39 | /* 40 | * GUID Partition Map Definitions 41 | */ 42 | 43 | #include 44 | 45 | #pragma pack(push, 1) /* (enable 8-bit struct packing) */ 46 | 47 | /* Partition map. */ 48 | 49 | struct gpt_hdr 50 | { 51 | uint8_t hdr_sig[8]; 52 | uint32_t hdr_revision; 53 | uint32_t hdr_size; 54 | uint32_t hdr_crc_self; 55 | uint32_t __reserved; 56 | uint64_t hdr_lba_self; 57 | uint64_t hdr_lba_alt; 58 | uint64_t hdr_lba_start; 59 | uint64_t hdr_lba_end; 60 | uuid_t hdr_uuid; 61 | uint64_t hdr_lba_table; 62 | uint32_t hdr_entries; 63 | uint32_t hdr_entsz; 64 | uint32_t hdr_crc_table; 65 | uint32_t padding; 66 | }; 67 | 68 | /* Partition map entry. */ 69 | 70 | struct gpt_ent 71 | { 72 | uuid_t ent_type; 73 | uuid_t ent_uuid; 74 | uint64_t ent_lba_start; 75 | uint64_t ent_lba_end; 76 | uint64_t ent_attr; 77 | uint16_t ent_name[36]; 78 | }; 79 | 80 | /* Partition map signature (hdr_sig). */ 81 | 82 | #define GPT_HDR_SIG "EFI PART" 83 | 84 | /* Partition map version (hdr_revision). */ 85 | 86 | #define GPT_HDR_REVISION 0x00010000 87 | 88 | /* Partition map entry flags (ent_attr). */ 89 | 90 | #define GPT_ENT_ATTR_PLATFORM 0x00000001 91 | 92 | #pragma pack(pop) /* (reset to default struct packing) */ 93 | 94 | #endif /* !_IOGUIDPARTITIONSCHEME_H */ 95 | -------------------------------------------------------------------------------- /include/libimobiledevice/restore.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file libimobiledevice/restore.h 3 | * @brief Initiate restore process or reboot device. 4 | * @note This service is only available if the device is in restore mode. 5 | * \internal 6 | * 7 | * Copyright (c) 2010 Joshua Hill. All Rights Reserved. 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | */ 23 | 24 | #ifndef RESTORE_H 25 | #define RESTORE_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #include 32 | 33 | /** @name Error Codes */ 34 | /*@{*/ 35 | #define RESTORE_E_SUCCESS 0 36 | #define RESTORE_E_INVALID_ARG -1 37 | #define RESTORE_E_INVALID_CONF -2 38 | #define RESTORE_E_PLIST_ERROR -3 39 | #define RESTORE_E_DICT_ERROR -4 40 | #define RESTORE_E_NOT_ENOUGH_DATA -5 41 | #define RESTORE_E_MUX_ERROR -6 42 | #define RESTORE_E_START_RESTORE_FAILED -7 43 | 44 | #define RESTORE_E_UNKNOWN_ERROR -256 45 | /*@}*/ 46 | 47 | /** Represents an error code. */ 48 | typedef int16_t restored_error_t; 49 | 50 | typedef struct restored_client_private restored_client_private; 51 | typedef restored_client_private *restored_client_t; /**< The client handle. */ 52 | 53 | /* Interface */ 54 | restored_error_t restored_client_new(idevice_t device, restored_client_t *client, const char *label); 55 | restored_error_t restored_client_free(restored_client_t client); 56 | 57 | restored_error_t restored_query_type(restored_client_t client, char **type, uint64_t *version); 58 | restored_error_t restored_query_value(restored_client_t client, const char *key, plist_t *value); 59 | restored_error_t restored_get_value(restored_client_t client, const char *key, plist_t *value) ; 60 | restored_error_t restored_send(restored_client_t client, plist_t plist); 61 | restored_error_t restored_receive(restored_client_t client, plist_t *plist); 62 | restored_error_t restored_goodbye(restored_client_t client); 63 | 64 | restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version); 65 | restored_error_t restored_reboot(restored_client_t client); 66 | 67 | /* Helper */ 68 | void restored_client_set_label(restored_client_t client, const char *label); 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/storage/IOCDMedia.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2009 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOCDMedia 26 | * @abstract 27 | * This header contains the IOCDMedia class definition. 28 | */ 29 | 30 | #ifndef _IOCDMEDIA_H 31 | #define _IOCDMEDIA_H 32 | 33 | /*! 34 | * @defined kIOCDMediaClass 35 | * @abstract 36 | * kIOCDMediaClass is the name of the IOCDMedia class. 37 | * @discussion 38 | * kIOCDMediaClass is the name of the IOCDMedia class. 39 | */ 40 | 41 | #define kIOCDMediaClass "IOCDMedia" 42 | 43 | /*! 44 | * @defined kIOCDMediaTOCKey 45 | * @abstract 46 | * kIOCDMediaTOCKey is a property of IOCDMedia objects. It has an OSData value 47 | * and a CDTOC structure. 48 | * @discussion 49 | * The kIOCDMediaTOCKey property contains the CD's full table of contents, 50 | * formatted as a CDTOC structure. The CDTOC structure is same as what is 51 | * returned by a READ TOC command, format 0x02. All fields in the TOC are 52 | * guaranteed to be binary-encoded (no BCD-encoded numbers are ever passed). 53 | */ 54 | 55 | #define kIOCDMediaTOCKey "TOC" 56 | 57 | /*! 58 | * @defined kIOCDMediaTypeKey 59 | * @abstract 60 | * kIOCDMediaTypeKey is a property of IOCDMedia objects. It has an OSString 61 | * value. 62 | * @discussion 63 | * The kIOCDMediaTypeKey property identifies the CD media type (CD-ROM, CD-R, 64 | * CD-RW, etc). See the kIOCDMediaType contants for possible values. 65 | */ 66 | 67 | #define kIOCDMediaTypeKey "Type" 68 | 69 | /*! 70 | * @defined kIOCDMediaTypeROM 71 | * The kIOCDMediaTypeKey constant for CD-ROM media (inclusive of the CD-I, 72 | * CD-ROM XA, and CD Audio standards, and mixed mode combinations thereof). 73 | */ 74 | 75 | #define kIOCDMediaTypeROM "CD-ROM" 76 | 77 | /*! 78 | * @defined kIOCDMediaTypeR 79 | * The kIOCDMediaTypeKey constant for CD Recordable (CD-R) media. 80 | */ 81 | 82 | #define kIOCDMediaTypeR "CD-R" 83 | 84 | /*! 85 | * @defined kIOCDMediaTypeRW 86 | * The kIOCDMediaTypeKey constant for CD ReWritable (CD-RW) media. 87 | */ 88 | 89 | #define kIOCDMediaTypeRW "CD-RW" 90 | 91 | #endif /* !_IOCDMEDIA_H */ 92 | -------------------------------------------------------------------------------- /kiki/ios/headers/IOKit/graphics/IOAccelTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | 23 | #ifndef _IOACCEL_TYPES_H 24 | #define _IOACCEL_TYPES_H 25 | 26 | #include 27 | #include 28 | 29 | #define IOACCEL_TYPES_REV 12 30 | 31 | #if !defined(OSTYPES_K64_REV) && !defined(MAC_OS_X_VERSION_10_6) 32 | #define IOACCELTYPES_10_5 1 33 | #endif 34 | 35 | /* Integer rectangle in device coordinates */ 36 | typedef struct 37 | { 38 | SInt16 x; 39 | SInt16 y; 40 | SInt16 w; 41 | SInt16 h; 42 | } IOAccelBounds; 43 | 44 | typedef struct 45 | { 46 | SInt16 w; 47 | SInt16 h; 48 | } IOAccelSize; 49 | 50 | /* Surface information */ 51 | 52 | enum { 53 | kIOAccelVolatileSurface = 0x00000001, 54 | kIOAccelKeycolorSurface = 0x00000002 55 | }; 56 | 57 | typedef struct 58 | { 59 | #if IOACCELTYPES_10_5 60 | vm_address_t address[4]; 61 | #else 62 | mach_vm_address_t address[4]; 63 | #endif /* IOACCELTYPES_10_5 */ 64 | UInt32 rowBytes; 65 | UInt32 width; 66 | UInt32 height; 67 | UInt32 pixelFormat; 68 | IOOptionBits flags; 69 | IOFixed colorTemperature[4]; 70 | UInt32 typeDependent[4]; 71 | } IOAccelSurfaceInformation; 72 | 73 | typedef struct 74 | { 75 | #if IOACCELTYPES_10_5 76 | long x, y, w, h; 77 | void *client_addr; 78 | unsigned long client_row_bytes; 79 | #else 80 | SInt32 x, y, w, h; 81 | mach_vm_address_t client_addr; 82 | UInt32 client_row_bytes; 83 | #endif /* IOACCELTYPES_10_5 */ 84 | } IOAccelSurfaceReadData; 85 | 86 | typedef struct { 87 | IOAccelBounds buffer; 88 | IOAccelSize source; 89 | UInt32 reserved[8]; 90 | } IOAccelSurfaceScaling; 91 | 92 | 93 | typedef SInt32 IOAccelID; 94 | 95 | enum { 96 | kIOAccelPrivateID = 0x00000001 97 | }; 98 | 99 | 100 | #endif /* _IOACCEL_TYPES_H */ 101 | 102 | -------------------------------------------------------------------------------- /include/libimobiledevice/sbservices.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file libimobiledevice/sbservices.h 3 | * @brief Manage SpringBoard icons and retrieve icon images. 4 | * \internal 5 | * 6 | * Copyright (c) 2009 Nikias Bassen All Rights Reserved. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef SB_SERVICES_H 24 | #define SB_SERVICES_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #include 31 | 32 | /** @name Error Codes */ 33 | /*@{*/ 34 | #define SBSERVICES_E_SUCCESS 0 35 | #define SBSERVICES_E_INVALID_ARG -1 36 | #define SBSERVICES_E_PLIST_ERROR -2 37 | #define SBSERVICES_E_CONN_FAILED -3 38 | 39 | #define SBSERVICES_E_UNKNOWN_ERROR -256 40 | /*@}*/ 41 | 42 | /** @name Orientation of the user interface on the device */ 43 | /*@{*/ 44 | typedef enum { 45 | SBSERVICES_INTERFACE_ORIENTATION_UNKNOWN = 0, 46 | SBSERVICES_INTERFACE_ORIENTATION_PORTRAIT = 1, 47 | SBSERVICES_INTERFACE_ORIENTATION_PORTRAIT_UPSIDE_DOWN = 2, 48 | SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_RIGHT = 3, 49 | SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_LEFT = 4 50 | } sbservices_interface_orientation_t; 51 | /*@}*/ 52 | 53 | /** Represents an error code. */ 54 | typedef int16_t sbservices_error_t; 55 | 56 | typedef struct sbservices_client_private sbservices_client_private; 57 | typedef sbservices_client_private *sbservices_client_t; /**< The client handle. */ 58 | 59 | /* Interface */ 60 | sbservices_error_t sbservices_client_new(idevice_t device, uint16_t port, sbservices_client_t *client); 61 | sbservices_error_t sbservices_client_free(sbservices_client_t client); 62 | sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version); 63 | sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate); 64 | sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize); 65 | sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t client, sbservices_interface_orientation_t* interface_orientation); 66 | sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_client_t client, char **pngdata, uint64_t *pngsize); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif 73 | --------------------------------------------------------------------------------