SSLKEYLOG VARIABLE
Your first issue might have something to do with the location that your SSLKEYLOGFILE variable is pointing to. For me it did not work if I put that file on the Desktop
so I did:
export SSLKEYLOGFILE=~/Documents/sslkeylog.log
This did generate keylogs for me when running a new instance (by using the -n
parameter) of the Firefox Developer Version:
open -n /Applications/Firefox\ Developer\ Edition.app
I'm not sure if Google Chrome supports saving SSL Key logs out of the box so you might want to try Firefox Developer Edition.
Date Folder
Since the third step in your script runs cd "$Date"
, you are currently in that folder. Therefore you could try to use the $PWD
variable to grab the current directory for your SSLKEYLOGFILE.
Summary
Your script would then become:
Date="$(date)"
mkdir -p -- "$Date"
cd "$Date"
export SSLKEYLOGFILE=$PWD/keylog.log
open -n /Applications/Google\ Chrome.app
Or use Firefox:
Date="$(date)"
mkdir -p -- "$Date"
cd "$Date"
export SSLKEYLOGFILE=$PWD/keylog.log
open -n /Applications/Firefox\ Developer\ Edition.app
I hope this helped you on your way.