Attack B.1:

In a REAL attack, you would do:
Using curl only:
for i in {1..500}; do 
  curl -s "https://aisec.bramm.xyz/b/?count_cancer"
done | awk -F': ' '/"result"/ {sum += $2; count++} END {if (count > 0) print "Estimated True Value:", sum/count; else print "No data received."}'
Using curl/jq:
for i in {1..500}; do 
  curl -s "https://aisec.bramm.xyz/b/?count_cancer" | jq '.result'
done | awk '{sum += $1; count++} END {print "Estimated True Value:", sum/count}'
BUT, to make live easier and to NOT DDOS my root server, please use:
curl -s "https://aisec.bramm.xyz/b/?average&runs=500" 
which, does the same on the server in one call

Attack B.2:

In a REAL attack, you would do:
Using curl only:
for age in {30..90..5}; do
  echo -n "Threshold > $age: "
  curl -s "http://localhost:5001/index.php?count_age&threshold=$age" | jq '.result'
done
Using curl/jq:
for age in {30..90..5}; do
  echo -n "Threshold > $age: "
  curl -s "http://localhost:5001/index.php?count_age&threshold=$age" | \
  awk -F': ' '/"result"/ {print $2}'
done
BUT, to make live easier and to NOT DDOS my root server, please use:
curl -s "https://aisec.bramm.xyz/b/?reconstruct" 
which, does the same on the server in one call