From 4693342cc766b9d6c2378bfc36b0b3bb9a6b8ca4 Mon Sep 17 00:00:00 2001 From: caret Date: Tue, 27 Jun 2023 22:37:11 -0500 Subject: [PATCH] idk --- certs/test/nesica1.crt | 27 +++++++++++++++++++++++++++ certs/test/nesica1.key | 31 +++++++++++++++++++++++++++++++ certs/test/nesica1.pfx | Bin 0 -> 2463 bytes certs/test/nesys.crt | 25 +++++++++++++++++++++++++ certs/test/nesys.key | 31 +++++++++++++++++++++++++++++++ certs/test/nesys.pfx | Bin 0 -> 2359 bytes certs/test/root.crt | 25 +++++++++++++++++++++++++ certs/test/root.key | 31 +++++++++++++++++++++++++++++++ certs/test/root.pfx | Bin 0 -> 2377 bytes src/main.rs | 33 ++++++++++++++++++--------------- 10 files changed, 188 insertions(+), 15 deletions(-) create mode 100644 certs/test/nesica1.crt create mode 100644 certs/test/nesica1.key create mode 100644 certs/test/nesica1.pfx create mode 100644 certs/test/nesys.crt create mode 100644 certs/test/nesys.key create mode 100644 certs/test/nesys.pfx create mode 100644 certs/test/root.crt create mode 100644 certs/test/root.key create mode 100644 certs/test/root.pfx diff --git a/certs/test/nesica1.crt b/certs/test/nesica1.crt new file mode 100644 index 0000000..2a2bb9d --- /dev/null +++ b/certs/test/nesica1.crt @@ -0,0 +1,27 @@ +Bag Attributes + localKeyID: 31 77 24 59 11 3A 84 C4 65 93 75 DE B7 EE 5A 89 6A B3 41 DA +subject=C = JP, ST = A, L = A, CN = nesica1 +issuer=C = JP, ST = A, L = A, CN = nesys +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIUfH7CYtnS909tjCJmn3h+9oqsLzUwDQYJKoZIhvcNAQEL +BQAwNTELMAkGA1UEBhMCSlAxCjAIBgNVBAgMAUExCjAIBgNVBAcMAUExDjAMBgNV +BAMMBW5lc3lzMB4XDTIzMDYwNTAwMDc1OVoXDTMzMDYwMjAwMDc1OVowNzELMAkG +A1UEBhMCSlAxCjAIBgNVBAgMAUExCjAIBgNVBAcMAUExED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CXcWtI +-----END CERTIFICATE----- diff --git a/certs/test/nesica1.key b/certs/test/nesica1.key new file mode 100644 index 0000000..962bbc0 --- /dev/null +++ b/certs/test/nesica1.key @@ -0,0 +1,31 @@ +Bag Attributes + localKeyID: 31 77 24 59 11 3A 84 C4 65 93 75 DE B7 EE 5A 89 6A B3 41 DA +Key Attributes: +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDCX+/yIAFz9Tpe +yQxwb3YYL+9Ngfedmxil7U3HZcpDR+2ysNtmdMTIVzQhz+ql7y3BJ+CSriEvDotu +hRp15RFANcqf5JoolZ9m3a6BZZkQrjBZqCD7UOTExf11WKLq05N0Nr0EKoGRn4PQ +F04mW/3zjpx3M53EbOAVq5bstGyClrTWItvHpzuJ3doCLotTUOKW+b6B5WPnjkPB +uR9BkMa9Ru1ZlQqxkEVxAqLdNSOLVisTASZ91ZmLhQM7klOSfMbO/6tWV2ZKgQ02 +Cdjt7tEYKakGfmT21YT3q2f/2FF9TyarX9nma4RLnoNwt+GlH8bZFukr/Nkk2sf1 +jRZkYecdAgMBAAECggEAFW7Tu/yYfGtVgN8lbn5z5K3gcsj6f1f7S0yT74FDYNDd +Hn+O6cjFbBvlhTbydlKd1ncptbLauOAfMtQde1ODZ/OmgKQJ9aCt/39BP0ZvLt4u +Oaym2l9sol/8l0RrTn5++2kPxZZUTDTtKXRwax1orsMScLhx1Jd2zBzsGvS4JFv9 +anPRESNQK1c8I1ZBZH4372KjkKH4lsKURrX/Uf4Vxz7jz60zw0NEVNefewfmmz1f +fEd7F1He3Hb82r/n7diieUmrDiQnE4GwV8lsrtu8lss++89G2RtVOMlJ51uD+qOm +ToOCsRylFO8cLQ+0BsLHNKQsRXz7AtYMk+jn/W/L4QKBgQD2nfmu9P6ghaeP70YJ +HdFiUDDNzxDAs81Uj5Pty66pR05NIf1BSXwqZh8dmXI3kYOZohwaFMQOBWUwlXvi +vbpblnh8hiMvXxTgb1xPx+kEGSnkCLbiEjOEgMc7/s2iKXX/qH0Nw2NPTf44bKsr +juxxNthzSqGKulO8uyrrJ97NTQKBgQDJxSCH2XbpLThYQlQfRn+J/z29IKpC2u/R +e0nf9xmU0HDtfqxM0UXEtSBDZ2K4SRrT1w/mWmdkObw7O7JXMSnrevsL5A1qkFpO +6LrNtDRVZk4DjNo1z+KNc88WUZVu79IazTAWfWzX0dn/Khm+oB4ds0UkJhKUFhJf +xY1EZNDZEQKBgCSICjBsgjttEQE1RH6dOCMEFfamsaiZ+dSI4DTdcyYINgUe/9Dn +/ciaEAnmbRDmMURUyyzh3pjlG7QysINJ740ZoQdxJ00hHIqSdG4tAstkntv0noKm +h5MdMGYmvHdFBQG2B7A+PTvGJd5d2o09QrESmsWZTIysRTMz1ou3AD4RAoGBAJQH +7m/82kMFDDuknjc778J84vzpBEF8g0o7m92XWstViiSUNTE+sGM7R+pr5X+zEt2t +AVtNpGFiAnmquJND3K+JULpOnJE8SyVtle/pcCPfpQjxw/6LAHorJxoGzQ3RIWLM +e6VkbACDU97jMnQq4S2FIwr8a9D9yIk/VP+Cv78hAoGBAOGJ1LJhj9pMZeY4kmAA +L4qujX55bzs9Lk/+zKwE5RlwDpFzXzSXXHnWZeEyOb6ENyOnUpwT5gRyJFKidD1h +gtEx0PWclBbrf84Tz1GRurVmb+FuRe5la+aLb5Otdudnc+mggNGFoAOZMU8mQtoQ +s/bVTFKdN0+vYR18OTu3nGQg +-----END PRIVATE KEY----- diff --git a/certs/test/nesica1.pfx b/certs/test/nesica1.pfx new file mode 100644 index 0000000000000000000000000000000000000000..7f1294b91a1a281bdc11b094587929eafc6133db GIT binary patch literal 2463 zcma)6c|6oxAD*4Dj9n99ELkspgCR>ry28sOYl9YKjV#SXvdzz0mdKK^WV_QXB8*G4 z*=j=8QkJ*LF2)jFkuKix-rnl{@BVQ<=RD8(p68s;dCqwN5SEAUYlaqNyA@5&#i8|2Ku$j{p&}99oLg_M&*dt>WW>!iz!pH~_-mp?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1iDNDKfTw +Tq075hBAGeVMY2y8dYvX84wLvp9b/rUZOyM4TCvZgRsiNY6qXuIczHmh9IyASBlc +TI9oxfEpJa0h+ySa/Cnb3+OwRqdYjugbGhRiGloegQKBgQDwCZ60u3KstNw3eIcC +1D/G1ZbzegzPtfJCzDIM+JQ5pIHBLiqi+OfPkOzKCD1oFxSeXg+p/2giPBiGfUyD +cWBiB3r3mGvB+khpXJG02dM8JuQ5egSZHOguIaKRzQVDN49TjED9SNSAleXbFPo0 +kOag3tAgd4LA+iE1JL5f54dRQQKBgQDWUtjWE3ZtPZlz8HmVif+GUJFZnlW7K3R3 +lJlM9ISWz4ebzrrk5pgwZRVAbzgXGPcPLZEDS7BtyuwpWZ0e4+C5/QBGdywZVpHA +s9xKIWBAZsU8NBdZwNzF8wmutNo5cszqaNDRL7DTLsEgNTUOZ1xz789vvZhB/hFc +Y4wTLlHVZQKBgQCAyQiHe1LJargEYvw8/lfBfHNi6obZIot6X0gzQWN1kde0J+rk +SZtF+EGzG7ymjkuXtGu/D7N1Or0F21Aj7b6CmfTVxsd56ajULsBWQdBdo5grZlX1 +OFcx+QXaKB+8sqCJeOSdgGfTHZmXc6fScDPs996+rKBQnWMXukER/4zQgQKBgDsI +7vlouwI0KYSqBJOQQ3Y30xGgb3Ty703Q/LkZ0TvJRk1AkHJkoh8SeNwaxpR2J/di +UcNaoepcLtjk+kZ79nbEncLLKLaCBfvSjydMMjsLE+EVaCks2qMb4trgrguM96zJ +2lsEi+xfwIqinU6uYeT9dWIOE1Z6KUYNlZPi+l+RAoGBAL+0ATjUn3qV4Buo8frN +RuXqwIpYBPOHLVQHoEhDLdOiTvM0vElFnLq0Hq7wmuVSiiVbKSlsEZbQHRZlaChp +32YDqVxUYGEj5XnpBiCq3DTLru7Wr8r0njvKiBMNLOPPbtHukHnJFZL3gDTo96Ey +js/euYOMeKilOMkIURCKhw4P +-----END PRIVATE KEY----- diff --git a/certs/test/nesys.pfx b/certs/test/nesys.pfx new file mode 100644 index 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g +y3l0SY1Sl7Ax0ZH+uZVb9E/BSIytkcp6AbcGgIRvAISHO7bGiUORO8BBFkHmxuYG +xbK01G+eU/ZsrBbpjeDrehHY +-----END PRIVATE KEY----- diff --git a/certs/test/root.pfx b/certs/test/root.pfx new file mode 100644 index 0000000000000000000000000000000000000000..73ed66d188966b4a76a9db70af65b872afd24dda GIT binary patch literal 2377 zcmb_cX*ksF8aJCU82b_>gGfYwyU`g;$(FV3Qe+z%lq``je==nauO(ErNDSHcrSRGd z)seAJWX&-mvb^4LU7fDZb)66A!})Mu&wc;y?RxI#`P~4Bx&Vd101&0gjFO4ckJ>^* zkdSN;bp{TiWEt>D0EA8chYR)&4#N5va2G?`nc043v9m&8*&r;20g{%cW^KX=I$;7Iz(7)WxZHNQL!;N~aY(`j8f{i{tN#)my^HeB$Sd357rjv@z zz35w#LdedfhW2Y>CQ@JCd^J-3=c;UvS7njDT5*<{Td=G9v*9Sa1x#V?oM?xpo+=#Y zLhR4G#pYq7toSOc+T1L9kN7gBRr!3_Qa;U$|EnVk@6F?k_14(h5B-oZ9|53N%rOrO z&kP=nPhY2%7?jqO5z_E>=?>IZD>;3R*NOw9e-&*|FN>A8WY4Vh{iv|F=4!vw{1}Fd z8?L6Do+C9R%o;>5oDU*&>-0U@3~U;O8(Xm(1<|SDlx|BC!oo)=48jD-y9}5EB8(>! z;eZRk`2wtWmBRJ+&dssG$CBTob2`5-&jX@|ZVC7iKp_0T2XGz+@IoL5a0CEj9KVm9 z@pl+whcKxIVU0%vw=1!y5|Q;SmC>BEIa6}l2-Mp!p(oVWWsJ367qfp-bAEBML6Gjr zwt%?|cxV35AjS#I_SUMBx;CwP9np^OLYtraS0o6&9DFJQmX4m1nYThfJMr&L zi=_S!m>%fOGxKhjj>czbELxcASSY8ompHVf>r0$$q~lNcHtT#fcM7<;ypLK;zbBd< zwR>ZdOZt1ISE{y;{jv`WdJb2sa=ERi4Hk7?w>9xgWH3r|b2M2uB3*eh|Aeq(#2gsk zFF;g~1SEbj3dOI$7;yp9UlomOyoFdF(chD)nUYi=U<{;@3 zQjrN_)5DN}m3Y~c5MW>V(RhxbMbWECGSY15Nr8Ko!jCj;t#mkd3 z@;3XmRY;b*N?#wUF|%s7It^MdV{*SKHbICp)}3^nWasIZWWB+2uq^eyi+katd2bmn z=wPZWC4FsD)jvbJ?-F$8$G#|1x6ifYnmT)kN+%adK@7Pjkb;m*pOC6D3kepSSG_g| zPM^h;ikUyp=dce>_+~jrio=Ra1kjuZFO4s0N6~IYIYg(_6nP$%I9qnAP2zleMjR{e zLj?zS&N>8(MZH=^Kel78%3pV457$M}c%V@_eOd^XXUfH2Anm>vaxQmMWZj3&pAE9AJYe)-);ADO z;!vl2YiV0n!+zQr?qaXb@K!X=S<?WOi z#v9x*B14oZ!-XWXJ2kVcx5-pTTPdqn99y`XvZx_GTriXPbi-ga$M#j3enm6+=$-OA`Khhc0^R$-vlWfz^Ly}IUkWqF zfDvbcM}XI7rDI)`^?vj&o-|GuyXp#gCq|=7>gS7yQ)Xhf*QT|+Ew@@HN7r3_ro@|t zn|!tR%l#(SX-3?cVR=lkEv-BF9^~X}(}BUJXtBA89bJ9G_Eco2?uT1dvd2vN7X6#@ zY2GILpB5yLTBrimALno*6SeotFI8Gb(HhXna_|7At63**TbCLn;SLf+?_L)D=+5Wq zeUJM=`zPVlB(uA(LoF)QHJ5{0`KUAY(+KRoFZN`v&w7mCMU_EN+OTc4(k4L>zdncs z*<))K9zl7lGbieckL764bJzZ%&oMShpp2GiS4e+}?hc)*B6L3XTh5xEe9%j5V&P0H R>=>VJaB$Zb&io&j=-;wU26zAf literal 0 HcmV?d00001 diff --git a/src/main.rs b/src/main.rs index 02f2927..f753a62 100755 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,3 @@ -//! Restart PC and see if installed certs work -//! get rid of HTTP cert issue in access logs #![allow(unused_variables)] #![allow(non_snake_case)] #![allow(dead_code)] @@ -26,6 +24,7 @@ use md5::{Digest, Md5}; #[post("/basicinfo")] async fn basicinfo() -> HttpResponse { + println!("/basicinfo\nNot fully implemented!"); /* let pem = "-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy63nybDg2d0l5Em5RTsx @@ -62,49 +61,51 @@ async fn basicinfo() -> HttpResponse { #[macro_export] macro_rules! resp { ($str:expr) => { - HttpResponse::Ok().append_header(ContentType(mime::TEXT_PLAIN)).body($str) - //HttpResponse::Ok().append_header(ContentType::octet_stream()).body($str) + //HttpResponse::Ok().append_header(ContentType(mime::TEXT_HTML)).body($str) + HttpResponse::Ok().append_header(ContentType::octet_stream()).body($str) }; } #[get("/alive/{id}/Alive.txt")] async fn alive(id: web::Path, req: actix_web::HttpRequest) -> HttpResponse { - println!("---"); - println!("Method: {:?}", req.method()); - println!("Host: {:?}", req.head().uri.host()); - println!("Path: {:?}", req.path()); - println!("/alive/{}/Alive.txt", id); resp!("") } #[get("/alive/i.php")] async fn alive_i() -> HttpResponse { + println!("/alive/i.php"); resp!("REMOTE ADDRESS:10.3.0.53\nSERVER NAME:LLSIFAC\nSERVER ADDR:10.3.0.53") } #[post("/service/card/incomALL.php")] async fn incomALL() -> HttpResponse { + println!("/service/card/incomALL.php"); resp!("1+1") } #[post("/service/respone/respone.php")] async fn respone() -> HttpResponse { + println!("____________________________"); + println!("/service/respone/respone.php"); resp!("1") } #[get("/server/FireAlert.php")] async fn fire_alert() -> HttpResponse { + println!("/server/FireAlert.php"); resp!("OK") } #[get("/server/cursel.php")] async fn cursel() -> HttpResponse { + println!("/server/cursel.php"); resp!("1\n") } #[get("/server/gameinfo.php")] async fn gameinfo() -> HttpResponse { + println!("/server/gameinfo.php"); resp!("0\n3\n301000,test1\n302000,test2\n303000,test3\n") } #[post("/game/info")] @@ -121,6 +122,7 @@ async fn game_info() -> HttpResponse { Aes128CfbEnc::new(key.into(), iv.into()).encrypt(&mut ciphertext); //println!("{:?}", String::from_utf8_lossy(&ciphertext)); + println!("/game/info"); HttpResponse::Ok().append_header(ContentType::octet_stream()).body(ciphertext) } @@ -135,16 +137,16 @@ pub struct Certify { #[get("/server/certify.php")] async fn certify(data: web::Query, req: HttpRequest) -> HttpResponse { - println!("Certify!"); + println!("/server/certify.php"); dbg!(&data); let mut hasher = Md5::new(); let gid_bytes = "303801".as_bytes(); // LL game nesys id hasher.update(gid_bytes); let hash_result = hasher.finalize(); + let mut ticket = String::new(); for byte in hash_result { - print!("{:x?}", &byte); + ticket.push_str(&format!("{:x?}", &byte)); } - println!(""); let res = format!( "host=http://10.3.0.53 no=1337 @@ -156,6 +158,7 @@ x-img=http://10.3.0.53/test.png x-ranking=http://10.3.0.53/ranking/ranking.php ticket=9251859b560b33b031516d05c2ef3c28" ); + println!("Response:\n{}", &res); resp!(res) } @@ -178,8 +181,8 @@ fn load_rustls_config() -> rustls::ServerConfig { let config = ServerConfig::builder().with_safe_defaults().with_no_client_auth(); // load TLS key/cert files - let cert_file = &mut BufReader::new(File::open("./certs/nesica1.crt").expect("Certificate not found!")); - let key_file = &mut BufReader::new(File::open("./certs/nesica1.key").expect("Key not found!")); + let cert_file = &mut BufReader::new(File::open("./certs/test/nesica1.crt").expect("Certificate not found!")); + let key_file = &mut BufReader::new(File::open("./certs/test/nesica1.key").expect("Key not found!")); // convert files to key/cert objects let cert_chain = certs(cert_file).unwrap().into_iter().map(Certificate).collect(); @@ -196,7 +199,7 @@ fn load_rustls_config() -> rustls::ServerConfig { #[actix_web::main] async fn main() -> std::io::Result<()> { - env_logger::init_from_env(env_logger::Env::new().default_filter_or("info")); + //env_logger::init_from_env(env_logger::Env::new().default_filter_or("info")); let config = load_rustls_config(); info!("Certificates loaded."); println!("Started!");