Keep working on anisette

This commit is contained in:
nab138
2026-01-22 12:34:34 -05:00
parent f4687ac3be
commit 4e50c5c1d4
11 changed files with 534 additions and 123 deletions

View File

@@ -4,4 +4,6 @@ version = "0.1.0"
edition = "2024"
[dependencies]
isideload = { path = "../../isideload" }
isideload = { path = "../../isideload" }
env_logger = "0.11.8"
tokio = { version = "1.49.0", features = ["rt-multi-thread", "macros"] }

View File

@@ -1,10 +1,15 @@
use std::{env, path::PathBuf};
use isideload::auth::apple_account::AppleAccountBuilder;
use isideload::{
anisette::remote_v3::RemoteV3AnisetteProvider, auth::apple_account::AppleAccountBuilder,
};
#[tokio::main]
async fn main() {
env_logger::init();
fn main() {
let args: Vec<String> = env::args().collect();
let app_path = PathBuf::from(
let _app_path = PathBuf::from(
args.get(1)
.expect("Please provide the path to the app to install"),
);
@@ -13,8 +18,17 @@ fn main() {
.expect("Please provide the Apple ID to use for installation");
let apple_password = args.get(3).expect("Please provide the Apple ID password");
let account = AppleAccountBuilder::new(apple_id)
let get_2fa_code = || {
let mut code = String::new();
println!("Enter 2FA code:");
std::io::stdin().read_line(&mut code).unwrap();
Ok(code.trim().to_string())
};
let _account = AppleAccountBuilder::new(apple_id)
.danger_debug(true)
.build()
.anisette(RemoteV3AnisetteProvider::default().set_serial_number("2".to_string()))
.login(apple_password, get_2fa_code)
.await
.unwrap();
}