use wooly_vault::challenge::select_and_start; use wooly_vault::vault::{Config, Vault}; #[tokio::main(flavor = "current_thread")] async fn main() -> anyhow::Result<()> { let _logger = libpt::log::Logger::builder() .set_level(libpt::log::Level::TRACE) .display_time(false) .build()?; println!("Input the secret and press enter"); let mut buf: String = String::new(); std::io::stdin().read_line(&mut buf)?; let secret = buf.trim(); let conf = Config::default(); let v = Vault::new(secret); println!("What challenge to serve?"); let i = select_challenge()?; select_and_start(i, conf, v).await?; Ok(()) } fn select_challenge() -> anyhow::Result { let mut buf: String = String::new(); std::io::stdin().read_line(&mut buf)?; Ok(buf.trim().parse()?) }