Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 53ba03f796 | |||
| a5defc1338 | |||
| d17752aa43 | |||
| 53786b10ed | |||
| 36fc75544a | |||
| 9d7a1076a2 | |||
| 2f6e337567 |
+1
-1
Submodule Injector updated: 27c282628c...a2bff17d11
@@ -1,21 +1,29 @@
|
||||
MIT License
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2018 Pwn20wnd
|
||||
Copyright (c) 2019, Pwn20wnd
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
### The most advanced jailbreak tool
|
||||

|
||||
|
||||
unc0ver jailbreak for iOS 11.0 - 12.1.2<br/>
|
||||
unc0ver jailbreak for iOS 11.0 - 12.2<br/>
|
||||
by [@pwn20wnd](https://twitter.com/Pwn20wnd) & [@sbingner](https://twitter.com/sbingner)<br/>
|
||||
UI by [@iOS_App_Dev](https://twitter.com/iOS_App_Dev) & [@HiMyNameIsUbik](https://twitter.com/HiMyNameIsUbik)<br/>
|
||||
|
||||
|
||||
+73
-50
@@ -1012,7 +1012,7 @@
|
||||
<rect key="frame" x="0.0" y="607" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="WOK-Td-cxv" id="xi3-eC-Fum">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="woU-mq-fIz">
|
||||
@@ -1054,7 +1054,7 @@
|
||||
<rect key="frame" x="0.0" y="651" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="6sa-dp-ZvU" id="nSv-JN-wuL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="X88-cm-23O">
|
||||
@@ -1096,7 +1096,7 @@
|
||||
<rect key="frame" x="0.0" y="695" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="qWr-4O-LOu" id="cgT-EM-7Rk">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DM2-Dw-FZN">
|
||||
@@ -1138,7 +1138,7 @@
|
||||
<rect key="frame" x="0.0" y="739" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="LS2-Zw-XoD" id="4sv-6u-pv8">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="11j-p9-hrg" userLabel="SSH Only Switch">
|
||||
@@ -1180,7 +1180,7 @@
|
||||
<rect key="frame" x="0.0" y="783" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="pV6-qi-GAD" id="q8X-Sq-CZl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8XW-8v-iqw" userLabel="Enable get-task-allow Switch">
|
||||
@@ -1222,7 +1222,7 @@
|
||||
<rect key="frame" x="0.0" y="827" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="hgh-Yu-0a3" id="kDJ-82-gLZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ySK-nk-1pp" userLabel="Set CS_DEBUGGED Switch">
|
||||
@@ -1264,7 +1264,7 @@
|
||||
<rect key="frame" x="0.0" y="871" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="tTs-N5-uOC" id="vhz-uj-0CS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5re-LQ-4Mq">
|
||||
@@ -1306,7 +1306,7 @@
|
||||
<rect key="frame" x="0.0" y="915" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="2rx-1W-kCF" id="tFj-Pb-1b2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Exploit" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tpd-rk-NGn">
|
||||
@@ -1319,36 +1319,57 @@
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="utS-Y2-9Wz">
|
||||
<rect key="frame" x="212" y="8" width="155" height="29"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="155" id="Cxx-Cw-epI"/>
|
||||
<constraint firstAttribute="height" constant="28" id="Fg1-aC-jDe"/>
|
||||
</constraints>
|
||||
<segments>
|
||||
<segment title="EL"/>
|
||||
<segment title="MP"/>
|
||||
<segment title="AW"/>
|
||||
<segment title="VS"/>
|
||||
<segment title="M1"/>
|
||||
<segment title="M2"/>
|
||||
</segments>
|
||||
<connections>
|
||||
<action selector="kernelExploitSegmentedControlValueChanged:" destination="fNC-SN-4Tk" eventType="valueChanged" id="tNs-i3-NIf"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="exploit" placeholder="exploit" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ATy-h0-ALy">
|
||||
<rect key="frame" x="279" y="10.333333333333336" width="76" height="23"/>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" name="RobotoMono-Regular" family="Roboto Mono" pointSize="17"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="utS-Y2-9Wz" secondAttribute="trailing" id="3Gu-be-kN9"/>
|
||||
<constraint firstItem="ATy-h0-ALy" firstAttribute="centerY" secondItem="tFj-Pb-1b2" secondAttribute="centerY" id="R7U-wA-sYi"/>
|
||||
<constraint firstItem="tpd-rk-NGn" firstAttribute="centerY" secondItem="tFj-Pb-1b2" secondAttribute="centerY" id="Vur-5P-ZM9"/>
|
||||
<constraint firstItem="tpd-rk-NGn" firstAttribute="leading" secondItem="tFj-Pb-1b2" secondAttribute="leading" constant="15" id="hDY-QE-pLn"/>
|
||||
<constraint firstItem="utS-Y2-9Wz" firstAttribute="centerY" secondItem="tFj-Pb-1b2" secondAttribute="centerY" id="z1Q-WZ-oSQ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ATy-h0-ALy" secondAttribute="trailing" constant="20" id="nWd-ec-MZS"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="Brr-iz-ROd">
|
||||
<rect key="frame" x="0.0" y="959" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Brr-iz-ROd" id="Fwg-RD-3jy">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Substitutor" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ffi-fg-qBW">
|
||||
<rect key="frame" x="14.999999999999993" y="11.333333333333336" width="112.33333333333331" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="8Xr-0g-9in"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="108" id="l5H-v9-8VZ"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="RobotoMono-Regular" family="Roboto Mono" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="substitutor" placeholder="exploit" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="M40-fy-KdS">
|
||||
<rect key="frame" x="238" y="10.333333333333336" width="117" height="23"/>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" name="RobotoMono-Regular" family="Roboto Mono" pointSize="17"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="M40-fy-KdS" secondAttribute="trailing" constant="20" id="7jr-uh-9fs"/>
|
||||
<constraint firstItem="Ffi-fg-qBW" firstAttribute="leading" secondItem="Fwg-RD-3jy" secondAttribute="leading" constant="15" id="UXd-jT-bPr"/>
|
||||
<constraint firstItem="M40-fy-KdS" firstAttribute="centerY" secondItem="Fwg-RD-3jy" secondAttribute="centerY" id="Yg2-ig-SON"/>
|
||||
<constraint firstItem="Ffi-fg-qBW" firstAttribute="centerY" secondItem="Fwg-RD-3jy" secondAttribute="centerY" id="pwe-Fc-BMz"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="rPc-2y-tM4">
|
||||
<rect key="frame" x="0.0" y="959" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1003" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="rPc-2y-tM4" id="L04-Pa-FuS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
@@ -1388,7 +1409,7 @@
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="zqK-az-X3i">
|
||||
<rect key="frame" x="0.0" y="1003" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1047" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="zqK-az-X3i" id="M6J-d1-iVA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
@@ -1425,7 +1446,7 @@
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="50K-ZT-rCL">
|
||||
<rect key="frame" x="0.0" y="1047" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1091" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="50K-ZT-rCL" id="VHZ-mu-KDn">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
@@ -1458,10 +1479,10 @@
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="KNH-Ue-vDj">
|
||||
<rect key="frame" x="0.0" y="1091" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1135" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KNH-Ue-vDj" id="ub8-hS-Yjb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Uptime" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TmA-aA-qbT">
|
||||
@@ -1495,10 +1516,10 @@
|
||||
<tableViewSection headerTitle="Utilities" footerTitle="PLACEHOLDER" id="mVJ-nV-a4v">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="Mlr-hr-tQG">
|
||||
<rect key="frame" x="0.0" y="1198.3333333333333" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1242.3333333333333" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Mlr-hr-tQG" id="Hgr-HX-5d0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HS8-A8-Kos">
|
||||
@@ -1519,10 +1540,10 @@
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="r8e-kx-aSd">
|
||||
<rect key="frame" x="0.0" y="1242.3333333333333" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1286.3333333333333" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="r8e-kx-aSd" id="Lqw-02-0KP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8U8-1D-Tj2">
|
||||
@@ -1543,10 +1564,10 @@
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="Y99-0P-KuE">
|
||||
<rect key="frame" x="0.0" y="1286.3333333333333" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1330.3333333333333" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Y99-0P-KuE" id="ZVO-er-yhw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MCD-u6-GW4">
|
||||
@@ -1567,10 +1588,10 @@
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="rmy-js-Gio">
|
||||
<rect key="frame" x="0.0" y="1330.3333333333333" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1374.3333333333333" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="rmy-js-Gio" id="maG-te-mhV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MpC-W0-1eR">
|
||||
@@ -1591,10 +1612,10 @@
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="XPg-DX-EHi">
|
||||
<rect key="frame" x="0.0" y="1374.3333333333333" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1418.3333333333333" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="XPg-DX-EHi" id="SGb-8j-4PJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hxh-hf-wUi">
|
||||
@@ -1615,10 +1636,10 @@
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="MaL-RH-Tez">
|
||||
<rect key="frame" x="0.0" y="1418.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1462.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="MaL-RH-Tez" id="wff-5C-BLY">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MKZ-Zb-eq1">
|
||||
@@ -1639,10 +1660,10 @@
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="ECF-KF-wHg">
|
||||
<rect key="frame" x="0.0" y="1462.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1506.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ECF-KF-wHg" id="QaO-Gh-4eX">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2He-sb-oZG">
|
||||
@@ -1663,10 +1684,10 @@
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="2TL-ze-Uh8">
|
||||
<rect key="frame" x="0.0" y="1506.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1550.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="2TL-ze-Uh8" id="onx-N9-2jJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XvB-ex-qh5">
|
||||
@@ -1701,6 +1722,8 @@
|
||||
<outlet property="autoRespringSwitch" destination="5re-LQ-4Mq" id="xRO-lw-fVb"/>
|
||||
<outlet property="bootNonceButton" destination="xim-1p-tCK" id="Wjn-eD-eeC"/>
|
||||
<outlet property="bootNonceTextField" destination="lf3-Mh-TY2" id="oyD-4L-cQB"/>
|
||||
<outlet property="codeSubstitutorLabel" destination="Ffi-fg-qBW" id="C9p-w2-CRy"/>
|
||||
<outlet property="codeSubstitutorTextField" destination="M40-fy-KdS" id="fcU-2Y-aj0"/>
|
||||
<outlet property="disableAppRevokesInfoButton" destination="697-8R-u3u" id="8PV-jI-rke"/>
|
||||
<outlet property="disableAppRevokesLabel" destination="Lop-s2-QoX" id="5Cc-Ky-Ghj"/>
|
||||
<outlet property="disableAppRevokesSwitch" destination="KkO-Ob-FBd" id="gfV-1K-Ske"/>
|
||||
@@ -1733,7 +1756,7 @@
|
||||
<outlet property="installSSHLabel" destination="Dhz-O8-Ohi" id="0IJ-EH-iXc"/>
|
||||
<outlet property="installSSHSwitch" destination="SJL-oV-WyH" id="2Sx-B2-ZaA"/>
|
||||
<outlet property="kernelExploitLabel" destination="tpd-rk-NGn" id="PJf-0x-p3M"/>
|
||||
<outlet property="kernelExploitSegmentedControl" destination="utS-Y2-9Wz" id="Dsu-lg-XLg"/>
|
||||
<outlet property="kernelExploitTextField" destination="ATy-h0-ALy" id="Kqc-nS-DcM"/>
|
||||
<outlet property="loadDaemonsInfoButton" destination="FEU-lh-5cs" id="oSX-Ub-TwV"/>
|
||||
<outlet property="loadDaemonsLabel" destination="bBi-OR-hpE" id="9oG-Vo-CpY"/>
|
||||
<outlet property="loadDaemonsSwitch" destination="F5r-kF-yjs" id="suE-SO-jWf"/>
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#ifdef __OBJC__
|
||||
#include <Foundation/Foundation.h>
|
||||
#define RAWLOG(str, args...) do { NSLog(@str, ##args); } while(false)
|
||||
#define localize(x) NSLocalizedString(x, @"")
|
||||
#define ADDRSTRING(val) [NSString stringWithFormat:@ADDR, val]
|
||||
#else
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
@@ -10,13 +10,23 @@
|
||||
#import "common.h"
|
||||
#import "utils.h"
|
||||
|
||||
@interface SettingsTableViewController : UITableViewController <UITextFieldDelegate>
|
||||
@interface SettingsTableViewController : UITableViewController <UITextFieldDelegate, UIPickerViewDataSource, UIPickerViewDelegate>
|
||||
@property (weak, nonatomic) IBOutlet UISwitch *tweakInjectionSwitch;
|
||||
@property (weak, nonatomic) IBOutlet UISwitch *loadDaemonsSwitch;
|
||||
@property (weak, nonatomic) IBOutlet UISwitch *dumpAPTicketSwitch;
|
||||
@property (weak, nonatomic) IBOutlet UISwitch *refreshIconCacheSwitch;
|
||||
@property (weak, nonatomic) IBOutlet UITextField *bootNonceTextField;
|
||||
@property (weak, nonatomic) IBOutlet UISegmentedControl *kernelExploitSegmentedControl;
|
||||
@property (weak, nonatomic) IBOutlet UITextField *kernelExploitTextField;
|
||||
@property (nonatomic) UIPickerView *kernelExploitPickerView;
|
||||
@property (nonatomic) NSMutableArray *exploitPickerArray;
|
||||
@property (nonatomic) NSMutableDictionary *availableExploits;
|
||||
@property (nonatomic) UIToolbar *exploitPickerToolbar;
|
||||
@property (weak, nonatomic) IBOutlet UITextField *codeSubstitutorTextField;
|
||||
@property (nonatomic) UIPickerView *codeSubstitutorPickerView;
|
||||
@property (nonatomic) NSMutableArray *substitutorPickerArray;
|
||||
@property (nonatomic) NSMutableDictionary *availableSubstitutors;
|
||||
@property (nonatomic) UIToolbar *substitutorPickerToolbar;
|
||||
@property (nonatomic) BOOL isPicking;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *restartButton;
|
||||
@property (weak, nonatomic) IBOutlet UISwitch *disableAutoUpdatesSwitch;
|
||||
@property (weak, nonatomic) IBOutlet UISwitch *disableAppRevokesSwitch;
|
||||
@@ -62,6 +72,7 @@
|
||||
@property (weak, nonatomic) IBOutlet UILabel *setCSDebuggedLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *autoRespringLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *kernelExploitLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *codeSubstitutorLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *bootNonceButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *ecidDarkModeButton;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *expiryDarkModeLabel;
|
||||
|
||||
@@ -50,9 +50,55 @@
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(lightModeSettings:) name:@"lightModeSettings" object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(dismissKeyboardFromDoneButton:) name:@"dismissKeyboard" object:nil];
|
||||
[self.bootNonceTextField setDelegate:self];
|
||||
[self.bootNonceTextField setAutocorrectionType:UITextAutocorrectionTypeNo];
|
||||
[self.kernelExploitTextField setDelegate:self];
|
||||
self.tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(userTappedAnyware:)];
|
||||
self.tap.cancelsTouchesInView = NO;
|
||||
[self.view addGestureRecognizer:self.tap];
|
||||
self.exploitPickerArray = [NSMutableArray new];
|
||||
self.availableExploits = [NSMutableDictionary new];
|
||||
for (size_t i = 0; exploit_infos[i]; i++) {
|
||||
if (exploit_infos[i]->exploit_capability != jailbreak_capability) {
|
||||
continue;
|
||||
}
|
||||
[_exploitPickerArray addObject:@(exploit_infos[i]->name)];
|
||||
if (!checkDeviceSupport(exploit_infos[i]->device_support_info)) {
|
||||
continue;
|
||||
}
|
||||
[_availableExploits addEntriesFromDictionary:@{@(exploit_infos[i]->name) : @(exploit_infos[i]->exploit)}];
|
||||
}
|
||||
self.substitutorPickerArray = [NSMutableArray new];
|
||||
self.availableSubstitutors = [NSMutableDictionary new];
|
||||
for (size_t i = 0; substitutor_infos[i]; i++) {
|
||||
[_substitutorPickerArray addObject:@(substitutor_infos[i]->name)];
|
||||
if (!checkDeviceSupport(substitutor_infos[i]->device_support_info)) {
|
||||
continue;
|
||||
}
|
||||
[_availableSubstitutors addEntriesFromDictionary:@{@(substitutor_infos[i]->name) : @(substitutor_infos[i]->substitutor)}];
|
||||
}
|
||||
self.kernelExploitPickerView = [[UIPickerView alloc] init];
|
||||
[self.kernelExploitPickerView setDataSource:self];
|
||||
[self.kernelExploitPickerView setDelegate:self];
|
||||
self.codeSubstitutorPickerView = [[UIPickerView alloc] init];
|
||||
[self.codeSubstitutorPickerView setDataSource:self];
|
||||
[self.codeSubstitutorPickerView setDelegate:self];
|
||||
[self.kernelExploitTextField setInputView:_kernelExploitPickerView];
|
||||
[self.codeSubstitutorTextField setInputView:_codeSubstitutorPickerView];
|
||||
self.exploitPickerToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 56)];
|
||||
[self.exploitPickerToolbar setBarStyle:UIBarStyleDefault];
|
||||
[self.exploitPickerToolbar sizeToFit];
|
||||
self.substitutorPickerToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 56)];
|
||||
[self.substitutorPickerToolbar setBarStyle:UIBarStyleDefault];
|
||||
[self.substitutorPickerToolbar sizeToFit];
|
||||
UIBarButtonItem *exploitPickerAlignRight = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil];
|
||||
UIBarButtonItem *exploitPickerDoneButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(exploitPickerDoneAction)];
|
||||
[self.exploitPickerToolbar setItems:[NSArray arrayWithObjects:exploitPickerAlignRight, exploitPickerDoneButtonItem, nil] animated:NO];
|
||||
[self.kernelExploitTextField setInputAccessoryView:_exploitPickerToolbar];
|
||||
UIBarButtonItem *substitutorPickerAlignRight = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil];
|
||||
UIBarButtonItem *substitutorPickerDoneButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(substitutorPickerDoneAction)];
|
||||
[self.substitutorPickerToolbar setItems:[NSArray arrayWithObjects:substitutorPickerAlignRight, substitutorPickerDoneButtonItem, nil] animated:NO];
|
||||
[self.codeSubstitutorTextField setInputAccessoryView:_substitutorPickerToolbar];
|
||||
self.isPicking = NO;
|
||||
}
|
||||
|
||||
-(void)dismissKeyboardFromDoneButton:(NSNotification *) notification {
|
||||
@@ -81,19 +127,25 @@
|
||||
[self.setCSDebuggedLabel setTextColor:[UIColor whiteColor]];
|
||||
[self.autoRespringLabel setTextColor:[UIColor whiteColor]];
|
||||
[self.kernelExploitLabel setTextColor:[UIColor whiteColor]];
|
||||
|
||||
[self.codeSubstitutorLabel setTextColor:[UIColor whiteColor]];
|
||||
[self.bootNonceButton setTitleColor:[UIColor whiteColor] forState:normal];
|
||||
[self.bootNonceTextField setTintColor:[UIColor whiteColor]];
|
||||
|
||||
[self.bootNonceTextField setTextColor:[UIColor whiteColor]];
|
||||
[self.kernelExploitTextField setTintColor:[UIColor whiteColor]];
|
||||
[self.codeSubstitutorTextField setTintColor:[UIColor whiteColor]];
|
||||
[self.bootNonceTextField setValue:[UIColor darkGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.kernelExploitTextField setValue:[UIColor darkGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.codeSubstitutorTextField setValue:[UIColor darkGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.ecidLabel setValue:[UIColor darkGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.ecidDarkModeButton setTitleColor:[UIColor whiteColor] forState:normal];
|
||||
|
||||
[self.expiryDarkModeLabel setTextColor:[UIColor whiteColor]];
|
||||
[self.expiryLabel setValue:[UIColor darkGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.uptimeLabel setValue:[UIColor darkGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.upTimeLabel setTextColor:[UIColor whiteColor]];
|
||||
|
||||
[self.exploitPickerToolbar setBarTintColor:[UIColor darkTextColor]];
|
||||
[self.substitutorPickerToolbar setBarTintColor:[UIColor darkTextColor]];
|
||||
[self.kernelExploitPickerView setBackgroundColor:[UIColor blackColor]];
|
||||
[self.codeSubstitutorPickerView setBackgroundColor:[UIColor blackColor]];
|
||||
[JailbreakViewController.sharedController.navigationController.navigationBar setLargeTitleTextAttributes:@{ NSForegroundColorAttributeName : [UIColor whiteColor] }];
|
||||
}
|
||||
|
||||
@@ -119,25 +171,33 @@
|
||||
[self.setCSDebuggedLabel setTextColor:[UIColor blackColor]];
|
||||
[self.autoRespringLabel setTextColor:[UIColor blackColor]];
|
||||
[self.kernelExploitLabel setTextColor:[UIColor blackColor]];
|
||||
|
||||
[self.codeSubstitutorLabel setTextColor:[UIColor blackColor]];
|
||||
[self.bootNonceButton setTitleColor:[UIColor blackColor] forState:normal];
|
||||
[self.bootNonceTextField setTintColor:[UIColor blackColor]];
|
||||
|
||||
[self.bootNonceTextField setTextColor:[UIColor blackColor]];
|
||||
[self.kernelExploitTextField setTintColor:[UIColor blackColor]];
|
||||
[self.codeSubstitutorTextField setTintColor:[UIColor blackColor]];
|
||||
[self.bootNonceTextField setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.kernelExploitTextField setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.codeSubstitutorTextField setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.ecidLabel setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.ecidDarkModeButton setTitleColor:[UIColor blackColor] forState:normal];
|
||||
|
||||
[self.expiryDarkModeLabel setTextColor:[UIColor blackColor]];
|
||||
[self.expiryLabel setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.uptimeLabel setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.upTimeLabel setTextColor:[UIColor blackColor]];
|
||||
|
||||
[self.exploitPickerToolbar setBarTintColor:[UIColor lightTextColor]];
|
||||
[self.substitutorPickerToolbar setBarTintColor:[UIColor lightTextColor]];
|
||||
[self.kernelExploitPickerView setBackgroundColor:[UIColor whiteColor]];
|
||||
[self.codeSubstitutorPickerView setBackgroundColor:[UIColor whiteColor]];
|
||||
[JailbreakViewController.sharedController.navigationController.navigationBar setLargeTitleTextAttributes:@{ NSForegroundColorAttributeName : [UIColor blackColor] }];
|
||||
}
|
||||
|
||||
- (void)userTappedAnyware:(UITapGestureRecognizer *) sender
|
||||
{
|
||||
[self.view endEditing:YES];
|
||||
if (!self.isPicking){
|
||||
[self.view endEditing:YES];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
|
||||
@@ -153,15 +213,22 @@
|
||||
[self.bootNonceTextField setPlaceholder:@(prefs->boot_nonce)];
|
||||
[self.bootNonceTextField setText:nil];
|
||||
[self.refreshIconCacheSwitch setOn:(BOOL)prefs->run_uicache];
|
||||
[self.kernelExploitSegmentedControl setSelectedSegmentIndex:(int)prefs->exploit];
|
||||
[self.disableAutoUpdatesSwitch setOn:(BOOL)prefs->disable_auto_updates];
|
||||
[self.disableAppRevokesSwitch setOn:(BOOL)prefs->disable_app_revokes];
|
||||
[self.kernelExploitSegmentedControl setEnabled:supportsExploit(empty_list_exploit) forSegmentAtIndex:empty_list_exploit];
|
||||
[self.kernelExploitSegmentedControl setEnabled:supportsExploit(multi_path_exploit) forSegmentAtIndex:multi_path_exploit];
|
||||
[self.kernelExploitSegmentedControl setEnabled:supportsExploit(async_wake_exploit) forSegmentAtIndex:async_wake_exploit];
|
||||
[self.kernelExploitSegmentedControl setEnabled:supportsExploit(voucher_swap_exploit) forSegmentAtIndex:voucher_swap_exploit];
|
||||
[self.kernelExploitSegmentedControl setEnabled:supportsExploit(mach_swap_exploit) forSegmentAtIndex:mach_swap_exploit];
|
||||
[self.kernelExploitSegmentedControl setEnabled:supportsExploit(mach_swap_2_exploit) forSegmentAtIndex:mach_swap_2_exploit];
|
||||
[self.kernelExploitTextField setText:nil];
|
||||
@try {
|
||||
[self.kernelExploitTextField setPlaceholder:[_exploitPickerArray objectAtIndex:(int)prefs->exploit]];
|
||||
} @catch (__unused NSException *exception) {
|
||||
[self.kernelExploitTextField setPlaceholder:localize(@"Unavailable")];
|
||||
[self.kernelExploitTextField setEnabled:NO];
|
||||
}
|
||||
[self.codeSubstitutorTextField setText:nil];
|
||||
@try {
|
||||
[self.codeSubstitutorTextField setPlaceholder:[_substitutorPickerArray objectAtIndex:(int)prefs->code_substitutor]];
|
||||
} @catch (__unused NSException *exception) {
|
||||
[self.codeSubstitutorTextField setPlaceholder:localize(@"Unavailable")];
|
||||
[self.codeSubstitutorTextField setEnabled:NO];
|
||||
}
|
||||
[self.openCydiaButton setEnabled:(BOOL)cydiaIsInstalled()];
|
||||
[self.expiryLabel setPlaceholder:[NSString stringWithFormat:@"%d %@", (int)[[SettingsTableViewController provisioningProfileAtPath:[[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"]][@"ExpirationDate"] timeIntervalSinceDate:[NSDate date]] / 86400, localize(@"Days")]];
|
||||
[self.overwriteBootNonceSwitch setOn:(BOOL)prefs->overwrite_boot_nonce];
|
||||
@@ -193,10 +260,8 @@
|
||||
}
|
||||
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)selectedSpecialThanks:(id)sender {
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"showSpecialThanks" object:self];
|
||||
@@ -250,11 +315,68 @@
|
||||
[self reloadData];
|
||||
}
|
||||
|
||||
- (IBAction)kernelExploitSegmentedControlValueChanged:(id)sender {
|
||||
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component {
|
||||
NSInteger count = 0;
|
||||
if (pickerView == _kernelExploitPickerView) {
|
||||
count = [self.availableExploits count];
|
||||
} else if (pickerView == _codeSubstitutorPickerView) {
|
||||
count = [self.availableSubstitutors count];
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component {
|
||||
NSString *title = nil;
|
||||
if (pickerView == _kernelExploitPickerView) {
|
||||
title = [[self.availableExploits allKeys] objectAtIndex:row];
|
||||
} else if (pickerView == _codeSubstitutorPickerView) {
|
||||
title = [[self.availableSubstitutors allKeys] objectAtIndex:row];
|
||||
}
|
||||
return title;
|
||||
}
|
||||
|
||||
- (NSAttributedString *)pickerView:(UIPickerView *)pickerView attributedTitleForRow:(NSInteger)row forComponent:(NSInteger)component {
|
||||
NSString *title = nil;
|
||||
if (pickerView == _kernelExploitPickerView) {
|
||||
title = [self.availableExploits.allKeys objectAtIndex:row];
|
||||
} else if (pickerView == _codeSubstitutorPickerView) {
|
||||
title = [self.availableSubstitutors.allKeys objectAtIndex:row];
|
||||
}
|
||||
if (title == nil) {
|
||||
return nil;
|
||||
}
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->exploit = (int)self.kernelExploitSegmentedControl.selectedSegmentIndex;
|
||||
NSDictionary *attributes = @{NSForegroundColorAttributeName : prefs->dark_mode ? [UIColor whiteColor] : [UIColor blackColor] };
|
||||
release_prefs(&prefs);
|
||||
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:title attributes:attributes];
|
||||
return attributedString;
|
||||
}
|
||||
|
||||
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
|
||||
self.isPicking = YES;
|
||||
}
|
||||
|
||||
- (void)exploitPickerDoneAction {
|
||||
self.isPicking = NO;
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->exploit = [[_availableExploits objectForKey:[[_availableExploits allKeys] objectAtIndex:[[self kernelExploitPickerView] selectedRowInComponent:0]]] intValue];
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
[[self kernelExploitTextField] resignFirstResponder];
|
||||
[self reloadData];
|
||||
}
|
||||
|
||||
- (void)substitutorPickerDoneAction {
|
||||
self.isPicking = NO;
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->code_substitutor = [[_availableSubstitutors objectForKey:[[_availableSubstitutors allKeys] objectAtIndex:[[self codeSubstitutorPickerView] selectedRowInComponent:0]]] intValue];
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
[[self codeSubstitutorTextField] resignFirstResponder];
|
||||
[self reloadData];
|
||||
}
|
||||
|
||||
@@ -652,7 +774,7 @@
|
||||
showAlert(localize(@"(Re)Install OpenSSH"),
|
||||
localize(@"Description:"
|
||||
"\n\n"
|
||||
"This option makess the jailbreak (re)install the openssh package."
|
||||
"This option makes the jailbreak (re)install the openssh package."
|
||||
"\n\n"
|
||||
"Compatibility:"
|
||||
"\n\n"
|
||||
|
||||
@@ -117,8 +117,8 @@ void jailbreak()
|
||||
kptr_t Shenanigans = KPTR_NULL;
|
||||
prefs_t *prefs = copy_prefs();
|
||||
bool needStrap = NO;
|
||||
bool needSubstrate = NO;
|
||||
bool skipSubstrate = NO;
|
||||
bool needSubstitutor = NO;
|
||||
bool skipSubstitutor = NO;
|
||||
NSString *const homeDirectory = NSHomeDirectory();
|
||||
NSString *const temporaryDirectory = NSTemporaryDirectory();
|
||||
NSMutableArray *debsToInstall = [NSMutableArray new];
|
||||
@@ -134,6 +134,7 @@ void jailbreak()
|
||||
const char *jailbreakDirectory = NSJailbreakDirectory.UTF8String;
|
||||
struct passwd *const root_pw = getpwnam("root");
|
||||
struct passwd *const mobile_pw = getpwnam("mobile");
|
||||
substitutor_info_t *substitutor = NULL;
|
||||
_assert(my_uid == mobile_pw->pw_uid, localize(@"Unable to verify my user id."), true);
|
||||
#define NSJailbreakFile(x) ([NSJailbreakDirectory stringByAppendingPathComponent:x])
|
||||
#define jailbreak_file(x) (NSJailbreakFile(@(x)).UTF8String)
|
||||
@@ -161,7 +162,7 @@ void jailbreak()
|
||||
progress(localize(@"Exploiting kernel..."));
|
||||
bool exploit_success = NO;
|
||||
myHost = mach_host_self();
|
||||
_assert(MACH_PORT_VALID(myHost), localize(NSLocalizedString(@"Unable to get host port.", nil)), true);
|
||||
_assert(MACH_PORT_VALID(myHost), localize(@"Unable to get host port."), true);
|
||||
myOriginalHost = myHost;
|
||||
if (restore_kernel_task_port(&tfp0) &&
|
||||
restore_kernel_base(&kernel_base, &kernel_slide) &&
|
||||
@@ -295,7 +296,6 @@ void jailbreak()
|
||||
setoffset(auth_ptrs, true);
|
||||
LOG("Detected authentication pointers.");
|
||||
pmap_load_trust_cache = _pmap_load_trust_cache;
|
||||
prefs->ssh_only = true;
|
||||
sync_prefs();
|
||||
}
|
||||
if (monolithic_kernel) {
|
||||
@@ -1018,7 +1018,7 @@ void jailbreak()
|
||||
_assert(ensure_directory("/usr/local/lib", root_pw->pw_uid, 0755), binpackMessage, true);
|
||||
_assert(ensure_directory("/usr/local/lib/zsh", root_pw->pw_uid, 0755), binpackMessage, true);
|
||||
_assert(ensure_directory("/usr/local/lib/zsh/5.0.8", root_pw->pw_uid, 0755), binpackMessage, true);
|
||||
_assert(ensure_symlink("/usr/local/lib/zsh/5.0.8/zsh", "/usr/local/lib/zsh/5.0.8/zsh"), binpackMessage, true);
|
||||
_assert(ensure_symlink(jailbreak_file("/usr/local/lib/zsh/5.0.8/zsh"), "/usr/local/lib/zsh/5.0.8/zsh"), binpackMessage, true);
|
||||
_assert(ensure_symlink(jailbreak_file("bin/zsh"), "/bin/zsh"), binpackMessage, true);
|
||||
_assert(ensure_symlink(jailbreak_file("etc/zshrc"), "/etc/zshrc"), binpackMessage, true);
|
||||
_assert(ensure_symlink(jailbreak_file("usr/share/terminfo"), "/usr/share/terminfo"), binpackMessage, true);
|
||||
@@ -1066,7 +1066,10 @@ void jailbreak()
|
||||
insertstatus(localize(@"Enabled SSH.\n"));
|
||||
}
|
||||
|
||||
if (auth_ptrs || prefs->ssh_only) {
|
||||
if (prefs->code_substitutor != -1) {
|
||||
substitutor = get_substitutor_info(prefs->code_substitutor);
|
||||
_assert(substitutor != NULL, localize(@"Unable to get substitutor info."), true);
|
||||
} else {
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -1085,21 +1088,21 @@ void jailbreak()
|
||||
// Make sure we have an apt packages cache
|
||||
_assert(ensureAptPkgLists(), localize(@"Unable to extract apt package lists."), true);
|
||||
|
||||
needSubstrate = ( needStrap ||
|
||||
(access("/usr/libexec/substrate", F_OK) != ERR_SUCCESS) ||
|
||||
!verifySums(@"/var/lib/dpkg/info/mobilesubstrate.md5sums", HASHTYPE_MD5)
|
||||
needSubstitutor = ( needStrap ||
|
||||
(access(substitutor->startup_executable, F_OK) != ERR_SUCCESS) ||
|
||||
!verifySums([NSString stringWithFormat:@"/var/lib/dpkg/info/%s.md5sums", substitutor->package_id], HASHTYPE_MD5)
|
||||
);
|
||||
if (needSubstrate) {
|
||||
LOG(@"We need substrate.");
|
||||
NSString *const substrateDeb = debForPkg(@"mobilesubstrate");
|
||||
_assert(substrateDeb != nil, localize(@"Unable to get deb for Substrate."), true);
|
||||
if (pidOfProcess("/usr/libexec/substrated") == 0) {
|
||||
_assert(extractDeb(substrateDeb, doInject), localize(@"Unable to extract Substrate."), true);
|
||||
if (needSubstitutor) {
|
||||
LOG(@"We need %s.", substitutor->name);
|
||||
NSString *const substitutorDeb = debForPkg(@(substitutor->package_id));
|
||||
_assert(substitutor != nil, localize(@"Unable to get deb for %s.", substitutor->name), true);
|
||||
if (pidOfProcess(substitutor->server_executable) == 0) {
|
||||
_assert(extractDeb(substitutorDeb, doInject), localize(@"Unable to extract %s.", substitutor->name), true);
|
||||
} else {
|
||||
skipSubstrate = YES;
|
||||
LOG("Substrate is running, not extracting again for now.");
|
||||
skipSubstitutor = YES;
|
||||
LOG("%s is running, not extracting again for now.", substitutor->name);
|
||||
}
|
||||
[debsToInstall addObject:substrateDeb];
|
||||
[debsToInstall addObject:substitutorDeb];
|
||||
}
|
||||
|
||||
NSArray *resourcesPkgs = resolveDepsForPkg(@"jailbreak-resources", true);
|
||||
@@ -1115,8 +1118,8 @@ void jailbreak()
|
||||
NSMutableArray *pkgsToRepair = [NSMutableArray new];
|
||||
LOG("Resource Pkgs: \"%@\".", resourcesPkgs);
|
||||
for (id pkg in resourcesPkgs) {
|
||||
// Ignore mobilesubstrate because we just handled that separately.
|
||||
if ([pkg isEqualToString:@"mobilesubstrate"] || [pkg isEqualToString:@"firmware"])
|
||||
// Ignore substitutor because we just handled that separately.
|
||||
if ([pkg isEqualToString:@(substitutor->package_id)] || [pkg isEqualToString:@"firmware"])
|
||||
continue;
|
||||
if (verifySums([NSString stringWithFormat:@"/var/lib/dpkg/info/%@.md5sums", pkg], HASHTYPE_MD5)) {
|
||||
LOG("Pkg \"%@\" verified.", pkg);
|
||||
@@ -1161,11 +1164,13 @@ void jailbreak()
|
||||
|
||||
progress(localize(@"Injecting trust cache..."));
|
||||
[resources addObjectsFromArray:[NSArray arrayWithContentsOfFile:@"/usr/share/jailbreak/injectme.plist"]];
|
||||
// If substrate is already running but was broken, skip injecting again
|
||||
if (!skipSubstrate) {
|
||||
[resources addObject:@"/usr/libexec/substrate"];
|
||||
// If substitutor is already running but was broken, skip injecting again
|
||||
if (!skipSubstitutor) {
|
||||
[resources addObject:@(substitutor->startup_executable)];
|
||||
}
|
||||
for (char **resource = substitutor->resources; *resource; resource++) {
|
||||
[resources addObject:@(*resource)];
|
||||
}
|
||||
[resources addObject:@"/usr/libexec/substrated"];
|
||||
for (id file in resources) {
|
||||
if (![toInjectToTrustCache containsObject:file]) {
|
||||
[toInjectToTrustCache addObject:file];
|
||||
@@ -1213,8 +1218,8 @@ void jailbreak()
|
||||
// Make sure this is a symlink - usually handled by ncurses pre-inst
|
||||
_assert(ensure_symlink("/usr/lib", "/usr/lib/_ncurses"), localize(@"Unable to repair ncurses."), true);
|
||||
|
||||
// This needs to be there for Substrate to work properly
|
||||
_assert(ensure_directory("/Library/Caches", root_pw->pw_uid, S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO), localize(@"Unable to repair caches directory for Substrate."), true);
|
||||
// This needs to be there for substitutor to work properly
|
||||
_assert(ensure_directory("/Library/Caches", root_pw->pw_uid, S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO), localize(@"Unable to repair caches directory for %s.", substitutor->name), true);
|
||||
LOG("Successfully repaired filesystem.");
|
||||
|
||||
insertstatus(localize(@"Repaired Filesystem.\n"));
|
||||
@@ -1223,30 +1228,30 @@ void jailbreak()
|
||||
upstage();
|
||||
|
||||
{
|
||||
// Load Substrate
|
||||
// Load substitutor
|
||||
|
||||
// Set Disable Loader.
|
||||
progress(localize(@"Setting Disable Loader..."));
|
||||
// Configure substitutor.
|
||||
progress(localize(@"Configuring %s...", substitutor->name));
|
||||
if (prefs->load_tweaks) {
|
||||
clean_file("/var/tmp/.substrated_disable_loader");
|
||||
clean_file(substitutor->loader_killswitch);
|
||||
} else {
|
||||
_assert(create_file("/var/tmp/.substrated_disable_loader", root_pw->pw_uid, 644), localize(@"Unable to disable Substrate's loader."), true);
|
||||
_assert(create_file(substitutor->loader_killswitch, root_pw->pw_uid, 644), localize(@"Unable to disable %s's loader.", substitutor->name), true);
|
||||
}
|
||||
LOG("Successfully set Disable Loader.");
|
||||
LOG("Successfully configured %s.", substitutor->name);
|
||||
|
||||
// Run substrate
|
||||
progress(localize(@"Starting Substrate..."));
|
||||
// Run substitutor
|
||||
progress(localize(@"Starting %s...", substitutor->name));
|
||||
if (access("/Library/substrate", F_OK) == ERR_SUCCESS &&
|
||||
is_directory("/Library/substrate") &&
|
||||
access("/usr/lib/substrate", F_OK) == ERR_SUCCESS &&
|
||||
is_symlink("/usr/lib/substrate")) {
|
||||
_assert(clean_file("/usr/lib/substrate"), localize(@"Unable to clean old substrate directory."), true);
|
||||
_assert([fileManager moveItemAtPath:@"/Library/substrate" toPath:@"/usr/lib/substrate" error:nil], localize(@"Unable to move substrate directory."), true);
|
||||
access(substitutor->bootstrap_tools, F_OK) == ERR_SUCCESS &&
|
||||
is_symlink(substitutor->bootstrap_tools)) {
|
||||
_assert(clean_file(substitutor->bootstrap_tools), localize(@"Unable to clean old %s bootstrap tools directory.", substitutor->name), true);
|
||||
_assert([fileManager moveItemAtPath:@"/Library/substrate" toPath:@(substitutor->bootstrap_tools) error:nil], localize(@"Unable to move %s bootstrap tools directory.", substitutor->name), true);
|
||||
}
|
||||
_assert(runCommand("/usr/libexec/substrate", NULL) == ERR_SUCCESS, localize(skipSubstrate?@"Unable to restart Substrate.":@"Unable to start Substrate."), skipSubstrate?false:true);
|
||||
LOG("Successfully started Substrate.");
|
||||
_assert(runCommand(substitutor->startup_executable, NULL) == ERR_SUCCESS, localize(@"Unable to %@ %s.", skipSubstitutor ? @"restart" : @"start", substitutor->name), skipSubstitutor?false:true);
|
||||
LOG("Successfully started %s.", substitutor->name);
|
||||
|
||||
insertstatus(localize(@"Loaded Substrate.\n"));
|
||||
insertstatus(localize(@"Loaded %s.\n", substitutor->name));
|
||||
}
|
||||
|
||||
upstage();
|
||||
@@ -1362,11 +1367,11 @@ void jailbreak()
|
||||
sync_prefs();
|
||||
}
|
||||
// Now that things are running, let's install the deb for the files we just extracted
|
||||
if (needSubstrate) {
|
||||
if (needSubstitutor) {
|
||||
if (pkgIsInstalled("com.ex.substitute")) {
|
||||
_assert(removePkg("com.ex.substitute", true), localize(@"Unable to remove Substitute."), true);
|
||||
}
|
||||
_assert(aptInstall(@[@"mobilesubstrate"]), localize(@"Unable to install Substrate."), true);
|
||||
_assert(aptInstall(@[@(substitutor->package_id)]), localize(@"Unable to install %s.", substitutor->name), true);
|
||||
}
|
||||
if (!betaFirmware) {
|
||||
if (pkgIsInstalled("com.parrotgeek.nobetaalert")) {
|
||||
@@ -1539,12 +1544,12 @@ void jailbreak()
|
||||
"do echo loading $a;"
|
||||
"launchctl load \"$a\" ;"
|
||||
"done; ");
|
||||
// Substrate is already running, no need to run it again
|
||||
system("for file in /etc/rc.d/*; do "
|
||||
"if [[ -x \"$file\" && \"$file\" != \"/etc/rc.d/substrate\" ]]; then "
|
||||
"\"$file\";"
|
||||
"fi;"
|
||||
"done");
|
||||
// Substitutor is already running, no need to run it again
|
||||
systemf("for file in /etc/rc.d/*; do "
|
||||
"if [[ -x \"$file\" && \"$file\" != \"%s\" ]]; then "
|
||||
"\"$file\";"
|
||||
"fi;"
|
||||
"done", substitutor->run_command);
|
||||
LOG("Successfully loaded Daemons.");
|
||||
|
||||
insertstatus(localize(@"Loaded Daemons.\n"));
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#define K_ENABLE_GET_TASK_ALLOW "DoEnableGetTaskAllow"
|
||||
#define K_SET_CS_DEBUGGED "SetCSDebugged"
|
||||
#define K_AUTO_RESPRING "AutoRespring"
|
||||
#define K_CODE_SUBSTITUTOR "CodeSubstitutor"
|
||||
|
||||
typedef struct {
|
||||
bool load_tweaks;
|
||||
@@ -60,6 +61,7 @@ typedef struct {
|
||||
bool auto_respring;
|
||||
bool dark_mode;
|
||||
int exploit;
|
||||
int code_substitutor;
|
||||
} prefs_t;
|
||||
|
||||
prefs_t *new_prefs(void);
|
||||
|
||||
@@ -65,6 +65,7 @@ bool load_prefs(prefs_t *prefs) {
|
||||
prefs->hide_log_window = (bool)[[userDefaults objectForKey:@K_HIDE_LOG_WINDOW inDomain:prefsFile] boolValue];
|
||||
prefs->auto_respring = (bool)[[userDefaults objectForKey:@K_AUTO_RESPRING inDomain:prefsFile] boolValue];
|
||||
prefs->dark_mode = (bool)[[userDefaults objectForKey:@K_DARK_MODE inDomain:prefsFile] boolValue];
|
||||
prefs->code_substitutor = (int)[[userDefaults objectForKey:@K_CODE_SUBSTITUTOR inDomain:prefsFile] intValue];
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -95,6 +96,7 @@ bool set_prefs(prefs_t *prefs) {
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->hide_log_window] forKey:@K_HIDE_LOG_WINDOW inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->auto_respring] forKey:@K_AUTO_RESPRING inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->dark_mode] forKey:@K_DARK_MODE inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithInt:(int)prefs->code_substitutor] forKey:@K_CODE_SUBSTITUTOR inDomain:prefsFile];
|
||||
[userDefaults synchronize];
|
||||
return true;
|
||||
}
|
||||
@@ -123,12 +125,28 @@ void register_default_prefs() {
|
||||
defaults[@K_AUTO_RESPRING] = @NO;
|
||||
defaults[@K_DARK_MODE] = @YES;
|
||||
defaults[@K_EXPLOIT] = [NSNumber numberWithInteger:recommendedJailbreakSupport()];
|
||||
defaults[@K_CODE_SUBSTITUTOR] = [NSNumber numberWithInteger:recommendedSubstitutorSupport()];
|
||||
[userDefaults registerDefaults:defaults];
|
||||
}
|
||||
|
||||
void repair_prefs() {
|
||||
prefs_t *prefs = copy_prefs();
|
||||
if (!supportsExploit(prefs->exploit)) prefs->exploit = (int)recommendedJailbreakSupport();
|
||||
if (prefs->exploit != -1) {
|
||||
exploit_info_t *exploit_info = get_exploit_info(prefs->exploit);
|
||||
if (exploit_info != NULL) {
|
||||
if (!checkDeviceSupport(exploit_info->device_support_info)) {
|
||||
prefs->exploit = (int)recommendedJailbreakSupport();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (prefs->code_substitutor != -1) {
|
||||
substitutor_info_t *substitutor_info = get_substitutor_info(prefs->code_substitutor);
|
||||
if (substitutor_info != NULL) {
|
||||
if (!checkDeviceSupport(substitutor_info->device_support_info)) {
|
||||
prefs->code_substitutor = (int)recommendedSubstitutorSupport();
|
||||
}
|
||||
}
|
||||
}
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#define _UTILS_H
|
||||
#import <sys/types.h>
|
||||
#import <sys/stat.h>
|
||||
#include <mach/machine.h>
|
||||
#import "ArchiveFile.h"
|
||||
|
||||
#define system(x) _system(x)
|
||||
@@ -32,6 +33,63 @@ typedef enum {
|
||||
kalloc_crash
|
||||
} exploit_t;
|
||||
|
||||
typedef enum {
|
||||
substrate_substitutor = 0,
|
||||
} substitutor_t;
|
||||
|
||||
typedef enum {
|
||||
jailbreak_capability = 0,
|
||||
respring_capability,
|
||||
reboot_capability
|
||||
} exploit_capability_t;
|
||||
|
||||
typedef enum {
|
||||
lowest_exploit_reliability = 0,
|
||||
low_exploit_reliability,
|
||||
middle_exploit_reliability,
|
||||
high_exploit_reliability,
|
||||
highest_exploit_reliability
|
||||
} exploit_reliability;
|
||||
|
||||
typedef struct {
|
||||
const char *min_kernel_version;
|
||||
const char *max_kernel_version;
|
||||
bool (^handler)(void);
|
||||
} device_support_info_t;
|
||||
|
||||
typedef struct {
|
||||
exploit_t exploit;
|
||||
const char *name;
|
||||
exploit_capability_t exploit_capability;
|
||||
exploit_reliability exploit_reliability;
|
||||
device_support_info_t device_support_info;
|
||||
} exploit_info_t;
|
||||
|
||||
typedef enum {
|
||||
lowest_substitutor_stability = 0,
|
||||
low_substitutor_stability,
|
||||
middle_substitutor_stability,
|
||||
high_substitutor_stability,
|
||||
highest_substitutor_stability
|
||||
} substitutor_stability;
|
||||
|
||||
typedef struct {
|
||||
substitutor_t substitutor;
|
||||
const char *name;
|
||||
const char *package_id;
|
||||
const char *startup_executable;
|
||||
const char *server_executable;
|
||||
const char *run_command;
|
||||
const char *loader_killswitch;
|
||||
const char *bootstrap_tools;
|
||||
substitutor_stability substitutor_stability;
|
||||
device_support_info_t device_support_info;
|
||||
char **resources;
|
||||
} substitutor_info_t;
|
||||
|
||||
extern exploit_info_t *exploit_infos[];
|
||||
extern substitutor_info_t *substitutor_infos[];
|
||||
|
||||
enum hashtype {
|
||||
HASHTYPE_MD5 = 0,
|
||||
HASHTYPE_SHA1
|
||||
@@ -126,11 +184,15 @@ bool machineNameContains(const char *string);
|
||||
bool multi_path_tcp_enabled(void);
|
||||
bool jailbreakEnabled(void);
|
||||
NSString *getKernelBuildVersion(void);
|
||||
bool supportsExploit(exploit_t exploit);
|
||||
exploit_info_t *get_exploit_info(exploit_t exploit);
|
||||
substitutor_info_t *get_substitutor_info(substitutor_t substitutor);
|
||||
bool checkDeviceSupport(device_support_info_t device_support);
|
||||
bool jailbreakSupported(void);
|
||||
bool substitutorSupported(void);
|
||||
bool respringSupported(void);
|
||||
bool restartSupported(void);
|
||||
NSInteger recommendedJailbreakSupport(void);
|
||||
NSInteger recommendedSubstitutorSupport(void);
|
||||
NSInteger recommendedRestartSupport(void);
|
||||
NSInteger recommendedRespringSupport(void);
|
||||
bool daemonIsLoaded(char *daemonID);
|
||||
@@ -167,6 +229,7 @@ void waitFor(int seconds);
|
||||
bool blockDomainWithName(const char *name);
|
||||
bool unblockDomainWithName(const char *name);
|
||||
bool cydiaIsInstalled(void);
|
||||
NSString *localize(NSString *str, ...);
|
||||
|
||||
extern NSData *lastSystemOutput;
|
||||
|
||||
|
||||
+312
-122
@@ -31,6 +31,149 @@ int logfd=-1;
|
||||
bool injectedToTrustCache = false;
|
||||
NSMutableArray *toInjectToTrustCache = nil;
|
||||
|
||||
exploit_info_t *exploit_infos[] = {
|
||||
&(exploit_info_t)
|
||||
{
|
||||
.exploit = empty_list_exploit,
|
||||
.name = "Empty List",
|
||||
.exploit_capability = jailbreak_capability,
|
||||
.exploit_reliability = lowest_exploit_reliability,
|
||||
.device_support_info.min_kernel_version = "4397.0.0.2.4~1",
|
||||
.device_support_info.max_kernel_version = "4570.60.19~25",
|
||||
.device_support_info.handler = NULL,
|
||||
},
|
||||
&(exploit_info_t)
|
||||
{
|
||||
.exploit = multi_path_exploit,
|
||||
.name = "Multi Path",
|
||||
.exploit_capability = jailbreak_capability,
|
||||
.exploit_reliability = low_exploit_reliability,
|
||||
.device_support_info.min_kernel_version = "4397.0.0.2.4~1",
|
||||
.device_support_info.max_kernel_version = "4570.52.2~8",
|
||||
.device_support_info.handler = ^bool (void) {
|
||||
if (!multi_path_tcp_enabled())
|
||||
return false;
|
||||
return true;
|
||||
},
|
||||
},
|
||||
&(exploit_info_t)
|
||||
{
|
||||
.exploit = async_wake_exploit,
|
||||
.name = "Async Wake",
|
||||
.exploit_capability = jailbreak_capability,
|
||||
.exploit_reliability = highest_exploit_reliability,
|
||||
.device_support_info.min_kernel_version = "4397.0.0.2.4~1",
|
||||
.device_support_info.max_kernel_version = "4570.20.62~4",
|
||||
.device_support_info.handler = NULL,
|
||||
},
|
||||
&(exploit_info_t)
|
||||
{
|
||||
.exploit = voucher_swap_exploit,
|
||||
.name = "Voucher Swap",
|
||||
.exploit_capability = jailbreak_capability,
|
||||
.exploit_reliability = high_exploit_reliability,
|
||||
.device_support_info.min_kernel_version = "4397.0.0.2.4~1",
|
||||
.device_support_info.max_kernel_version = "4903.240.8~8",
|
||||
.device_support_info.handler = ^bool (void) {
|
||||
if (get_kernel_page_size() != 0x4000)
|
||||
return false;
|
||||
else if (machineNameContains("iPad5,") && kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_12_0)
|
||||
return false;
|
||||
return true;
|
||||
},
|
||||
},
|
||||
&(exploit_info_t)
|
||||
{
|
||||
.exploit = mach_swap_exploit,
|
||||
.name = "Mach Swap",
|
||||
.exploit_capability = jailbreak_capability,
|
||||
.exploit_reliability = middle_exploit_reliability,
|
||||
.device_support_info.min_kernel_version = "4397.0.0.2.4~1",
|
||||
.device_support_info.max_kernel_version = "4903.240.8~8",
|
||||
.device_support_info.handler = ^bool (void) {
|
||||
if (get_kernel_page_size() != 0x1000 &&
|
||||
!machineNameContains("iPad5,") &&
|
||||
!machineNameContains("iPhone8,") &&
|
||||
!machineNameContains("iPad6,"))
|
||||
return false;
|
||||
return true;
|
||||
},
|
||||
},
|
||||
&(exploit_info_t)
|
||||
{
|
||||
.exploit = mach_swap_2_exploit,
|
||||
.name = "Mach Swap 2",
|
||||
.exploit_capability = jailbreak_capability,
|
||||
.exploit_reliability = middle_exploit_reliability,
|
||||
.device_support_info.min_kernel_version = "4397.0.0.2.4~1",
|
||||
.device_support_info.max_kernel_version = "4903.240.8~8",
|
||||
.device_support_info.handler = NULL,
|
||||
},
|
||||
&(exploit_info_t)
|
||||
{
|
||||
.exploit = deja_xnu_exploit,
|
||||
.name = "Deja XNU",
|
||||
.exploit_capability = respring_capability,
|
||||
.exploit_reliability = middle_exploit_reliability,
|
||||
.device_support_info.min_kernel_version = "4397.0.0.2.4~1",
|
||||
.device_support_info.max_kernel_version = "4570.70.24~9",
|
||||
.device_support_info.handler = ^bool (void) {
|
||||
if (jailbreakEnabled())
|
||||
return false;
|
||||
return true;
|
||||
},
|
||||
},
|
||||
&(exploit_info_t)
|
||||
{
|
||||
.exploit = necp_exploit,
|
||||
.name = "Necp",
|
||||
.exploit_capability = reboot_capability,
|
||||
.exploit_reliability = highest_exploit_reliability,
|
||||
.device_support_info.min_kernel_version = "4397.0.0.2.4~1",
|
||||
.device_support_info.max_kernel_version = "4570.70.24~9",
|
||||
.device_support_info.handler = NULL,
|
||||
},
|
||||
&(exploit_info_t)
|
||||
{
|
||||
.exploit = kalloc_crash,
|
||||
.name = "Kalloc Crash",
|
||||
.exploit_capability = reboot_capability,
|
||||
.exploit_reliability = high_exploit_reliability,
|
||||
.device_support_info.min_kernel_version = "4397.0.0.2.4~1",
|
||||
.device_support_info.max_kernel_version = "4903.252.2~2",
|
||||
.device_support_info.handler = NULL,
|
||||
},
|
||||
NULL,
|
||||
};
|
||||
|
||||
substitutor_info_t *substitutor_infos[] = {
|
||||
&(substitutor_info_t)
|
||||
{
|
||||
.substitutor = substrate_substitutor,
|
||||
.name = "Substrate",
|
||||
.package_id = "mobilesubstrate",
|
||||
.startup_executable = "/usr/libexec/substrate",
|
||||
.server_executable = "/usr/libexec/substrated",
|
||||
.run_command = "/etc/rc.d/substrate",
|
||||
.loader_killswitch = "/var/tmp/.substrated_disable_loader",
|
||||
.bootstrap_tools = "/usr/lib/substrate",
|
||||
.substitutor_stability = highest_substitutor_stability,
|
||||
.device_support_info.min_kernel_version = "4397.0.0.2.4~1",
|
||||
.device_support_info.max_kernel_version = "4903.240.8~8",
|
||||
.device_support_info.handler = ^bool (void) {
|
||||
if (machineNameContains("iPhone11,") || machineNameContains("iPad8,"))
|
||||
return false;
|
||||
return true;
|
||||
},
|
||||
.resources = (char **)&(const char*[]) {
|
||||
"/usr/libexec/substrate",
|
||||
"/usr/libexec/substrated",
|
||||
NULL,
|
||||
},
|
||||
},
|
||||
NULL,
|
||||
};
|
||||
|
||||
NSData *lastSystemOutput=nil;
|
||||
void injectDir(NSString *dir) {
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
@@ -782,150 +925,171 @@ NSString *getKernelBuildVersion() {
|
||||
return kernelBuild;
|
||||
}
|
||||
|
||||
bool supportsExploit(exploit_t exploit) {
|
||||
#ifdef CAN_HAS_UNSUPPORTED_EXPLOIT
|
||||
bool checkDeviceSupport(device_support_info_t device_support) {
|
||||
#ifdef CAN_HAS_UNSUPPORTED_DEVICE
|
||||
return true;
|
||||
#else /* !CAN_HAS_UNSUPPORTED_EXPLOIT */
|
||||
|
||||
NSString *minKernelBuildVersion = nil;
|
||||
NSString *maxKernelBuildVersion = nil;
|
||||
|
||||
switch (exploit) {
|
||||
case multi_path_exploit: {
|
||||
if (!multi_path_tcp_enabled()) {
|
||||
return false;
|
||||
}
|
||||
minKernelBuildVersion = @"4397.0.0.2.4~1";
|
||||
maxKernelBuildVersion = @"4570.52.2~8";
|
||||
break;
|
||||
}
|
||||
case voucher_swap_exploit: {
|
||||
if (get_kernel_page_size() != 0x4000) {
|
||||
return false;
|
||||
}
|
||||
if (machineNameContains("iPad5,") &&
|
||||
kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_12_0) {
|
||||
return false;
|
||||
}
|
||||
minKernelBuildVersion = @"4397.0.0.2.4~1";
|
||||
maxKernelBuildVersion = @"4903.240.8~8";
|
||||
break;
|
||||
}
|
||||
case mach_swap_exploit: {
|
||||
if (get_kernel_page_size() != 0x1000 &&
|
||||
!machineNameContains("iPad5,") &&
|
||||
!machineNameContains("iPhone8,") &&
|
||||
!machineNameContains("iPad6,")) {
|
||||
return false;
|
||||
}
|
||||
minKernelBuildVersion = @"4397.0.0.2.4~1";
|
||||
maxKernelBuildVersion = @"4903.240.8~8";
|
||||
break;
|
||||
}
|
||||
case mach_swap_2_exploit: {
|
||||
minKernelBuildVersion = @"4397.0.0.2.4~1";
|
||||
maxKernelBuildVersion = @"4903.240.8~8";
|
||||
break;
|
||||
}
|
||||
case deja_xnu_exploit: {
|
||||
if (jailbreakEnabled())
|
||||
return false;
|
||||
minKernelBuildVersion = @"4397.0.0.2.4~1";
|
||||
maxKernelBuildVersion = @"4570.70.24~9";
|
||||
break;
|
||||
}
|
||||
case empty_list_exploit: {
|
||||
minKernelBuildVersion = @"4397.0.0.2.4~1";
|
||||
maxKernelBuildVersion = @"4570.60.19~25";
|
||||
break;
|
||||
}
|
||||
case async_wake_exploit: {
|
||||
minKernelBuildVersion = @"4397.0.0.2.4~1";
|
||||
maxKernelBuildVersion = @"4570.20.62~4";
|
||||
break;
|
||||
}
|
||||
case necp_exploit: {
|
||||
minKernelBuildVersion = @"4397.0.0.2.4~1";
|
||||
maxKernelBuildVersion = @"4570.70.24~9";
|
||||
break;
|
||||
}
|
||||
case kalloc_crash: {
|
||||
minKernelBuildVersion = @"4397.0.0.2.4~1";
|
||||
maxKernelBuildVersion = @"4903.252.2~2";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (minKernelBuildVersion != nil && maxKernelBuildVersion != nil) {
|
||||
#else /* !CAN_HAS_UNSUPPORTED_DEVICE */
|
||||
if (device_support.min_kernel_version != NULL && device_support.max_kernel_version != NULL) {
|
||||
NSString *kernelBuildVersion = getKernelBuildVersion();
|
||||
if (kernelBuildVersion != nil) {
|
||||
if ([kernelBuildVersion compare:minKernelBuildVersion options:NSNumericSearch] != NSOrderedAscending && [kernelBuildVersion compare:maxKernelBuildVersion options:NSNumericSearch] != NSOrderedDescending) {
|
||||
return true;
|
||||
}
|
||||
if (kernelBuildVersion == nil) {
|
||||
return false;
|
||||
}
|
||||
if ([kernelBuildVersion compare:@(device_support.min_kernel_version) options:NSNumericSearch] == NSOrderedAscending || [kernelBuildVersion compare:@(device_support.max_kernel_version) options:NSNumericSearch] == NSOrderedDescending) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
#endif /* !CAN_HAS_UNSUPPORTED_EXPLOIT */
|
||||
if (device_support.handler != NULL) {
|
||||
if (!device_support.handler()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
#endif /* !CAN_HAS_UNSUPPORTED_DEVICE */
|
||||
}
|
||||
|
||||
bool jailbreakSupported() {
|
||||
return supportsExploit(empty_list_exploit) ||
|
||||
supportsExploit(multi_path_exploit) ||
|
||||
supportsExploit(async_wake_exploit) ||
|
||||
supportsExploit(voucher_swap_exploit) ||
|
||||
supportsExploit(mach_swap_exploit) ||
|
||||
supportsExploit(mach_swap_2_exploit);
|
||||
for (size_t i = 0; exploit_infos[i]; i++) {
|
||||
if (exploit_infos[i]->exploit_capability != jailbreak_capability) {
|
||||
continue;
|
||||
}
|
||||
if (!checkDeviceSupport(exploit_infos[i]->device_support_info)) {
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool substitutorSupported() {
|
||||
for (size_t i = 0; substitutor_infos[i]; i++) {
|
||||
if (!checkDeviceSupport(substitutor_infos[i]->device_support_info)) {
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool respringSupported() {
|
||||
return supportsExploit(deja_xnu_exploit);
|
||||
for (size_t i = 0; exploit_infos[i]; i++) {
|
||||
if (exploit_infos[i]->exploit_capability != respring_capability) {
|
||||
continue;
|
||||
}
|
||||
if (!checkDeviceSupport(exploit_infos[i]->device_support_info)) {
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool restartSupported() {
|
||||
return supportsExploit(necp_exploit) ||
|
||||
supportsExploit(voucher_swap_exploit) ||
|
||||
supportsExploit(kalloc_crash);
|
||||
for (size_t i = 0; exploit_infos[i]; i++) {
|
||||
if (exploit_infos[i]->exploit_capability != reboot_capability) {
|
||||
continue;
|
||||
}
|
||||
if (!checkDeviceSupport(exploit_infos[i]->device_support_info)) {
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
NSInteger recommendedJailbreakSupport() {
|
||||
if (supportsExploit(mach_swap_exploit))
|
||||
return mach_swap_exploit;
|
||||
else if (supportsExploit(async_wake_exploit))
|
||||
return async_wake_exploit;
|
||||
else if (supportsExploit(voucher_swap_exploit))
|
||||
return voucher_swap_exploit;
|
||||
else if (supportsExploit(mach_swap_2_exploit))
|
||||
return mach_swap_2_exploit;
|
||||
else if (supportsExploit(multi_path_exploit))
|
||||
return multi_path_exploit;
|
||||
else if (supportsExploit(empty_list_exploit))
|
||||
return empty_list_exploit;
|
||||
else
|
||||
return -1;
|
||||
NSInteger exploit = -1;
|
||||
exploit_info_t *exploit_info = NULL;
|
||||
for (size_t i = 0; exploit_infos[i]; i++) {
|
||||
if (exploit_infos[i]->exploit_capability != jailbreak_capability
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
if (!checkDeviceSupport(exploit_infos[i]->device_support_info)) {
|
||||
continue;
|
||||
}
|
||||
if (exploit_info == NULL) {
|
||||
exploit_info = exploit_infos[i];
|
||||
continue;
|
||||
}
|
||||
if (exploit_infos[i]->exploit_reliability > exploit_info->exploit_reliability) {
|
||||
exploit_info = exploit_infos[i];
|
||||
}
|
||||
}
|
||||
if (exploit_info != NULL) {
|
||||
exploit = (NSInteger)exploit_info->exploit;
|
||||
}
|
||||
return exploit;
|
||||
}
|
||||
|
||||
NSInteger recommendedSubstitutorSupport() {
|
||||
NSInteger substitutor = -1;
|
||||
substitutor_info_t *substitutor_info = NULL;
|
||||
for (size_t i = 0; substitutor_infos[i]; i++) {
|
||||
if (!checkDeviceSupport(substitutor_infos[i]->device_support_info)) {
|
||||
continue;
|
||||
}
|
||||
if (substitutor_info == NULL) {
|
||||
substitutor_info = substitutor_infos[i];
|
||||
continue;
|
||||
}
|
||||
if (substitutor_infos[i]->substitutor_stability > substitutor_info->substitutor_stability) {
|
||||
substitutor_info = substitutor_infos[i];
|
||||
}
|
||||
}
|
||||
if (substitutor_info != NULL) {
|
||||
substitutor = (NSInteger)substitutor_info->substitutor;
|
||||
}
|
||||
return substitutor;
|
||||
}
|
||||
|
||||
NSInteger recommendedRestartSupport() {
|
||||
if (supportsExploit(necp_exploit))
|
||||
return necp_exploit;
|
||||
else if (supportsExploit(voucher_swap_exploit))
|
||||
return voucher_swap_exploit;
|
||||
else if (supportsExploit(kalloc_crash))
|
||||
return kalloc_crash;
|
||||
else
|
||||
return -1;
|
||||
NSInteger exploit = -1;
|
||||
exploit_info_t *exploit_info = NULL;
|
||||
for (size_t i = 0; exploit_infos[i]; i++) {
|
||||
if (exploit_infos[i]->exploit_capability != reboot_capability
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
if (!checkDeviceSupport(exploit_infos[i]->device_support_info)) {
|
||||
continue;
|
||||
}
|
||||
if (exploit_info == NULL) {
|
||||
exploit_info = exploit_infos[i];
|
||||
continue;
|
||||
}
|
||||
if (exploit_infos[i]->exploit_reliability > exploit_info->exploit_reliability) {
|
||||
exploit_info = exploit_infos[i];
|
||||
}
|
||||
}
|
||||
if (exploit_info != NULL) {
|
||||
exploit = (NSInteger)exploit_info->exploit;
|
||||
}
|
||||
return exploit;
|
||||
}
|
||||
|
||||
NSInteger recommendedRespringSupport() {
|
||||
if (supportsExploit(deja_xnu_exploit))
|
||||
return deja_xnu_exploit;
|
||||
else
|
||||
return -1;
|
||||
NSInteger exploit = -1;
|
||||
exploit_info_t *exploit_info = NULL;
|
||||
for (size_t i = 0; exploit_infos[i]; i++) {
|
||||
if (exploit_infos[i]->exploit_capability != respring_capability
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
if (!checkDeviceSupport(exploit_infos[i]->device_support_info)) {
|
||||
continue;
|
||||
}
|
||||
if (exploit_info == NULL) {
|
||||
exploit_info = exploit_infos[i];
|
||||
continue;
|
||||
}
|
||||
if (exploit_infos[i]->exploit_reliability > exploit_info->exploit_reliability) {
|
||||
exploit_info = exploit_infos[i];
|
||||
}
|
||||
}
|
||||
if (exploit_info != NULL) {
|
||||
exploit = (NSInteger)exploit_info->exploit;
|
||||
}
|
||||
return exploit;
|
||||
}
|
||||
|
||||
bool daemonIsLoaded(char *daemonID) {
|
||||
@@ -1353,6 +1517,32 @@ bool cydiaIsInstalled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
NSString *localize(NSString *str, ...) {
|
||||
va_list ap;
|
||||
va_start(ap, str);
|
||||
NSString *str_to_localize = [[NSString alloc] initWithFormat:str arguments:ap];
|
||||
va_end(ap);
|
||||
return NSLocalizedString(str_to_localize, @"");
|
||||
}
|
||||
|
||||
exploit_info_t *get_exploit_info(exploit_t exploit) {
|
||||
for (size_t i = 0; exploit_infos[i]; ++i) {
|
||||
if (exploit_infos[i]->exploit == exploit) {
|
||||
return exploit_infos[i];
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
substitutor_info_t *get_substitutor_info(substitutor_t substitutor) {
|
||||
for (size_t i = 0; substitutor_infos[i]; ++i) {
|
||||
if (substitutor_infos[i]->substitutor == substitutor) {
|
||||
return substitutor_infos[i];
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
__attribute__((constructor))
|
||||
static void ctor() {
|
||||
toInjectToTrustCache = [NSMutableArray new];
|
||||
|
||||
Reference in New Issue
Block a user