mirror of
https://github.com/nab138/isideload.git
synced 2026-03-02 14:36:16 +01:00
Keep working on anisette
This commit is contained in:
@@ -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"] }
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user