Skip to content

Commit

Permalink
Merge pull request #5 from eseiler/misc/beautified_lipsum
Browse files Browse the repository at this point in the history
[MISC] beautify lipsum
  • Loading branch information
eseiler authored Feb 23, 2024
2 parents e3395a5 + 1d8deae commit f54c9b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 941 deletions.
6 changes: 5 additions & 1 deletion create_scavenger_hunt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ echo "less, head, tail" >> ${PATH_LEVEL_3}/README.txt

# Level 5
PASSWORD5="needle"
awk -v new_word=" password:${PASSWORD5}" 'NR==512 {gsub(substr($0, 10, length($0)-9), new_word)} {print}' ${SCRIPT_ROOT}/lipsum.txt > ${PATH_LEVEL_4}/password.txt
curl -sS --fail https://lipsum.com/feed/json -d "amount=150" -d "what=paras" -d "start=true" \
| jq --raw-output .feed.lipsum \
| fold -s -w80 \
| awk -v new_word=" password:${PASSWORD5} " 'NR==512 {gsub(substr($0, 10, 16), new_word)} {print}' \
> ${PATH_LEVEL_4}/password.txt
echo "The password is somewhere in the file. It is prefixed "password:"." > ${PATH_LEVEL_4}/README.txt
echo "" >> ${PATH_LEVEL_4}/README.txt
echo "You may use one, some or all of these tools:" >> ${PATH_LEVEL_4}/README.txt
Expand Down
Loading

0 comments on commit f54c9b0

Please sign in to comment.