Skip to content

Commit

Permalink
exploit options
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfugil committed Jan 10, 2024
1 parent ddeff5a commit 6e9e3f7
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions usprebooter/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import SwiftUI

struct ContentView: View {
@State var LogItems: [String.SubSequence] = [""]

private let puaf_method_options = ["physpuppet", "smith", "landa"]
@AppStorage("puaf_method") private var puaf_method = 1.0
private let kwrite_method_options = ["kqueue_workloop_ctl", "sem_open"];
@AppStorage("kwrite_method") private var kwrite_method = 1.0;
private let kread_method_options = ["dup"," sem_open"];
@AppStorage("kread_method") private var kread_method = 1.0;
@AppStorage("headroom") var staticHeadroomMB: Double = 384.0
@AppStorage("pages") var pUaFPages: Double = 3072.0
@Binding var useNewUI: Bool
Expand All @@ -12,7 +17,7 @@ struct ContentView: View {
HStack {
Button("do the thing!") {
DispatchQueue.main.async {
do_kopen(UInt64(pUaFPages), 1, 1, 1, Int(staticHeadroomMB), true)
do_kopen(UInt64(pUaFPages), UInt64(puaf_method), UInt64(kread_method), UInt64(kwrite_method), Int(staticHeadroomMB), true)
fix_exploit()
go()
do_kclose()
Expand All @@ -31,6 +36,19 @@ struct ContentView: View {
Text("puaf pages: \(Int(pUaFPages))")
Slider(value: $pUaFPages, in: 16...4096, step: 16.0)
}
HStack {
Text("puaf method: \(puaf_method_options[Int(puaf_method)])")
Slider(value: $puaf_method, in: 0...Double(puaf_method_options.count-1), step: 1.0)
}
HStack {
Text("kread method: \(kread_method_options[Int(kread_method)])")
Slider(value: $kread_method, in: 0...Double(kread_method_options.count-1), step: 1.0)
}
HStack {
Text("kwrite method: \(kwrite_method_options[Int(kwrite_method)])")
Slider(value: $kwrite_method, in: 0...Double(kwrite_method_options.count-1), step: 1.0)
}

ScrollView {
ScrollViewReader { scroll in
VStack(alignment: .leading) {
Expand Down

0 comments on commit 6e9e3f7

Please sign in to comment.