mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
15 lines
253 B
Bash
Executable File
15 lines
253 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [[ $# -lt 1 ]]; then
|
|
echo "Usage: $0 <path to cert>";
|
|
exit;
|
|
fi
|
|
|
|
if ! [[ -e $1 ]]; then
|
|
echo "File does not exist"
|
|
exit;
|
|
fi
|
|
|
|
print=$(echo $(openssl x509 -noout -in $1 -serial) | sed 's/://g')
|
|
echo $print | tr "=" " " | awk '{print $2}'
|