From 478e94306442425046a6ce2b408a4fa5557ce674 Mon Sep 17 00:00:00 2001 From: 641i130 <46945263+641i130@users.noreply.github.com> Date: Fri, 3 Nov 2023 17:10:13 -0500 Subject: [PATCH] basicinfo finalized --- utils/README.md | 20 ++++++++++++++++---- utils/encrypted_data.bin | Bin 0 -> 256 bytes utils/mine.bin | 0 utils/yours.bin | Bin 0 -> 256 bytes 4 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 utils/encrypted_data.bin create mode 100644 utils/mine.bin create mode 100644 utils/yours.bin diff --git a/utils/README.md b/utils/README.md index 6d9259d..866c1b7 100644 --- a/utils/README.md +++ b/utils/README.md @@ -1,19 +1,31 @@ # Utils -todo (add the missing ones) +todo (add the missing encrypted endpoints) --- # Encryption testing with curl and openssl ### `/basicinfo` request `curl -X POST http://data.nesys.jp/basicinfo -o encrypted_data.bin` + Decrypt: -`openssl rsautl -inkey pub_key.pem -pubin -in encrypted_data.bin -raw` + +`openssl rsautl -inkey public_key.pem -pubin -in encrypted_data.bin -raw` (it decrypts with public key and encrypts with private) +Oneliner: + +`curl -X POST http://10.3.0.141/basicinfo | openssl rsautl -inkey public_key.pem -pubin` + ### `/game/*` request `curl -X POST http://10.3.0.141/game -o aes.bin` + Decrypt: + (key and iv are `0123456789012345` in hex format for openssl) -`openssl enc -d -aes-128-cfb -in aes.bin -out lol.txt -K '303132333435363 -73839303132333435' -iv '30313233343536373839303132333435'` + +`openssl enc -d -aes-128-cfb -in aes.bin -out lol.txt -K '3031323334353637383930313233343536373839303132333435363738393031' -iv '30313233343536373839303132333435'` + +Oneliner: +`curl -X POST http://10.3.0.141/game | openssl enc -d -aes-128-cfb -K '30313233343536373839303132333435' -iv '3031323334353637383930313 +2333435'` diff --git a/utils/encrypted_data.bin b/utils/encrypted_data.bin new file mode 100644 index 0000000000000000000000000000000000000000..27d72854d968ef63abc6d815b3da77475ceb370f GIT binary patch literal 256 zcmV+b0ssEE;6sYIvJfF7NnAJOD2`5d)5y!ZvLmNyO;NoNdfLR)b)gOQ7$%HWS)5)I z)Iah{oI$o6$!koR0d0p@%&+;r#q7o9#9(aeiX5d5l^FZy5=I9C)=5k+ge1;)foQb> z*AVzK0E8zuHt*fsF`_{Ar`a30EtwFqO*)^njs-q*n`@HUmGgwP?y$(e3f#NO2rL;OG!MP-!;_9{qZ54R`$J z*AVzK0E8zuHt*fsF`_{Ar`a30EtwFqO*)^njs-q*n`@HUmGgwP?y$(e3f#NO2rL;OG!MP-!;_9{qZ54R`$J