Skip to content

Instantly share code, notes, and snippets.

@noushi
Forked from Darksecond/benchmark.sh
Created April 17, 2025 13:00
Show Gist options
  • Save noushi/7a7538e41f1705d219c316e660a47165 to your computer and use it in GitHub Desktop.
Save noushi/7a7538e41f1705d219c316e660a47165 to your computer and use it in GitHub Desktop.
Openssl benchmark script
#!/bin/bash
echo Please make sure the server is running
echo the command is:
echo openssl s_server -WWW
echo and make sure the 1mb file is in the same directory
echo to make the 1mbrf file do:
echo dd if=/dev/urandom of=1mbrf bs=1024 count=1024
echo
echo the following benchmarks each will have run 50 times
echo
function benchmark {
echo Cipher: $1
openssl ciphers -v $1
time for i in {1..50}
do
echo GET /1mbrf HTTP/1.0 | openssl s_client -quiet -cipher $1 >/dev/null 2>&1
done
}
benchmark AES256-SHA
benchmark AES128-SHA
benchmark DES-CBC3-SHA
benchmark EDH-RSA-DES-CBC-SHA
benchmark RC4-SHA
benchmark SEED-SHA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment