initial commit
This commit is contained in:
commit
3f79fc8e6c
527 changed files with 373170 additions and 0 deletions
10
sri.sh
Executable file
10
sri.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
HASH="sha256"
|
||||
DIR="templates"
|
||||
FILES="*.css *.js *.ico"
|
||||
echo "SRI (subresource integrity) hashes"
|
||||
cd ${DIR}
|
||||
for f in $(ls ${FILES} 2>/dev/null); do
|
||||
printf "%13s: " ${f}
|
||||
echo "${HASH}-$(cat ${f}|openssl dgst -${HASH} -binary|openssl enc -base64 -A)"
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue