Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix #4: Use randomized URLs
With this commit we fix the vulnerability attack described in #4. Now files are stored in their own semi-unique folder locations generated by a list of dictionary words, randomized at runtime. Also this commit introduces 0.2.0-indev version with initial groundwork for automated file expiration and collection.
- Loading branch information
Showing
4 changed files
with
78 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| function gen_dict() { | ||
| DICT=$1 | ||
|
|
||
| } | ||
| DICTFILE=/usr/share/dict/words | ||
| OUTFILE=db/wordlist | ||
| if test -f "$DICTFILE"; then | ||
| # Get all words longer than 5 characters and save them in their own wordlist file | ||
| awk 'length>5' $DICTFILE | uniq > $OUTFILE | ||
| else | ||
| (>&2 echo "Error: The file ${DICTFILE} does not exist. Cannot generate wordlist for file indexing.") | ||
| exit 1 | ||
| fi | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters