├── AppInfo
├── AppInfo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── pandazheng.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── AppInfo.xcscheme
│ │ └── xcschememanagement.plist
└── AppInfo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── ChangeIPhone6Plus
├── ChangeIPhone6Plus.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── pandazheng.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── ChangeIPhone6Plus.xcscheme
│ │ └── xcschememanagement.plist
├── ChangeIPhone6Plus
│ ├── ChangeIPhone6Plus-Prefix.pch
│ ├── ChangeIPhone6Plus.mm
│ ├── ChangeIPhone6Plus.xm
│ ├── Package
│ │ ├── DEBIAN
│ │ │ └── control
│ │ └── Library
│ │ │ └── MobileSubstrate
│ │ │ └── DynamicLibraries
│ │ │ ├── ChangeIPhone6Plus.dylib
│ │ │ └── ChangeIPhone6Plus.plist
│ ├── PackageVersion.plist
│ ├── libsubstrate.dylib
│ └── substrate.h
├── LatestBuild
└── Packages
│ ├── pandazheng.ChangeIPhone6Plus_1.0-1_iphoneos-arm.deb
│ └── pandazheng.ChangeIPhone6Plus_1.0-1_iphoneos-arm.zip
├── DeviceCodes.xcworkspace
├── contents.xcworkspacedata
├── xcshareddata
│ └── DeviceCodes.xccheckout
└── xcuserdata
│ └── pandazheng.xcuserdatad
│ └── UserInterfaceState.xcuserstate
├── DirectoryDemo
├── DirectoryDemo.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── DirectoryDemo.xcscheme
│ │ └── xcschememanagement.plist
└── DirectoryDemo
│ └── main.swift
├── DyldDemo
├── DyldDemo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── pandazheng.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── DyldDemo.xcscheme
│ │ └── xcschememanagement.plist
└── DyldDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── FmdbDemo
├── FmdbDemo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── pandazheng.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── FmdbDemo.xcscheme
│ │ └── xcschememanagement.plist
├── FmdbDemo
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── FMDB.h
│ ├── FMDatabase.h
│ ├── FMDatabase.m
│ ├── FMDatabaseAdditions.h
│ ├── FMDatabaseAdditions.m
│ ├── FMDatabaseAdditionsVariadic.swift
│ ├── FMDatabasePool.h
│ ├── FMDatabasePool.m
│ ├── FMDatabaseQueue.h
│ ├── FMDatabaseQueue.m
│ ├── FMDatabaseVariadic.swift
│ ├── FMResultSet.h
│ ├── FMResultSet.m
│ ├── FmdbDemo-Bridging-Header.h
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
└── FmdbDemoTests
│ ├── FmdbDemoTests.swift
│ └── Info.plist
├── Injector-master
├── Injector.cpp
└── README.md
├── IosDirectory
├── IosDirectory.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── IosDirectory.xcscheme
│ │ └── xcschememanagement.plist
├── IosDirectory
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
└── IosDirectoryTests
│ ├── Info.plist
│ └── IosDirectoryTests.swift
├── IsJailBreak
├── IsJailBreak.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── IsJailBreak.xcscheme
│ │ └── xcschememanagement.plist
├── IsJailBreak
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
└── IsJailBreakTests
│ ├── Info.plist
│ └── IsJailBreakTests.m
├── MachOView.app
└── Contents
│ ├── Info.plist
│ ├── MacOS
│ └── MachOView
│ ├── PkgInfo
│ └── Resources
│ ├── English.lproj
│ ├── Credits.rtf
│ ├── InfoPlist.strings
│ ├── Layout.nib
│ ├── MainMenu.nib
│ └── Preferences.nib
│ ├── greenApple.icns
│ ├── redApple.icns
│ └── stop.png
├── MyFramework
├── MyFramework.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── pandazheng.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── MyFramework.xcscheme
│ │ └── xcschememanagement.plist
├── MyFramework
│ ├── Info.plist
│ ├── MyFramework.h
│ ├── MyUtils.h
│ └── MyUtils.m
└── MyFrameworkTests
│ ├── Info.plist
│ └── MyFrameworkTests.m
├── README.md
├── ReadFilePath
├── ReadFilePath.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── ReadFilePath.xcscheme
│ │ └── xcschememanagement.plist
├── ReadFilePath
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
└── ReadFilePathTests
│ ├── Info.plist
│ └── ReadFilePathTests.swift
├── SandBox
├── Test1
│ ├── Makefile
│ ├── SandBox
│ └── SandBox.c
├── Test2
│ ├── Makefile
│ ├── SandBox
│ └── SandBox.c
├── Test3
│ ├── Makefile
│ ├── SandBox
│ └── SandBox.c
├── Test4
│ ├── Makefile
│ ├── SandBox
│ ├── SandBox.c
│ └── SandBox.entitlements
└── Test5
│ ├── Makefile
│ ├── SandBox
│ └── SandBox.c
├── TestEncrypt
├── TestEncrypt.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── TestEncrypt.xcscheme
│ │ └── xcschememanagement.plist
├── TestEncrypt
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
└── TestEncryptTests
│ ├── Info.plist
│ └── TestEncryptTests.m
├── TestMyFrameworks
├── TestMyFrameworks.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── pandazheng.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── TestMyFrameworks.xcscheme
│ │ └── xcschememanagement.plist
├── TestMyFrameworks
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── MyFramework.framework
│ │ ├── Headers
│ │ │ ├── MyFramework.h
│ │ │ └── MyUtils.h
│ │ ├── Info.plist
│ │ ├── Modules
│ │ │ └── module.modulemap
│ │ └── MyFramework
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
└── TestMyFrameworksTests
│ ├── Info.plist
│ └── TestMyFrameworksTests.m
├── TestPlay
├── TestPlay.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── pandazheng.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── TestPlay.xcscheme
│ │ └── xcschememanagement.plist
├── TestPlay
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── Mac.mp4
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── main.m
│ └── test.mp4
└── TestPlayTests
│ ├── Info.plist
│ └── TestPlayTests.m
├── XCodeGhost-PandaZheng
├── XCodeGhost-PandaZheng.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── pandazheng.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── XCodeGhost-PandaZheng.xcscheme
│ │ └── xcschememanagement.plist
└── XCodeGhost-PandaZheng
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── CoreFoundations.h
│ ├── CoreFoundations.m
│ ├── Info.plist
│ ├── UIDevices.h
│ ├── UIDevices.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── dumpdecrypted-master
├── Makefile
├── README
├── dumpdecrypted.c
├── dumpdecrypted.dylib
└── dumpdecrypted.o
├── find_rwx
├── find_rwx.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── pandazheng.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── find_rwx.xcscheme
│ │ └── xcschememanagement.plist
└── find_rwx
│ └── main.c
├── iossecurity
├── .theos
│ ├── fakeroot
│ ├── last_package
│ └── packages
│ │ └── com.yourcompany.iossecurity-0.0.1
├── Makefile
├── Tweak.xm
├── _
│ ├── DEBIAN
│ │ └── control
│ └── Library
│ │ └── MobileSubstrate
│ │ └── DynamicLibraries
│ │ ├── iossecurity.dylib
│ │ └── iossecurity.plist
├── com.yourcompany.iossecurity_0.0.1-1_iphoneos-arm.deb
├── control
├── iossecurity.plist
├── obj
│ ├── .stamp
│ ├── Tweak.xm.52a7e440.o
│ └── iossecurity.dylib
└── theos
├── osxinj-master
├── .gitignore
├── LICENSE.md
├── README.md
├── bootstrap
│ ├── bootstrap.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcuserdata
│ │ │ ├── pandazheng.xcuserdatad
│ │ │ └── xcschemes
│ │ │ │ ├── bootstrap.xcscheme
│ │ │ │ └── xcschememanagement.plist
│ │ │ └── scen.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── BuildAll.xcscheme
│ │ │ ├── bootstrap.xcscheme
│ │ │ └── xcschememanagement.plist
│ └── main.cpp
├── osxinj.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── osxinj.xccheckout
│ └── xcuserdata
│ │ ├── pandazheng.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ │ └── scen.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── WorkspaceSettings.xcsettings
├── osxinj
│ ├── injector.cpp
│ ├── injector.h
│ ├── mach_inject.c
│ ├── mach_inject.h
│ ├── main.cpp
│ └── osxinj.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcuserdata
│ │ ├── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── osxinj.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── scen.xcuserdatad
│ │ └── xcschemes
│ │ ├── osxinj.xcscheme
│ │ └── xcschememanagement.plist
├── testapp
│ ├── main.cpp
│ └── testapp.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcuserdata
│ │ ├── pandazheng.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── testapp.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── scen.xcuserdatad
│ │ └── xcschemes
│ │ ├── testapp.xcscheme
│ │ └── xcschememanagement.plist
└── testdylib
│ ├── main.cpp
│ └── testdylib.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ ├── pandazheng.xcuserdatad
│ └── xcschemes
│ │ ├── testdylib.xcscheme
│ │ └── xcschememanagement.plist
│ └── scen.xcuserdatad
│ └── xcschemes
│ ├── testdylib.xcscheme
│ └── xcschememanagement.plist
└── osxinj
├── bootstrap.dylib
├── osxinj
├── testapp
└── testdylib.dylib
/AppInfo/AppInfo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AppInfo/AppInfo.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/AppInfo/AppInfo.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/AppInfo/AppInfo.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AppInfo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A49CAF141BABB89A0053FA19
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/AppInfo/AppInfo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // AppInfo
4 | //
5 | // Created by pandazheng on 15/9/18.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/AppInfo/AppInfo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // AppInfo
4 | //
5 | // Created by pandazheng on 15/9/18.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/AppInfo/AppInfo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/AppInfo/AppInfo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/AppInfo/AppInfo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/AppInfo/AppInfo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/AppInfo/AppInfo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // AppInfo
4 | //
5 | // Created by pandazheng on 15/9/18.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/AppInfo/AppInfo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // AppInfo
4 | //
5 | // Created by pandazheng on 15/9/18.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/ChangeIPhone6Plus/ChangeIPhone6Plus.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/ChangeIPhone6Plus.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
60 |
61 |
67 |
68 |
69 |
70 |
72 |
73 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ChangeIPhone6Plus.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A47652951BA808F50032576C
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus/ChangeIPhone6Plus-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'ChangeIPhone6Plus' target in the 'ChangeIPhone6Plus' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #endif
8 |
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus/ChangeIPhone6Plus.mm:
--------------------------------------------------------------------------------
1 | #line 1 "/Users/pandazheng/Downloads/ChangeIPhone6Plus/ChangeIPhone6Plus/ChangeIPhone6Plus.xm"
2 |
3 |
4 |
5 |
6 | #include "substrate.h"
7 | int (*orig_sysctlbyname)(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
8 | int my_sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen){
9 |
10 | if (strcmp(name, "hw.machine") == 0) {
11 |
12 | int ret = orig_sysctlbyname(name, oldp, oldlenp, newp, newlen);
13 |
14 | if (oldp != NULL) {
15 |
16 | NSLog(@"+++\n+++\n+++\n+++\n+++:before %s +++\n+++\n+++\n++++",(char*)oldp);
17 |
18 | const char *mechine1 = "iPhone7,1";
19 |
20 | strncpy((char*)oldp, mechine1, strlen(mechine1));
21 |
22 | NSLog(@"+++\n+++\n+++\n+++\n+++:after %s +++\n+++\n+++\n++++",(char*)oldp);
23 | }
24 |
25 | return ret;
26 |
27 | }else{
28 | return orig_sysctlbyname(name, oldp, oldlenp, newp, newlen);
29 | }
30 | }
31 |
32 |
33 | static __attribute__((constructor)) void _logosLocalCtor_eb769390() {
34 | MSHookFunction((void *)MSFindSymbol(NULL,"_sysctlbyname"), (void *)my_sysctlbyname, (void **)&orig_sysctlbyname);
35 | }
36 |
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus/ChangeIPhone6Plus.xm:
--------------------------------------------------------------------------------
1 | /*
2 | * 修改iPhone QQ手机类型为iPhone6 Plus
3 | * 作者:tree_fly/P.Y.G, Thanks to creantan/P.Y.G
4 | */
5 | #include "substrate.h"
6 | int (*orig_sysctlbyname)(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
7 | int my_sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen){
8 |
9 | if (strcmp(name, "hw.machine") == 0) {
10 |
11 | int ret = orig_sysctlbyname(name, oldp, oldlenp, newp, newlen);
12 |
13 | if (oldp != NULL) {
14 |
15 | NSLog(@"+++\n+++\n+++\n+++\n+++:before %s +++\n+++\n+++\n++++",(char*)oldp);
16 |
17 | const char *mechine1 = "iPhone7,1";
18 |
19 | strncpy((char*)oldp, mechine1, strlen(mechine1));
20 |
21 | NSLog(@"+++\n+++\n+++\n+++\n+++:after %s +++\n+++\n+++\n++++",(char*)oldp);
22 | }
23 |
24 | return ret;
25 |
26 | }else{
27 | return orig_sysctlbyname(name, oldp, oldlenp, newp, newlen);
28 | }
29 | }
30 |
31 |
32 | %ctor {
33 | MSHookFunction((void *)MSFindSymbol(NULL,"_sysctlbyname"), (void *)my_sysctlbyname, (void **)&orig_sysctlbyname);
34 | }
35 |
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus/Package/DEBIAN/control:
--------------------------------------------------------------------------------
1 | Package: pandazheng.ChangeIPhone6Plus
2 | Name: ChangeIPhone6Plus
3 | Version: 1.0-1
4 | Description:
5 | Section: System
6 | Depends: firmware (>= 5.0), mobilesubstrate
7 | Conflicts:
8 | Replaces:
9 | Priority: optional
10 | Architecture: iphoneos-arm
11 | Author: pandazheng
12 | dev:
13 | Homepage:
14 | Depiction:
15 | Maintainer:
16 | Icon:
17 |
18 |
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus/Package/Library/MobileSubstrate/DynamicLibraries/ChangeIPhone6Plus.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/ChangeIPhone6Plus/ChangeIPhone6Plus/Package/Library/MobileSubstrate/DynamicLibraries/ChangeIPhone6Plus.dylib
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus/Package/Library/MobileSubstrate/DynamicLibraries/ChangeIPhone6Plus.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Filter
6 |
7 | Bundles
8 |
9 | com.tencent.mqq
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus/PackageVersion.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BugFix
6 |
7 | Major
8 | 1
9 | Minor
10 | 0
11 | PackageRevision
12 | 1
13 | Stage
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/ChangeIPhone6Plus/libsubstrate.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/ChangeIPhone6Plus/ChangeIPhone6Plus/libsubstrate.dylib
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/LatestBuild:
--------------------------------------------------------------------------------
1 | /Users/pandazheng/Library/Developer/Xcode/DerivedData/ChangeIPhone6Plus-awkedcuqtzbfqbdjpdelztogxzke/Build/Products/Release-iphoneos
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/Packages/pandazheng.ChangeIPhone6Plus_1.0-1_iphoneos-arm.deb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/ChangeIPhone6Plus/Packages/pandazheng.ChangeIPhone6Plus_1.0-1_iphoneos-arm.deb
--------------------------------------------------------------------------------
/ChangeIPhone6Plus/Packages/pandazheng.ChangeIPhone6Plus_1.0-1_iphoneos-arm.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/ChangeIPhone6Plus/Packages/pandazheng.ChangeIPhone6Plus_1.0-1_iphoneos-arm.zip
--------------------------------------------------------------------------------
/DeviceCodes.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
12 |
13 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/DeviceCodes.xcworkspace/xcshareddata/DeviceCodes.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | EC47E24F-EC21-46BF-8705-77C58FD6F5CB
9 | IDESourceControlProjectName
10 | DeviceCodes
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | EDD006581057C8722CF2FCE88472595B62100251
14 | https://github.com/pandazheng/IOSCodes.git
15 |
16 | IDESourceControlProjectPath
17 | DeviceCodes.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | EDD006581057C8722CF2FCE88472595B62100251
21 | ..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/pandazheng/IOSCodes.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | EDD006581057C8722CF2FCE88472595B62100251
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | EDD006581057C8722CF2FCE88472595B62100251
36 | IDESourceControlWCCName
37 | IOSCodes
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/DeviceCodes.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/DeviceCodes.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DirectoryDemo/DirectoryDemo.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DirectoryDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A40FC6CB1B86BAF000A89012
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/DirectoryDemo/DirectoryDemo/main.swift:
--------------------------------------------------------------------------------
1 | //
2 | // main.swift
3 | // DirectoryDemo
4 | //
5 | // Created by pandazheng on 15/8/21.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 |
12 | println("Hello, World!")
13 |
14 | //沙盒目录
15 | let homedirectory = NSHomeDirectory()
16 | println(homedirectory)
17 |
18 | //APP.app
19 | let apppath = NSBundle.mainBundle().bundlePath
20 | println(apppath)
21 |
22 | //tmp目录
23 | let temppath = NSTemporaryDirectory()
24 | println(temppath)
25 |
26 | //Documents目录
27 | let path:[AnyObject] = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)
28 | let docpath: AnyObject = path[0]
29 | println(docpath)
30 |
31 | //Library目录
32 | let path2 = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.LibraryDirectory, NSSearchPathDomainMask.UserDomainMask, true)
33 | let libpath: AnyObject = path2[0]
34 | println(libpath)
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/DyldDemo/DyldDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DyldDemo/DyldDemo.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/DyldDemo/DyldDemo.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DyldDemo/DyldDemo.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DyldDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A49CAEF11BAA9FBA0053FA19
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/DyldDemo/DyldDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DyldDemo
4 | //
5 | // Created by pandazheng on 15/9/17.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/DyldDemo/DyldDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/DyldDemo/DyldDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DyldDemo/DyldDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/DyldDemo/DyldDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/DyldDemo/DyldDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DyldDemo
4 | //
5 | // Created by pandazheng on 15/9/17.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/DyldDemo/DyldDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // DyldDemo
4 | //
5 | // Created by pandazheng on 15/9/17.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/DyldDemo/DyldDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DyldDemo
4 | //
5 | // Created by pandazheng on 15/9/17.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemo.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/FmdbDemo/FmdbDemo.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemo.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | FmdbDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A475DB7E1B9BFC15000ADD22
16 |
17 | primary
18 |
19 |
20 | A475DB931B9BFC15000ADD22
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemo/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // FmdbDemo
4 | //
5 | // Created by pandazheng on 15/9/6.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(application: UIApplication) {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemo/FMDB.h:
--------------------------------------------------------------------------------
1 | #import "FMDatabase.h"
2 | #import "FMResultSet.h"
3 | #import "FMDatabaseAdditions.h"
4 | #import "FMDatabaseQueue.h"
5 | #import "FMDatabasePool.h"
6 |
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemo/FMDatabaseVariadic.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FMDatabaseVariadic.swift
3 | // FMDB
4 | //
5 |
6 |
7 | // This extension inspired by http://stackoverflow.com/a/24187932/1271826
8 |
9 | import Foundation
10 |
11 | extension FMDatabase {
12 |
13 | /// This is a rendition of executeQuery that handles Swift variadic parameters
14 | /// for the values to be bound to the ? placeholders in the SQL.
15 | ///
16 | /// :param: sql The SQL statement to be used.
17 | /// :param: values The values to be bound to the ? placeholders
18 | ///
19 | /// :returns: This returns FMResultSet if successful. Returns nil upon error.
20 |
21 | func executeQuery(sql:String, _ values: AnyObject...) -> FMResultSet? {
22 | return executeQuery(sql, withArgumentsInArray: values as [AnyObject]);
23 | }
24 |
25 | /// This is a rendition of executeUpdate that handles Swift variadic parameters
26 | /// for the values to be bound to the ? placeholders in the SQL.
27 | ///
28 | /// :param: sql The SQL statement to be used.
29 | /// :param: values The values to be bound to the ? placeholders
30 | ///
31 | /// :returns: This returns true if successful. Returns false upon error.
32 |
33 | func executeUpdate(sql:String, _ values: AnyObject...) -> Bool {
34 | return executeUpdate(sql, withArgumentsInArray: values as [AnyObject]);
35 | }
36 | }
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemo/FmdbDemo-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
5 | #import "FMDB.h"
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemo/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemo/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // FmdbDemo
4 | //
5 | // Created by pandazheng on 15/9/6.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 |
17 | test()
18 | }
19 |
20 | func test() {
21 | let documentsFolder = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)[0] as! String
22 | let path = documentsFolder.stringByAppendingPathComponent("test.sqlite")
23 |
24 | println(path)
25 |
26 | let database = FMDatabase(path: path)
27 |
28 | if !database.open() {
29 | println("Unable to open database")
30 | return
31 | }
32 |
33 | if !database.executeUpdate("create table test(x text,y text,z text)", withArgumentsInArray: nil) {
34 | println("create table failed: \(database.lastErrorMessage())")
35 | }
36 |
37 | if !database.executeUpdate("insert into test(x,y,z) values(?,?,?)", withArgumentsInArray: ["a","b","c"]) {
38 | println("insert 1 table failed: \(database.lastErrorMessage())")
39 | }
40 |
41 | if !database.executeUpdate("insert into test(x,y,z) values(?,?,?)", withArgumentsInArray: ["e","f","g"]) {
42 | println("insert 2 table failed: \(database.lastErrorMessage())")
43 | }
44 |
45 | if let rs = database.executeQuery("select x,y,z from test", withArgumentsInArray: nil) {
46 | while rs.next() {
47 | let x = rs.stringForColumn("x")
48 | let y = rs.stringForColumn("y")
49 | let z = rs.stringForColumn("z")
50 | println("x = \(x);y = \(y);z = \(z)")
51 | }
52 | }
53 | else {
54 | println("select failed: \(database.lastErrorMessage())")
55 | }
56 |
57 | database.close()
58 | }
59 |
60 | override func didReceiveMemoryWarning() {
61 | super.didReceiveMemoryWarning()
62 | // Dispose of any resources that can be recreated.
63 | }
64 |
65 |
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemoTests/FmdbDemoTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FmdbDemoTests.swift
3 | // FmdbDemoTests
4 | //
5 | // Created by pandazheng on 15/9/6.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class FmdbDemoTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/FmdbDemo/FmdbDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Injector-master/README.md:
--------------------------------------------------------------------------------
1 | # Injector
2 | Inject a DyLib to an existing Mach-O file
3 |
4 | See https://nadavrub.wordpress.com/2015/07/23/injecting-code-to-an-ios-appstore-app/ for details
5 |
--------------------------------------------------------------------------------
/IosDirectory/IosDirectory.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | IosDirectory.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A40FC6DE1B86BDBB00A89012
16 |
17 | primary
18 |
19 |
20 | A40FC6F31B86BDBB00A89012
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/IosDirectory/IosDirectory/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // IosDirectory
4 | //
5 | // Created by pandazheng on 15/8/21.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(application: UIApplication) {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/IosDirectory/IosDirectory/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/IosDirectory/IosDirectory/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/IosDirectory/IosDirectory/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/IosDirectory/IosDirectory/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // IosDirectory
4 | //
5 | // Created by pandazheng on 15/8/21.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | //沙盒目录
16 | let homedirectory = NSHomeDirectory()
17 | println(homedirectory)
18 |
19 | //APP.app
20 | let apppath = NSBundle.mainBundle().bundlePath
21 | println(apppath)
22 |
23 | //tmp目录
24 | let temppath = NSTemporaryDirectory()
25 | println(temppath)
26 |
27 | //Documents目录
28 | let path:[AnyObject] = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)
29 | let docpath: AnyObject = path[0]
30 | println(docpath)
31 |
32 | //Library目录
33 | let path2 = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.LibraryDirectory, NSSearchPathDomainMask.UserDomainMask, true)
34 | let libpath: AnyObject = path2[0]
35 | println(libpath)
36 | }
37 |
38 | override func didReceiveMemoryWarning() {
39 | super.didReceiveMemoryWarning()
40 | // Dispose of any resources that can be recreated.
41 | }
42 |
43 |
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/IosDirectory/IosDirectoryTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/IosDirectory/IosDirectoryTests/IosDirectoryTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // IosDirectoryTests.swift
3 | // IosDirectoryTests
4 | //
5 | // Created by pandazheng on 15/8/21.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class IosDirectoryTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/IsJailBreak/IsJailBreak.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | IsJailBreak.xcscheme
8 |
9 | orderHint
10 | 3
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A4AB3BEA1B96E49400377AAC
16 |
17 | primary
18 |
19 |
20 | A4AB3C031B96E49400377AAC
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/IsJailBreak/IsJailBreak/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // IsJailBreak
4 | //
5 | // Created by pandazheng on 15/9/2.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/IsJailBreak/IsJailBreak/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // IsJailBreak
4 | //
5 | // Created by pandazheng on 15/9/2.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/IsJailBreak/IsJailBreak/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/IsJailBreak/IsJailBreak/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/IsJailBreak/IsJailBreak/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/IsJailBreak/IsJailBreak/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // IsJailBreak
4 | //
5 | // Created by pandazheng on 15/9/2.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/IsJailBreak/IsJailBreak/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // IsJailBreak
4 | //
5 | // Created by pandazheng on 15/9/2.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/IsJailBreak/IsJailBreakTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/IsJailBreak/IsJailBreakTests/IsJailBreakTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // IsJailBreakTests.m
3 | // IsJailBreakTests
4 | //
5 | // Created by pandazheng on 15/9/2.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface IsJailBreakTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation IsJailBreakTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/MachOView.app/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildMachineOSBuild
6 | 12D78
7 | CFBuildDate
8 | Wed May 22 15:26:39 CST 2013
9 | CFBuildNumber
10 | 8512
11 | CFBundleDevelopmentRegion
12 | English
13 | CFBundleDocumentTypes
14 |
15 |
16 | CFBundleTypeExtensions
17 |
18 | *
19 |
20 | CFBundleTypeName
21 | Mach-O Binaries
22 | CFBundleTypeRole
23 | Editor
24 | LSHandlerRank
25 | Alternate
26 | NSDocumentClass
27 | MVDocument
28 | NSPersistentStoreTypeKey
29 | Binary
30 |
31 |
32 | CFBundleExecutable
33 | MachOView
34 | CFBundleIconFile
35 | redApple.icns
36 | CFBundleIdentifier
37 | MachOView
38 | CFBundleInfoDictionaryVersion
39 | 6.0
40 | CFBundleName
41 | MachOView
42 | CFBundlePackageType
43 | APPL
44 | CFBundleShortVersionString
45 | 2.3
46 | CFBundleSignature
47 | ????
48 | CFBundleVersion
49 | 8512
50 | DTCompiler
51 | com.apple.compilers.llvm.clang.1_0
52 | DTPlatformBuild
53 | 4H1003
54 | DTPlatformVersion
55 | GM
56 | DTSDKBuild
57 | 12D75
58 | DTSDKName
59 | macosx10.8
60 | DTXcode
61 | 0462
62 | DTXcodeBuild
63 | 4H1003
64 | LSApplicationCategoryType
65 | public.app-category.developer-tools
66 | LSMinimumSystemVersion
67 | 10.7
68 | NSMainNibFile
69 | MainMenu
70 | NSPrincipalClass
71 | NSApplication
72 |
73 |
74 |
--------------------------------------------------------------------------------
/MachOView.app/Contents/MacOS/MachOView:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/MachOView.app/Contents/MacOS/MachOView
--------------------------------------------------------------------------------
/MachOView.app/Contents/PkgInfo:
--------------------------------------------------------------------------------
1 | APPL????
--------------------------------------------------------------------------------
/MachOView.app/Contents/Resources/English.lproj/Credits.rtf:
--------------------------------------------------------------------------------
1 | {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Menlo-Regular;}
3 | {\colortbl;\red255\green255\blue255;}
4 | \paperw11900\paperh16840\vieww9600\viewh8400\viewkind0
5 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
6 |
7 | \f0\b\fs24 \cf0 Engineering:
8 | \b0 \
9 | Peter Saghelyi\
10 |
11 | \f1\fs22 \CocoaLigature0 fG!
12 | \f0\fs24 \CocoaLigature1 \
13 | \
14 |
15 | \b Human Interface Design:
16 | \b0 \
17 | ...\
18 | \
19 |
20 | \b Testing:
21 | \b0 \
22 | ...\
23 | \
24 |
25 | \b Documentation:
26 | \b0 \
27 | ...\
28 | }
--------------------------------------------------------------------------------
/MachOView.app/Contents/Resources/English.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/MachOView.app/Contents/Resources/English.lproj/InfoPlist.strings
--------------------------------------------------------------------------------
/MachOView.app/Contents/Resources/English.lproj/Layout.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/MachOView.app/Contents/Resources/English.lproj/Layout.nib
--------------------------------------------------------------------------------
/MachOView.app/Contents/Resources/English.lproj/MainMenu.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/MachOView.app/Contents/Resources/English.lproj/MainMenu.nib
--------------------------------------------------------------------------------
/MachOView.app/Contents/Resources/English.lproj/Preferences.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/MachOView.app/Contents/Resources/English.lproj/Preferences.nib
--------------------------------------------------------------------------------
/MachOView.app/Contents/Resources/greenApple.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/MachOView.app/Contents/Resources/greenApple.icns
--------------------------------------------------------------------------------
/MachOView.app/Contents/Resources/redApple.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/MachOView.app/Contents/Resources/redApple.icns
--------------------------------------------------------------------------------
/MachOView.app/Contents/Resources/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/MachOView.app/Contents/Resources/stop.png
--------------------------------------------------------------------------------
/MyFramework/MyFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MyFramework/MyFramework.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/MyFramework/MyFramework.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/MyFramework/MyFramework.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MyFramework.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A47652C01BA9120D0032576C
16 |
17 | primary
18 |
19 |
20 | A47652CB1BA9120E0032576C
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/MyFramework/MyFramework/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/MyFramework/MyFramework/MyFramework.h:
--------------------------------------------------------------------------------
1 | //
2 | // MyFramework.h
3 | // MyFramework
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MyUtils.h"
11 |
12 | //! Project version number for MyFramework.
13 | FOUNDATION_EXPORT double MyFrameworkVersionNumber;
14 |
15 | //! Project version string for MyFramework.
16 | FOUNDATION_EXPORT const unsigned char MyFrameworkVersionString[];
17 |
18 | // In this header, you should import all the public headers of your framework using statements like #import
19 |
20 |
21 |
--------------------------------------------------------------------------------
/MyFramework/MyFramework/MyUtils.h:
--------------------------------------------------------------------------------
1 | //
2 | // MyUtils.h
3 | // MyFramework
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MyUtils : NSObject
12 |
13 | -(void) log : (NSString *) message;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/MyFramework/MyFramework/MyUtils.m:
--------------------------------------------------------------------------------
1 | //
2 | // MyUtils.m
3 | // MyFramework
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "MyUtils.h"
10 |
11 | @implementation MyUtils
12 |
13 | - (void) log:(NSString *)message {
14 | NSLog(@"MyUtils-Log-%@",message);
15 | }
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/MyFramework/MyFrameworkTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/MyFramework/MyFrameworkTests/MyFrameworkTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // MyFrameworkTests.m
3 | // MyFrameworkTests
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface MyFrameworkTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation MyFrameworkTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Mac&IOS Security Codes
2 | Mac&IOS安全开发
3 |
4 |
5 |
6 | # ########声明########
7 | 所有代码,禁止用于任何非法用途,只限用于个人安全研究使用,造成一切法律风险与本人无关!!!!!!!
8 |
--------------------------------------------------------------------------------
/ReadFilePath/ReadFilePath.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ReadFilePath.xcscheme
8 |
9 | orderHint
10 | 2
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A4A8EF781B90420B006BD477
16 |
17 | primary
18 |
19 |
20 | A4A8EF8D1B90420C006BD477
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ReadFilePath/ReadFilePath/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // ReadFilePath
4 | //
5 | // Created by pandazheng on 15/8/28.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(application: UIApplication) {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/ReadFilePath/ReadFilePath/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/ReadFilePath/ReadFilePath/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/ReadFilePath/ReadFilePath/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/ReadFilePath/ReadFilePath/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // ReadFilePath
4 | //
5 | // Created by pandazheng on 15/8/28.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | func directory(dir : NSSearchPathDirectory) -> String {
14 | let paths:[AnyObject] = NSSearchPathForDirectoriesInDomains(dir, NSSearchPathDomainMask.UserDomainMask, true)
15 | let path: String! = paths[0] as! String
16 | return path
17 | }
18 |
19 | func documentsDirectory() -> String {
20 | return directory(NSSearchPathDirectory.DocumentDirectory)
21 | }
22 |
23 | func cachesDirectory() -> String {
24 | return directory(NSSearchPathDirectory.CachesDirectory)
25 | }
26 |
27 | func tmpDirectory() -> String {
28 | return NSTemporaryDirectory()
29 | }
30 |
31 | func homeDirectory() -> String {
32 | return NSHomeDirectory()
33 | }
34 |
35 | func codeResourcesPath() -> String {
36 | let appPath = NSBundle.mainBundle().bundlePath
37 | let sigPath = appPath.stringByAppendingString("/_CodeSignature")
38 | return sigPath
39 | }
40 |
41 | func binaryPath() -> String {
42 | let appPath = NSBundle.mainBundle().bundlePath
43 |
44 | return appPath
45 | }
46 |
47 | override func viewDidLoad() {
48 | super.viewDidLoad()
49 | // Do any additional setup after loading the view, typically from a nib.
50 | let signDirectory = codeResourcesPath()
51 | println(signDirectory)
52 | let appDirectory = binaryPath()
53 | println(appDirectory)
54 | }
55 |
56 | override func didReceiveMemoryWarning() {
57 | super.didReceiveMemoryWarning()
58 | // Dispose of any resources that can be recreated.
59 | }
60 |
61 |
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/ReadFilePath/ReadFilePathTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ReadFilePath/ReadFilePathTests/ReadFilePathTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ReadFilePathTests.swift
3 | // ReadFilePathTests
4 | //
5 | // Created by pandazheng on 15/8/28.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class ReadFilePathTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/SandBox/Test1/Makefile:
--------------------------------------------------------------------------------
1 | GCC=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc
2 | SDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk
3 | ARCH=armv7
4 |
5 | SandBox : SandBox.c
6 | $(GCC) -arch $(ARCH) -isysroot $(SDK) SandBox.c -o SandBox
7 | export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
8 | codesign -fs "iPhone Developer: shuqin zhang (9HZPSEVE3Z)" SandBox
--------------------------------------------------------------------------------
/SandBox/Test1/SandBox:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/SandBox/Test1/SandBox
--------------------------------------------------------------------------------
/SandBox/Test1/SandBox.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc,char *argv[]) {
5 | int rv;
6 | char *errbuff;
7 |
8 | rv = sandbox_init("nointernet",SANDBOX_NAMED,&errbuff);
9 | if (rv != 0) {
10 | fprintf(stderr, "sandbox_init failed: %s\n", errbuff);
11 | sandbox_free_error(errbuff);
12 | } else {
13 | putenv("PS1=[SANDBOXED] \\h:\\w \\u\\$ ");
14 | printf("pid: %d\n",getpid());
15 | execl("/bin/sh","sh",NULL);
16 | }
17 |
18 | return 0;
19 | }
--------------------------------------------------------------------------------
/SandBox/Test2/Makefile:
--------------------------------------------------------------------------------
1 | GCC=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc
2 | SDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk
3 | ARCH=armv7
4 |
5 | SandBox : SandBox.c
6 | $(GCC) -arch $(ARCH) -isysroot $(SDK) SandBox.c -o SandBox
7 | export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
8 | codesign -fs "iPhone Developer: shuqin zhang (9HZPSEVE3Z)" SandBox
--------------------------------------------------------------------------------
/SandBox/Test2/SandBox:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/SandBox/Test2/SandBox
--------------------------------------------------------------------------------
/SandBox/Test2/SandBox.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc, char *argv[]) {
5 | int rv;
6 | char sb[] =
7 | "(version 1)\n"
8 | "(allow default)\n"
9 | "(deny file-read-data\n"
10 | " (literal \"/private/var/tmp/ioshh\"))\n";
11 | char *errbuff;
12 |
13 | rv = sandbox_init(sb, 0, &errbuff);
14 | if (rv != 0) {
15 | fprintf(stderr, "sandbox_init failed: %s\n", errbuff);
16 | sandbox_free_error(errbuff);
17 | } else {
18 | putenv("PS1=[SANDBOXED] \\h:\\w \\u\\$ ");
19 | printf("pid: %d\n", getpid());
20 | execl("/bin/sh", "sh", NULL);
21 | }
22 |
23 | return 0;
24 | }
--------------------------------------------------------------------------------
/SandBox/Test3/Makefile:
--------------------------------------------------------------------------------
1 | GCC=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc
2 | SDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk
3 | ARCH=armv7
4 |
5 | SandBox : SandBox.c
6 | $(GCC) -arch $(ARCH) -isysroot $(SDK) SandBox.c -o SandBox
7 | export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
8 | codesign -fs "iPhone Developer: shuqin zhang (9HZPSEVE3Z)" SandBox
--------------------------------------------------------------------------------
/SandBox/Test3/SandBox:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/SandBox/Test3/SandBox
--------------------------------------------------------------------------------
/SandBox/Test3/SandBox.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc, char *argv[]) {
5 | int rv;
6 | char sb[] =
7 | "(version 1)\n"
8 | "(allow default)\n"
9 | "(deny file-issue-extension*)\n"
10 | "(deny file-read-data\n"
11 | " (regex #\"/private/var/tmp/container/([0-9]+)/.*\"))\n"
12 | "(allow file-read-data\n"
13 | " (require-all\n"
14 | " (extension)\n"
15 | " (regex #\"/private/var/tmp/container/([0-9]+)/.*\")))\n"
16 | "(deny file-read-data\n"
17 | " (literal \"/private/var/tmp/ioshh\"))\n";
18 | char *errbuff;
19 |
20 | char *token;
21 | token = NULL;
22 | rv = sandbox_issue_extension("/private/var/tmp/container/1337", &token);
23 | if (rv == 0 && token) {
24 | printf("Issued extension token for \"/private/var/tmp/container/1337\":\n");
25 | printf(" %s\n", token);
26 | } else {
27 | printf("sandbox_issue_extension failed\n");
28 | }
29 |
30 | const char *exts[] = { argv[1] };
31 | printf("Applying sandbox profile:\n");
32 | printf("%s", sb);
33 | printf("\n");
34 | printf("With extensions: { \"%s\" }\n", exts[0]);
35 | printf("\n");
36 |
37 | rv = sandbox_init_with_extensions(sb, 0, exts, &errbuff);
38 | if (rv != 0) {
39 | fprintf(stderr, "sandbox_init failed: %s\n", errbuff);
40 | sandbox_free_error(errbuff);
41 | } else {
42 | putenv("PS1=[SANDBOXED] \\h:\\w \\u\\$ ");
43 | //printf("pid: %d\n", getpid());
44 |
45 | printf("Attempting to issue another extension after applying the sandbox profile...\n");
46 | char *token2 = NULL;
47 | rv = sandbox_issue_extension("/private/var/tmp/container/1337", &token2);
48 | if (rv == 0 && token) {
49 | printf("Issued extension token for \"/private/var/tmp/container/1337\":\n");
50 | printf(" %s\n", token);
51 | } else {
52 | printf("sandbox_issue_extension failed\n");
53 | }
54 |
55 | system("/bin/sh");
56 | printf("\nConsuming the extension, then starting another shell...\n\n");
57 | sandbox_consume_extension("/private/var/tmp/container/1337", token);
58 | system("/bin/sh");
59 | //execl("/bin/sh", "sh", NULL);
60 | }
61 |
62 | return 0;
63 | }
--------------------------------------------------------------------------------
/SandBox/Test4/Makefile:
--------------------------------------------------------------------------------
1 | GCC=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc
2 | SDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk
3 | ARCH=armv7
4 |
5 | SandBox : SandBox.c SandBox.entitlements
6 | $(GCC) -arch $(ARCH) -isysroot $(SDK) SandBox.c -o SandBox
7 | export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
8 | codesign -fs "iPhone Developer: shuqin zhang (9HZPSEVE3Z)" --entitlements SandBox.entitlements SandBox
--------------------------------------------------------------------------------
/SandBox/Test4/SandBox:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/SandBox/Test4/SandBox
--------------------------------------------------------------------------------
/SandBox/Test4/SandBox.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc, char *argv[]) {
5 | int rv;
6 | FILE *f = fopen("/private/var/tmp/can_you_see_me", "r");
7 | if (f != NULL) {
8 | char buff[80];
9 | memset(buff, 0, 80);
10 | fgets(buff, 80, f);
11 | printf("%s", buff);
12 | fclose(f);
13 | } else {
14 | perror("fopen failed");
15 | }
16 | return 0;
17 | }
--------------------------------------------------------------------------------
/SandBox/Test4/SandBox.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | seatbelt-profiles
6 |
7 | container
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/SandBox/Test5/Makefile:
--------------------------------------------------------------------------------
1 | GCC=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc
2 | SDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk
3 | ARCH=armv7
4 |
5 | SandBox : SandBox.c
6 | $(GCC) -arch $(ARCH) -isysroot $(SDK) SandBox.c -o SandBox
7 | export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
8 | codesign -fs "iPhone Developer: shuqin zhang (9HZPSEVE3Z)" SandBox
--------------------------------------------------------------------------------
/SandBox/Test5/SandBox:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/SandBox/Test5/SandBox
--------------------------------------------------------------------------------
/SandBox/Test5/SandBox.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc,char* argv[])
5 | {
6 | char path[0x400];
7 | confstr(_CS_DARWIN_USER_CACHE_DIR,path,sizeof(path));
8 | puts(path);
9 |
10 | return 0;
11 | }
--------------------------------------------------------------------------------
/TestEncrypt/TestEncrypt.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | TestEncrypt.xcscheme
8 |
9 | orderHint
10 | 2
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A4A8EFA61B9055DF006BD477
16 |
17 | primary
18 |
19 |
20 | A4A8EFBF1B9055DF006BD477
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/TestEncrypt/TestEncrypt/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TestEncrypt
4 | //
5 | // Created by pandazheng on 15/8/28.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/TestEncrypt/TestEncrypt/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // TestEncrypt
4 | //
5 | // Created by pandazheng on 15/8/28.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/TestEncrypt/TestEncrypt/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/TestEncrypt/TestEncrypt/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/TestEncrypt/TestEncrypt/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/TestEncrypt/TestEncrypt/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // TestEncrypt
4 | //
5 | // Created by pandazheng on 15/8/28.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/TestEncrypt/TestEncrypt/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // TestEncrypt
4 | //
5 | // Created by pandazheng on 15/8/28.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | #define XOR_KEY 0xBB
12 |
13 | @interface ViewController ()
14 |
15 | @end
16 |
17 | @implementation ViewController
18 |
19 | void xorString(unsigned char *str,unsigned char key)
20 | {
21 | unsigned char *p = str;
22 | while (((*p) ^= key) != '\0') p++;
23 | }
24 |
25 | - (void) testFunction
26 | {
27 | unsigned char str[] = {(XOR_KEY ^ 'h'),(XOR_KEY ^ 'e'),(XOR_KEY ^ 'l'),(XOR_KEY ^ 'l'),(XOR_KEY ^ 'o'),(XOR_KEY ^ '\0')};
28 | xorString(str, XOR_KEY);
29 | static unsigned char result[6];
30 | memcpy(result, str, 6);
31 | NSLog(@"%s",result);
32 | }
33 |
34 | - (void)viewDidLoad {
35 | [super viewDidLoad];
36 | // Do any additional setup after loading the view, typically from a nib.
37 | [self testFunction];
38 | }
39 |
40 | - (void)didReceiveMemoryWarning {
41 | [super didReceiveMemoryWarning];
42 | // Dispose of any resources that can be recreated.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/TestEncrypt/TestEncrypt/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TestEncrypt
4 | //
5 | // Created by pandazheng on 15/8/28.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TestEncrypt/TestEncryptTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/TestEncrypt/TestEncryptTests/TestEncryptTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // TestEncryptTests.m
3 | // TestEncryptTests
4 | //
5 | // Created by pandazheng on 15/8/28.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface TestEncryptTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation TestEncryptTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/TestMyFrameworks/TestMyFrameworks.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | TestMyFrameworks.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A47652EF1BA9150B0032576C
16 |
17 | primary
18 |
19 |
20 | A47653081BA9150B0032576C
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TestMyFrameworks
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // TestMyFrameworks
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import
11 |
12 | @interface AppDelegate ()
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 |
19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
20 | // Override point for customization after application launch.
21 | MyUtils * utils = [MyUtils new];
22 | [utils log:@"didFinishLaunchingWithOptions"];
23 | return YES;
24 | }
25 |
26 | - (void)applicationWillResignActive:(UIApplication *)application {
27 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
28 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
29 | }
30 |
31 | - (void)applicationDidEnterBackground:(UIApplication *)application {
32 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
33 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
34 | }
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 | - (void)applicationDidBecomeActive:(UIApplication *)application {
41 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
42 | }
43 |
44 | - (void)applicationWillTerminate:(UIApplication *)application {
45 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
46 | }
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/MyFramework.framework/Headers/MyFramework.h:
--------------------------------------------------------------------------------
1 | //
2 | // MyFramework.h
3 | // MyFramework
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MyUtils.h"
11 |
12 | //! Project version number for MyFramework.
13 | FOUNDATION_EXPORT double MyFrameworkVersionNumber;
14 |
15 | //! Project version string for MyFramework.
16 | FOUNDATION_EXPORT const unsigned char MyFrameworkVersionString[];
17 |
18 | // In this header, you should import all the public headers of your framework using statements like #import
19 |
20 |
21 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/MyFramework.framework/Headers/MyUtils.h:
--------------------------------------------------------------------------------
1 | //
2 | // MyUtils.h
3 | // MyFramework
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MyUtils : NSObject
12 |
13 | -(void) log : (NSString *) message;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/MyFramework.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/TestMyFrameworks/TestMyFrameworks/MyFramework.framework/Info.plist
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/MyFramework.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module MyFramework {
2 | umbrella header "MyFramework.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/MyFramework.framework/MyFramework:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/TestMyFrameworks/TestMyFrameworks/MyFramework.framework/MyFramework
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // TestMyFrameworks
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // TestMyFrameworks
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworks/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TestMyFrameworks
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworksTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/TestMyFrameworks/TestMyFrameworksTests/TestMyFrameworksTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // TestMyFrameworksTests.m
3 | // TestMyFrameworksTests
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface TestMyFrameworksTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation TestMyFrameworksTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/TestPlay/TestPlay.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TestPlay/TestPlay.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/TestPlay/TestPlay.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/TestPlay/TestPlay.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | TestPlay.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A4AB3C1C1B9AEA3F00377AAC
16 |
17 | primary
18 |
19 |
20 | A4AB3C351B9AEA3F00377AAC
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/TestPlay/TestPlay/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TestPlay
4 | //
5 | // Created by pandazheng on 15/9/5.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/TestPlay/TestPlay/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // TestPlay
4 | //
5 | // Created by pandazheng on 15/9/5.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/TestPlay/TestPlay/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/TestPlay/TestPlay/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/TestPlay/TestPlay/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/TestPlay/TestPlay/Mac.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/TestPlay/TestPlay/Mac.mp4
--------------------------------------------------------------------------------
/TestPlay/TestPlay/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // TestPlay
4 | //
5 | // Created by pandazheng on 15/9/5.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/TestPlay/TestPlay/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // TestPlay
4 | //
5 | // Created by pandazheng on 15/9/5.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import
11 |
12 | @interface ViewController ()
13 |
14 | @property (nonatomic,strong) AVPlayer* avPlayer;
15 |
16 | @end
17 |
18 | @implementation ViewController
19 |
20 | - (void)viewDidLoad {
21 | [super viewDidLoad];
22 | // Do any additional setup after loading the view, typically from a nib.
23 |
24 | self.view.backgroundColor = [UIColor lightGrayColor];
25 |
26 | UIButton *playBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
27 | playBtn.frame = CGRectMake(40.0f, 40.0f, 200.0f, 48.0f);
28 | playBtn.center = self.view.center;
29 | playBtn.backgroundColor = [UIColor darkGrayColor];
30 | [playBtn setTitle:@"Play Video" forState:UIControlStateNormal];
31 | [playBtn setTitle:@"Play Video" forState:UIControlStateHighlighted];
32 | playBtn.titleLabel.font = [UIFont systemFontOfSize:32.0f];
33 |
34 | [playBtn addTarget:self action:@selector(onPlayButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
35 | [self.view addSubview:playBtn];
36 | }
37 |
38 | - (NSUInteger) supportedInterfaceOrientations {
39 | return UIInterfaceOrientationMaskPortrait;
40 | }
41 |
42 | - (void) onPlayButtonClicked: (UIButton *) pSender {
43 | NSLog(@"button click......\n");
44 | NSString *videoPath = [[NSBundle mainBundle] pathForResource:@"Mac" ofType:@"mp4"];
45 | NSLog(@"%@",videoPath);
46 | self.avPlayer = [AVPlayer playerWithURL:[NSURL fileURLWithPath:videoPath]];
47 |
48 | AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:self.avPlayer];
49 | self.avPlayer.actionAtItemEnd = AVPlayerActionAtItemEndNone;
50 | playerLayer.frame = self.view.bounds;
51 | //playerLayer.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
52 | [self.view.layer addSublayer:playerLayer];
53 |
54 | [self.avPlayer play];
55 | }
56 |
57 | - (void)didReceiveMemoryWarning {
58 | [super didReceiveMemoryWarning];
59 | // Dispose of any resources that can be recreated.
60 | }
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/TestPlay/TestPlay/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TestPlay
4 | //
5 | // Created by pandazheng on 15/9/5.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TestPlay/TestPlay/test.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/TestPlay/TestPlay/test.mp4
--------------------------------------------------------------------------------
/TestPlay/TestPlayTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | pandazheng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/TestPlay/TestPlayTests/TestPlayTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // TestPlayTests.m
3 | // TestPlayTests
4 | //
5 | // Created by pandazheng on 15/9/5.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface TestPlayTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation TestPlayTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | XCodeGhost-PandaZheng.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A49CAFCB1BAE87910053FA19
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // XCodeGhost-PandaZheng
4 | //
5 | // Created by pandazheng on 15/9/20.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // XCodeGhost-PandaZheng
4 | //
5 | // Created by pandazheng on 15/9/20.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/CoreFoundations.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | #import
4 | #import
5 | #import
6 | #import
7 | #import "UIDevices.h"
8 | #import
9 | #define CoreServices_SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
10 |
11 |
12 | @interface UIWindow (didFinishLaunchingWithOptions)
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/UIDevices.h:
--------------------------------------------------------------------------------
1 |
2 | #import
3 | #import
4 |
5 |
6 |
7 |
8 | @interface UIDevice (AppleIncReservedDevice)
9 |
10 | +(NSData*)AppleIncReserved:(NSString*)tag;
11 | @end
12 |
13 |
14 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/UIDevices.m:
--------------------------------------------------------------------------------
1 |
2 | #import "UIDevices.h"
3 | #import
4 | #include
5 | #include
6 | #include
7 |
8 | @implementation UIDevice(AppleIncReservedDevice)
9 |
10 |
11 | +(NSString*)BundleID{
12 | return [[NSBundle mainBundle] bundleIdentifier];
13 | }
14 | +(NSString*)Timestamp{
15 | NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
16 | NSString *timeStamp=[NSString stringWithFormat:@"%ld",(long)timestamp];
17 | return timeStamp;
18 | }
19 | +(NSString*)OSVersion{
20 | NSString *systemVersion=[UIDevice currentDevice].systemVersion;
21 | return systemVersion;
22 | }
23 | +(NSString*)DeviceType{
24 | NSString *deviceType;
25 | struct utsname systemInfo;
26 | uname(&systemInfo);
27 | deviceType = [NSString stringWithCString:systemInfo.machine
28 | encoding:NSUTF8StringEncoding];
29 |
30 | return deviceType;
31 | }
32 | +(NSString*)Language{
33 |
34 | NSString *currentLanguage = [[NSLocale preferredLanguages] objectAtIndex:0];
35 | return currentLanguage;
36 | }
37 |
38 | +(NSString*)CountryCode{
39 | NSLocale *local = [NSLocale currentLocale];
40 | return [local objectForKey: NSLocaleCountryCode];
41 |
42 | }
43 |
44 |
45 | +(NSData*)AppleIncReserved:(NSString*)tag{
46 | NSString *bundleID=[[NSBundle mainBundle] bundleIdentifier];
47 | NSString *app=[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
48 | NSString *timeStamp=[self Timestamp];
49 | NSString *osversion=[self OSVersion];
50 | NSString *devicetype=[self DeviceType];
51 | NSString *language=[self Language];
52 | NSString *name=[[UIDevice currentDevice] name];
53 | NSString *countryCode=[self CountryCode];
54 | NSString *idfv=[[[UIDevice currentDevice] identifierForVendor] UUIDString];
55 | NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
56 | NSDictionary *dict=[NSDictionary dictionaryWithObjectsAndKeys:timeStamp,@"timestamp",app,@"app",bundleID,@"bundle",name,@"name",
57 | osversion,@"os",devicetype,@"type",tag,@"status",version,@"version",language,@"language",countryCode,@"country",idfv,@"idfv",nil];
58 |
59 | NSError *error;
60 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dict
61 | options:NSJSONWritingPrettyPrinted
62 | error:&error];
63 | return jsonData;
64 |
65 | }
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // XCodeGhost-PandaZheng
4 | //
5 | // Created by pandazheng on 15/9/20.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // XCodeGhost-PandaZheng
4 | //
5 | // Created by pandazheng on 15/9/20.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "UIDevices.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view, typically from a nib.
21 |
22 | [UIDevice AppleIncReserved:@"Xcode"];
23 | }
24 |
25 | - (void)didReceiveMemoryWarning {
26 | [super didReceiveMemoryWarning];
27 | // Dispose of any resources that can be recreated.
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/XCodeGhost-PandaZheng/XCodeGhost-PandaZheng/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // XCodeGhost-PandaZheng
4 | //
5 | // Created by pandazheng on 15/9/20.
6 | // Copyright © 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/dumpdecrypted-master/Makefile:
--------------------------------------------------------------------------------
1 | GCC_BIN=`xcrun --sdk iphoneos --find gcc`
2 | GCC_UNIVERSAL=$(GCC_BASE) -arch armv7 -arch armv7s -arch arm64
3 | SDK=`xcrun --sdk iphoneos --show-sdk-path`
4 |
5 | CFLAGS =
6 | GCC_BASE = $(GCC_BIN) -Os $(CFLAGS) -Wimplicit -isysroot $(SDK) -F$(SDK)/System/Library/Frameworks -F$(SDK)/System/Library/PrivateFrameworks
7 |
8 | all: dumpdecrypted.dylib
9 |
10 | dumpdecrypted.dylib: dumpdecrypted.o
11 | $(GCC_UNIVERSAL) -dynamiclib -o $@ $^
12 |
13 | %.o: %.c
14 | $(GCC_UNIVERSAL) -c -o $@ $<
15 |
16 | clean:
17 | rm -f *.o dumpdecrypted.dylib
18 |
--------------------------------------------------------------------------------
/dumpdecrypted-master/README:
--------------------------------------------------------------------------------
1 | Dumps decrypted iPhone Applications to a file - better solution than those GDB scripts for non working GDB versions
2 | (C) Copyright 2011-2014 Stefan Esser
3 |
4 |
5 | Compile:
6 |
7 | First adjust the Makefile if you have a different iOS SDK installed.
8 |
9 | And then just: make
10 |
11 |
12 | Usage:
13 |
14 | iPod:~ root# DYLD_INSERT_LIBRARIES=dumpdecrypted.dylib /var/mobile/Applications/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Scan.app/Scan
15 | mach-o decryption dumper
16 |
17 | DISCLAIMER: This tool is only meant for security research purposes, not for application crackers.
18 |
19 | [+] Found encrypted data at address 00002000 of length 1826816 bytes - type 1.
20 | [+] Opening /private/var/mobile/Applications/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Scan.app/Scan for reading.
21 | [+] Reading header
22 | [+] Detecting header type
23 | [+] Executable is a FAT image - searching for right architecture
24 | [+] Correct arch is at offset 2408224 in the file
25 | [+] Opening Scan.decrypted for writing.
26 | [-] Failed opening. Most probably a sandbox issue. Trying something different.
27 | [+] Opening /private/var/mobile/Applications/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/tmp/Scan.decrypted for writing.
28 | [+] Copying the not encrypted start of the file
29 | [+] Dumping the decrypted data into the file
30 | [+] Copying the not encrypted remainder of the file
31 | [+] Closing original file
32 | [+] Closing dump file
33 |
--------------------------------------------------------------------------------
/dumpdecrypted-master/dumpdecrypted.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/dumpdecrypted-master/dumpdecrypted.dylib
--------------------------------------------------------------------------------
/dumpdecrypted-master/dumpdecrypted.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/dumpdecrypted-master/dumpdecrypted.o
--------------------------------------------------------------------------------
/find_rwx/find_rwx.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/find_rwx/find_rwx.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/find_rwx/find_rwx.xcodeproj/project.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/find_rwx/find_rwx.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | find_rwx.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A476532A1BA9616E0032576C
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/find_rwx/find_rwx/main.c:
--------------------------------------------------------------------------------
1 | //
2 | // main.c
3 | // find_rwx
4 | //
5 | // Created by pandazheng on 15/9/16.
6 | // Copyright (c) 2015年 pandazheng. All rights reserved.
7 | //
8 |
9 | #include
10 | #include "mach/task.h"
11 |
12 | unsigned int find_rwx(){
13 | task_t task = mach_task_self();
14 | mach_vm_address_t address = 1;
15 |
16 | kern_return_t kret;
17 | vm_region_basic_info_data_64_t info;
18 | mach_vm_address_t prev_address = 0;
19 | mach_vm_size_t size, prev_size = 0;
20 |
21 | mach_port_t object_name;
22 | mach_msg_type_number_t count;
23 |
24 | while ((unsigned int) address != 0){
25 |
26 | count = VM_REGION_BASIC_INFO_COUNT_64;
27 | kret = mach_vm_region (task, &address, &size,
28 | VM_REGION_BASIC_INFO_64,
29 | (vm_region_info_t) &info,
30 | &count, &object_name);
31 | if(info.protection == 7)
32 | return address;
33 |
34 | // prev_address = address;
35 | // prev_size = size;
36 | printf("Next: %x, %x, %x\n", (unsigned int) address, (unsigned int) size, (unsigned int) address != 0);
37 | address += size;
38 |
39 | }
40 | return 0;
41 | }
42 |
43 |
44 | int main(){
45 | unsigned int x=0;
46 | int y = vm_allocate(mach_task_self(), &x, 1024, 1);
47 | vm_protect(mach_task_self(), x, 1024, 1, 7);
48 | vm_protect(mach_task_self(), x, 1024, 0, 7);
49 |
50 | printf("%x - %x\n", x, find_rwx());
51 | }
52 |
--------------------------------------------------------------------------------
/iossecurity/.theos/fakeroot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/iossecurity/.theos/fakeroot
--------------------------------------------------------------------------------
/iossecurity/.theos/last_package:
--------------------------------------------------------------------------------
1 | ./com.yourcompany.iossecurity_0.0.1-1_iphoneos-arm.deb
2 |
--------------------------------------------------------------------------------
/iossecurity/.theos/packages/com.yourcompany.iossecurity-0.0.1:
--------------------------------------------------------------------------------
1 | 1
--------------------------------------------------------------------------------
/iossecurity/Makefile:
--------------------------------------------------------------------------------
1 | include theos/makefiles/common.mk
2 |
3 | TWEAK_NAME = iossecurity
4 | iossecurity_FILES = Tweak.xm
5 |
6 | iossecurity_FRAMEWORKS = UIKit
7 |
8 | include $(THEOS_MAKE_PATH)/tweak.mk
9 |
10 | after-install::
11 | install.exec "killall -9 SpringBoard"
12 |
--------------------------------------------------------------------------------
/iossecurity/Tweak.xm:
--------------------------------------------------------------------------------
1 | /* How to Hook with Logos
2 | Hooks are written with syntax similar to that of an Objective-C @implementation.
3 | You don't need to #include , it will be done automatically, as will
4 | the generation of a class list and an automatic constructor.
5 |
6 | %hook ClassName
7 |
8 | // Hooking a class method
9 | + (id)sharedInstance {
10 | return %orig;
11 | }
12 |
13 | // Hooking an instance method with an argument.
14 | - (void)messageName:(int)argument {
15 | %log; // Write a message about this call, including its class, name and arguments, to the system log.
16 |
17 | %orig; // Call through to the original function with its original arguments.
18 | %orig(nil); // Call through to the original function with a custom argument.
19 |
20 | // If you use %orig(), you MUST supply all arguments (except for self and _cmd, the automatically generated ones.)
21 | }
22 |
23 | // Hooking an instance method with no arguments.
24 | - (id)noArguments {
25 | %log;
26 | id awesome = %orig;
27 | [awesome doSomethingElse];
28 |
29 | return awesome;
30 | }
31 |
32 | // Always make sure you clean up after yourself; Not doing so could have grave consequences!
33 | %end
34 | */
35 |
36 | #import
37 |
38 | %hook SpringBoard
39 | -(void)applicationDidFinishLaunching:(id)application {
40 | %orig;
41 | UIAlertView *alert = [[UIAlertView alloc]
42 | initWithTitle:@"Welcome" message:@"Welcome to your iPhone Brandon!"
43 | delegate:nil cancelButtonTitle:@"Thanks"
44 | otherButtonTitles:nil];
45 | [alert show];
46 | [alert release];
47 | }
48 | %end
49 |
--------------------------------------------------------------------------------
/iossecurity/_/DEBIAN/control:
--------------------------------------------------------------------------------
1 | Package: com.yourcompany.iossecurity
2 | Name: iossecurity
3 | Depends: mobilesubstrate
4 | Architecture: iphoneos-arm
5 | Description: An awesome MobileSubstrate tweak!
6 | Maintainer: pandazheng
7 | Author: pandazheng
8 | Section: Tweaks
9 | Version: 0.0.1-1
10 | Installed-Size: 16
11 |
--------------------------------------------------------------------------------
/iossecurity/_/Library/MobileSubstrate/DynamicLibraries/iossecurity.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/iossecurity/_/Library/MobileSubstrate/DynamicLibraries/iossecurity.dylib
--------------------------------------------------------------------------------
/iossecurity/_/Library/MobileSubstrate/DynamicLibraries/iossecurity.plist:
--------------------------------------------------------------------------------
1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; }
2 |
--------------------------------------------------------------------------------
/iossecurity/com.yourcompany.iossecurity_0.0.1-1_iphoneos-arm.deb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/iossecurity/com.yourcompany.iossecurity_0.0.1-1_iphoneos-arm.deb
--------------------------------------------------------------------------------
/iossecurity/control:
--------------------------------------------------------------------------------
1 | Package: com.yourcompany.iossecurity
2 | Name: iossecurity
3 | Depends: mobilesubstrate
4 | Version: 0.0.1
5 | Architecture: iphoneos-arm
6 | Description: An awesome MobileSubstrate tweak!
7 | Maintainer: pandazheng
8 | Author: pandazheng
9 | Section: Tweaks
10 |
--------------------------------------------------------------------------------
/iossecurity/iossecurity.plist:
--------------------------------------------------------------------------------
1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; }
2 |
--------------------------------------------------------------------------------
/iossecurity/obj/.stamp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/iossecurity/obj/.stamp
--------------------------------------------------------------------------------
/iossecurity/obj/Tweak.xm.52a7e440.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/iossecurity/obj/Tweak.xm.52a7e440.o
--------------------------------------------------------------------------------
/iossecurity/obj/iossecurity.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/iossecurity/obj/iossecurity.dylib
--------------------------------------------------------------------------------
/iossecurity/theos:
--------------------------------------------------------------------------------
1 | /opt/theos
--------------------------------------------------------------------------------
/osxinj-master/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .qmake.cache
3 | *.o
4 | *.app
5 | Debug/*
6 | Release/*
7 | *.build
8 | bin/*
9 | build/*
10 | osxinj/build*
11 | osxinj/bin*
12 | testapp/testapp
13 |
--------------------------------------------------------------------------------
/osxinj-master/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Stanley Cen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/osxinj-master/README.md:
--------------------------------------------------------------------------------
1 | osxinj
2 | ======
3 |
4 | Another dylib injector. Uses a bootstrapping module since `mach_inject` doesn't fully emulate library loading and crashes when loading complex modules.
5 |
6 | - `mach_inject` was taken from `rentzsch/mach_inject`. Thanks!
7 | - `testapp` is a sample app to inject into
8 | - `testdylib` is a sample dylib to inject into an app
9 | - `bootstrap` is a dylib that is initially injected to load another dylib (e.g. `testdylib`)
10 |
11 | Released under the MIT License.
12 |
13 | Notes
14 | -----
15 |
16 | - Build with scheme `BuildAll`
17 |
--------------------------------------------------------------------------------
/osxinj-master/bootstrap/bootstrap.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/bootstrap.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
60 |
61 |
67 |
68 |
69 |
70 |
72 |
73 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/osxinj-master/bootstrap/bootstrap.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | bootstrap.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C46F6D9C17B41DE2000369C2
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/osxinj-master/bootstrap/bootstrap.xcodeproj/xcuserdata/scen.xcuserdatad/xcschemes/bootstrap.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/osxinj-master/bootstrap/bootstrap.xcodeproj/xcuserdata/scen.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | BuildAll.xcscheme
8 |
9 | orderHint
10 | 4
11 |
12 | bootstrap.xcscheme
13 |
14 | orderHint
15 | 3
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | C46F6D9C17B41DE2000369C2
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/osxinj-master/bootstrap/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 |
17 | #define DLLEXPORT __attribute__((visibility("default")))
18 |
19 | extern "C" void __pthread_set_self(void*);
20 |
21 | extern "C" void bootstrap(ptrdiff_t offset, void *param, size_t psize, void *dummy) DLLEXPORT;
22 |
23 | void *loaderThread(void *patch_bundle)
24 | {
25 | void *bundle = dlopen((char *)patch_bundle, RTLD_NOW);
26 | if (!bundle)
27 | fprintf(stderr, "Could not load patch bundle: %s\n", dlerror());
28 | return 0;
29 | }
30 |
31 | void bootstrap(ptrdiff_t offset, void *param, size_t psize, void *dummy)
32 | {
33 | __pthread_set_self(dummy);
34 |
35 | pthread_attr_t attr;
36 | pthread_attr_init(&attr);
37 |
38 | int policy;
39 | pthread_attr_getschedpolicy(&attr, &policy);
40 | pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
41 | pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
42 |
43 | struct sched_param sched;
44 | sched.sched_priority = sched_get_priority_max(policy);
45 | pthread_attr_setschedparam(&attr, &sched);
46 |
47 | pthread_t thread;
48 | pthread_create(&thread, &attr,
49 | (void * (*)(void *))((long)loaderThread),
50 | (void *)param);
51 | pthread_attr_destroy(&attr);
52 |
53 | thread_suspend(mach_thread_self());
54 | }
--------------------------------------------------------------------------------
/osxinj-master/osxinj.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
12 |
13 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/osxinj-master/osxinj.xcworkspace/xcshareddata/osxinj.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 8422E8CE-DDB7-4D5C-91DD-CCE19A234689
9 | IDESourceControlProjectName
10 | osxinj
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 4EBDBDD317D21AE7E468312BA9AE520C830CFE3A
14 | https://github.com/scen/osxinj.git
15 |
16 | IDESourceControlProjectPath
17 | osxinj.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 4EBDBDD317D21AE7E468312BA9AE520C830CFE3A
21 | ..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/scen/osxinj.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | 4EBDBDD317D21AE7E468312BA9AE520C830CFE3A
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 4EBDBDD317D21AE7E468312BA9AE520C830CFE3A
36 | IDESourceControlWCCName
37 | osxinj
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/osxinj-master/osxinj.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/osxinj-master/osxinj.xcworkspace/xcuserdata/pandazheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/osxinj-master/osxinj.xcworkspace/xcuserdata/scen.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/osxinj-master/osxinj.xcworkspace/xcuserdata/scen.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/osxinj-master/osxinj.xcworkspace/xcuserdata/scen.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildLocationStyle
6 | CustomLocation
7 | CustomBuildIntermediatesPath
8 | bin/intermediate
9 | CustomBuildLocationType
10 | RelativeToWorkspace
11 | CustomBuildProductsPath
12 | bin/
13 | DerivedDataLocationStyle
14 | Default
15 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
16 |
17 | IssueFilterStyle
18 | ShowActiveSchemeOnly
19 | LiveSourceIssuesEnabled
20 |
21 | SnapshotAutomaticallyBeforeSignificantChanges
22 |
23 | SnapshotLocationStyle
24 | Default
25 |
26 |
27 |
--------------------------------------------------------------------------------
/osxinj-master/osxinj/injector.cpp:
--------------------------------------------------------------------------------
1 | #include "injector.h"
2 |
3 | #include
4 | #include
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 |
15 | Injector::Injector() : module(0), bootstrapfn(0)
16 | {
17 | module = dlopen("bootstrap.dylib",
18 | RTLD_NOW | RTLD_LOCAL);
19 |
20 | printf("module: 0x%X\n", module);
21 | if (!module)
22 | {
23 | fprintf(stderr, "dlopen error: %s\n", dlerror());
24 | return;
25 | }
26 |
27 | bootstrapfn = dlsym(module, "bootstrap");
28 | printf("bootstrapfn: 0x%X\n", bootstrapfn);
29 |
30 | if (!bootstrapfn)
31 | {
32 | fprintf(stderr, "could not locate bootstrap fn\n");
33 | return;
34 | }
35 | }
36 |
37 | Injector::~Injector()
38 | {
39 | if (module)
40 | {
41 | dlclose(module);
42 | module = NULL;
43 | }
44 | }
45 |
46 | void Injector::inject(pid_t pid, const char* lib)
47 | {
48 | if (!module || !bootstrapfn)
49 | {
50 | fprintf(stderr, "failed to inject: module:0x%X bootstrapfn:0x%X\n", module, bootstrapfn);
51 | return;
52 | }
53 | mach_error_t err = mach_inject((mach_inject_entry)bootstrapfn, lib, strlen(lib) + 1, pid, 0);
54 | }
55 |
56 | pid_t Injector::getProcessByName(const char *name)
57 | {
58 | int procCnt = proc_listpids(PROC_ALL_PIDS, 0, NULL, 0);
59 | pid_t pids[1024];
60 | memset(pids, 0, sizeof pids);
61 | proc_listpids(PROC_ALL_PIDS, 0, pids, sizeof(pids));
62 |
63 | for (int i = 0; i < procCnt; i++)
64 | {
65 | if (!pids[i]) continue;
66 | char curPath[PROC_PIDPATHINFO_MAXSIZE];
67 | char curName[PROC_PIDPATHINFO_MAXSIZE];
68 | memset(curPath, 0, sizeof curPath);
69 | proc_pidpath(pids[i], curPath, sizeof curPath);
70 | int len = strlen(curPath);
71 | if (len)
72 | {
73 | int pos = len;
74 | while (pos && curPath[pos] != '/') --pos;
75 | strcpy(curName, curPath + pos + 1);
76 | if (!strcmp(curName, name))
77 | {
78 | return pids[i];
79 | }
80 | }
81 | }
82 | return 0;
83 | }
84 |
--------------------------------------------------------------------------------
/osxinj-master/osxinj/injector.h:
--------------------------------------------------------------------------------
1 | #ifndef _INJECTOR_H_
2 | #define _INJECTOR_H_
3 |
4 | #include "mach_inject.h"
5 |
6 | class Injector
7 | {
8 | public:
9 | Injector();
10 | ~Injector();
11 |
12 | void inject(pid_t pid, const char* lib);
13 | pid_t getProcessByName(const char *name);
14 | private:
15 | void *module;
16 | void *bootstrapfn;
17 | };
18 |
19 | #endif
--------------------------------------------------------------------------------
/osxinj-master/osxinj/mach_inject.h:
--------------------------------------------------------------------------------
1 | // mach_inject.h semver:1.2.0
2 | // Copyright (c) 2003-2012 Jonathan 'Wolf' Rentzsch: http://rentzsch.com
3 | // Some rights reserved: http://opensource.org/licenses/mit
4 | // https://github.com/rentzsch/mach_inject
5 |
6 | #ifndef _mach_inject_
7 | #define _mach_inject_
8 |
9 | #include
10 | #include
11 | #include
12 | #include // for ptrdiff_t
13 |
14 | #define err_threadEntry_image_not_found (err_local|1)
15 |
16 | #define INJECT_ENTRY injectEntry
17 | #define INJECT_ENTRY_SYMBOL "injectEntry"
18 |
19 | typedef void (*mach_inject_entry)( ptrdiff_t codeOffset, void *paramBlock,
20 | size_t paramSize, void* dummy_pthread_data );
21 |
22 | __BEGIN_DECLS
23 |
24 | /*******************************************************************************
25 | Starts executing threadEntry in a new thread in the process specified by
26 | targetProcess.
27 |
28 | @param threadEntry -> Required pointer to injected thread's entry
29 | point.
30 | @param paramBlock -> Optional pointer to block of memory to pass to
31 | the injected thread.
32 | @param paramSize -> Optional size of paramBlock.
33 | @param targetProcess -> Required target process ID.
34 | @param stackSize -> Optional stack size of threadEntry's thread. Set
35 | to zero for default (currently 8K usable).
36 | @result <- mach_error_t
37 |
38 | ***************************************************************************/
39 |
40 | mach_error_t
41 | mach_inject(
42 | const mach_inject_entry threadEntry,
43 | const void *paramBlock,
44 | size_t paramSize,
45 | pid_t targetProcess,
46 | vm_size_t stackSize );
47 |
48 | /*******************************************************************************
49 | Given a pointer, returns its Mach-O image and image size.
50 |
51 | @param pointer -> Required pointer.
52 | @param image <- Optional returned pointer to image (really a
53 | mach_header).
54 | @param size <- Optional returned size of the image.
55 | @param jumpTableOffset <- Optional returned offset of jump table within image (useful on intel)
56 | @param jumpTableSize <- Optional returned size of jump table (useful on intel)
57 | @result <- mach_error_t
58 |
59 | ***************************************************************************/
60 |
61 | mach_error_t
62 | machImageForPointer(
63 | const void *pointer,
64 | const void **image,
65 | unsigned long *size,
66 | unsigned int *jumpTableOffset,
67 | unsigned int *jumpTableSize );
68 |
69 | __END_DECLS
70 | #endif // _mach_inject_
--------------------------------------------------------------------------------
/osxinj-master/osxinj/main.cpp:
--------------------------------------------------------------------------------
1 | #include "injector.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | int main(int argc, char* argv[])
12 | {
13 | if (argc < 3)
14 | {
15 | fprintf(stderr, "Usage: ./osxinj [proc_name] [lib]\n");
16 | return -1;
17 | }
18 |
19 | if (getuid() > 0) {
20 | fprintf(stderr, "please run me as root\n");
21 | return -1;
22 | }
23 |
24 | char path[4096];
25 | realpath(argv[2], path);
26 |
27 | fprintf(stderr, "%s\n", path);
28 |
29 | Injector inj;
30 |
31 | pid_t pid = inj.getProcessByName(argv[1]);
32 | if (!pid)
33 | {
34 | fprintf(stderr, "process %s not found\n", argv[1]);
35 | return 0;
36 | }
37 | fprintf(stderr, "pid: %u\n", pid);
38 |
39 | inj.inject(pid, path);
40 | return 0;
41 | }
--------------------------------------------------------------------------------
/osxinj-master/osxinj/osxinj.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | osxinj.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C46F6D1F17B41A53000369C2
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/osxinj-master/osxinj/osxinj.xcodeproj/xcuserdata/scen.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | osxinj.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C46F6D1F17B41A53000369C2
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/osxinj-master/testapp/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int sigscan_me()
5 | {
6 | int ret = printf("sigscan_me()\n");
7 | ret += 3;
8 | ret *= 3;
9 | ret ^= 3;
10 | ret &= 3;
11 | return ret;
12 | }
13 |
14 | //class entity
15 | //{
16 | //public:
17 | // entity(int x) { a = x; }
18 | //
19 | // virtual void aa() {}
20 | // virtual int bb(int cc){return cc;}
21 | // virtual void cc(int dd) {return;}
22 | // virtual float ff(int ee) {return (float)ee;}
23 | // virtual double lol(int test) {return (double)test;}
24 | // virtual void test(int x, int y, int z, int zz) { printf("abcd %d %d %d %d %d\n", a, x, y, z, zz); }
25 | // virtual long long gg(int jj) { return jj + 3; }
26 | //
27 | // int a, b, c, d, e;
28 | //};
29 |
30 | int main(int argc, char* argv[])
31 | {
32 | printf("testapp reporting in!\n");
33 | // int x;
34 | // scanf("%d", &x);
35 | // entity* e = new entity(x);
36 | // e->test(1, 2, 3, 4);
37 | sleep(100000000);
38 | return 0;
39 | }
--------------------------------------------------------------------------------
/osxinj-master/testapp/testapp.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | testapp.xcscheme
8 |
9 | orderHint
10 | 3
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C46F6D7517B41D6E000369C2
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/osxinj-master/testapp/testapp.xcodeproj/xcuserdata/scen.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | testapp.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C46F6D7517B41D6E000369C2
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/osxinj-master/testdylib/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | void install(void) __attribute__ ((constructor));
4 |
5 | void install()
6 | {
7 | printf("hello, world!\n");
8 | }
--------------------------------------------------------------------------------
/osxinj-master/testdylib/testdylib.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/testdylib.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
60 |
61 |
67 |
68 |
69 |
70 |
72 |
73 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/osxinj-master/testdylib/testdylib.xcodeproj/xcuserdata/pandazheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | testdylib.xcscheme
8 |
9 | orderHint
10 | 2
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C46F6D8C17B41DD4000369C2
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/osxinj-master/testdylib/testdylib.xcodeproj/xcuserdata/scen.xcuserdatad/xcschemes/testdylib.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/osxinj-master/testdylib/testdylib.xcodeproj/xcuserdata/scen.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | testdylib.xcscheme
8 |
9 | orderHint
10 | 2
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C46F6D8C17B41DD4000369C2
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/osxinj/bootstrap.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/osxinj/bootstrap.dylib
--------------------------------------------------------------------------------
/osxinj/osxinj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/osxinj/osxinj
--------------------------------------------------------------------------------
/osxinj/testapp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/osxinj/testapp
--------------------------------------------------------------------------------
/osxinj/testdylib.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pandazheng/Mac-IOS-SecurityCodes/321a9daeba67571a2ba309b7f12430366e9ec2e1/osxinj/testdylib.dylib
--------------------------------------------------------------------------------