use std::net::SocketAddr; use axum::{Form, Json, Router, routing::get}; use axum::extract::Query; use axum::response::Html; use axum::routing::post; use serde::{Deserialize, Serialize}; use kawari::config::Config; #[derive(Deserialize)] struct Params { lng: String, rgn: String, isft: String, cssmode: String, isnew: String, launchver: String } async fn top(Query(params): Query) -> Html<&'static str> { Html("
\r\n\t\r\n\t\t\r\n\t\t\n\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t
\r\n\r\n\t\t
\r\n\t\t\t\r\n\t\t\t\r\n\t\t
\r\n\t\r\n\t\t
\r\n\t\t\t\r\n\t\t\t\r\n\t\t
\r\n\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t\t\r\n\t\t
\r\n\t\t\r\n\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\r\n\t
\r\n\r\n\r\n\r\n\r\n") } #[derive(Deserialize, Debug)] #[allow(dead_code)] struct Input { _STORED_: String, sqexid: String, password: String, otppw: String } async fn login_send(Form(input): Form) -> Html<&'static str> { Html("window.external.user(\"login=auth,ok,sid,5b1548e2aa30bb9ef4cc9a4a690eb900cf0c801332149eeb227df7f8,terms,1,region,2,etmadd,0,playable,1,ps3pkg,0,maxex,4,product,1\");") } #[tokio::main] async fn main() { tracing_subscriber::fmt::init(); let app = Router::new() .route("/oauth/ffxivarr/login/top", get(top)) .route("/oauth/ffxivarr/login/login.send", post(login_send)); let addr = SocketAddr::from(([127, 0, 0, 1], 6700)); tracing::info!("Frontier server started on {}", addr); axum::Server::bind(&addr) .serve(app.into_make_service()) .await .unwrap(); }