<commit_before>#!/bin/bash

if [ $# != 2 ]; then
    echo "usage: `basename $0` <mac key identifier> <uri>"
    exit 1
fi

SCRIPTDIR="$( cd "$( dirname "$0" )" && pwd )"

MAC_KEY_IDENTIFIER=$1
MAC_KEY=`gmk.sh $MAC_KEY_IDENTIFIER`
MAC_ALGORITHM=`gma.sh $MAC_KEY_IDENTIFIER`
TS=`$SCRIPTDIR/gents.py`
NONCE=`$SCRIPTDIR/gennonce.py`
EXT=""
MAC=`genmac.py localhost 8000 GET $2 $TS $NONCE $EXT $MAC_KEY $MAC_ALGORITHM`

curl \
   -v \
   -X GET \
   -H "Authorization: MAC id=\"$MAC_KEY_IDENTIFIER\", ts=\"$TS\", nonce=\"$NONCE\", ext=\"$EXT\", mac=\"$MAC\"" \
   http://localhost:8000"$2"

exit 0<commit_msg>Changed the secget.sh utility so it doesn't show curl's progress meter. Dave.<commit_after>#!/bin/bash

if [ $# != 2 ]; then
    echo "usage: `basename $0` <mac key identifier> <uri>"
    exit 1
fi

SCRIPTDIR="$( cd "$( dirname "$0" )" && pwd )"

MAC_KEY_IDENTIFIER=$1
MAC_KEY=`gmk.sh $MAC_KEY_IDENTIFIER`
MAC_ALGORITHM=`gma.sh $MAC_KEY_IDENTIFIER`
TS=`$SCRIPTDIR/gents.py`
NONCE=`$SCRIPTDIR/gennonce.py`
EXT=""
MAC=`genmac.py localhost 8000 GET $2 $TS $NONCE $EXT $MAC_KEY $MAC_ALGORITHM`

curl \
   -s \
   -v \
   -X GET \
   -H "Authorization: MAC id=\"$MAC_KEY_IDENTIFIER\", ts=\"$TS\", nonce=\"$NONCE\", ext=\"$EXT\", mac=\"$MAC\"" \
   http://localhost:8000"$2"

exit 0
{'fraction_non_alphanumeric': 0.20546875, 'fraction_numerical': 0.025, 'mean_word_length': 4.00390625, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5122881', 'n_tokens_mistral': 585, 'n_tokens_neox': 544, 'n_words': 117}