#!/bin/bash | |||||
# Prompt user for the prefix value | |||||
read -p "Enter the prefix for the URL: " prefix | |||||
# Variables | |||||
TESTS=200 | |||||
PATHS="/rest/user/whoami" | |||||
CONCURRENT=10 | |||||
# Run ApacheBench with the specified prefix | |||||
/usr/bin/ab -v 0 -q -S -d \ | |||||
-X "gslab-juiceshop.com.edgekey-staging.net:80" \ | |||||
-c$CONCURRENT -n$TESTS \ | |||||
-H "task:rateControlTest" \ | |||||
-H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36" \ | |||||
-H "Accept-Encoding: gzip" \ | |||||
-H "Accept: */*" \ | |||||
-H "referer: http://${prefix}.gslab-juiceshop.com/" \ | |||||
-H 'accept-language: en-US,en;q=0.9,es;q=0.8' \ | |||||
-H 'cookie: language=en; welcomebanner_status=dismiss; io=H1-9Vtxayp4pdpaQAABZ' \ | |||||
"http://${prefix}.gslab-juiceshop.com/$PATHS" |
#!/bin/bash | |||||
# Prompt user for the prefix value | |||||
read -p "Enter the prefix for the URL: " prefix | |||||
# Array of IP addresses | |||||
IP_ADDRESSES=("92.123.74.30" "2.20.178.36" "184.150.165.4") | |||||
# Loop through each IP address and run ApacheBench | |||||
for IP in "${IP_ADDRESSES[@]}"; do | |||||
echo "Testing $IP with prefix ${prefix}..." | |||||
ab -n 200 -c 35 -H "Host: ${prefix}.gslab-juiceshop.com" http://$IP/ | |||||
done |
#!/bin/bash | |||||
# Prompt the user for the value of the prefix | |||||
read -p "Enter the prefix for the URL: " prefix | |||||
# Construct URLs with the user-provided prefix | |||||
url="https://${prefix}.gslab-juiceshop.com/rest/user/whoami" | |||||
# Generating GET requests for /rest/user/whoami | |||||
echo "Generating GET requests for /rest/user/whoami" | |||||
siege -c150 -t10s $url |
# Prompt user for the prefix value | # Prompt user for the prefix value | ||||
read -p "Enter the prefix for the URL: " prefix | read -p "Enter the prefix for the URL: " prefix | ||||
# Run slowhttptest with the specified prefix | # Run slowhttptest with the specified prefix | ||||
echo "Generating Slow POST requests for homepage" | |||||
slowhttptest -B \ | slowhttptest -B \ | ||||
-u "http://${prefix}.gslab-juiceshop.com/" \ | -u "http://${prefix}.gslab-juiceshop.com/" \ | ||||
-d "gslab-juiceshop.com.edgekey-staging.net:80" \ | -d "gslab-juiceshop.com.edgekey-staging.net:80" \ |
#!/bin/bash | |||||
# Prompt the user for the value of the prefix | |||||
read -p "Enter the prefix for the URL: " prefix | |||||
# Construct URLs with the user-provided prefix | |||||
url="https://${prefix}.gslab-juiceshop.com/api/Feedbacks/" | |||||
# Generating POST requests for /api/Feedbacks/ | |||||
echo "Generating POST requests for /api/Feedbacks/" | |||||
siege -c150 -t10s "$url POST {\"captchaId\": 81, \"captcha\": \"9\", \"comment\": \"i like it! (anonymous)\", \"rating\": 5}" --content-type "application/json" |