basicinfo finalized
This commit is contained in:
parent
97821ec4ca
commit
478e943064
@ -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'`
|
||||
|
BIN
utils/encrypted_data.bin
Normal file
BIN
utils/encrypted_data.bin
Normal file
Binary file not shown.
0
utils/mine.bin
Normal file
0
utils/mine.bin
Normal file
BIN
utils/yours.bin
Normal file
BIN
utils/yours.bin
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user