[ SEA-GHOST MINI SHELL]
#!/bin/bash
realurl="$1"
backend="$2"
currentDate="$(date +"%s")"
legacyssl_hostname="$(sudo /usr/bin/cat /etc/apache2/conf/httpd.conf | grep -B2 "legacyssl" | grep ServerName | head -n 1 | awk '{print $2}')"
STATUS=$(cat /etc/passwd | grep legacyssl | cut -d ":" -f 1)
if [ "$1" = "name" ];then
echo $legacyssl_hostname
else
if [[ $STATUS = "legacyssl" ]]; then
cert_info="$(echo | openssl s_client -servername $legacyssl_hostname -connect $legacyssl_hostname:465 2>/dev/null | openssl x509 -noout -text)"
endDate="$(date -d "$(echo "$cert_info" | grep "Not After :" | sed 's/.*Not After : //')" +"%s")"
ends_in="$((($endDate - $currentDate) / 86400))"
echo $ends_in
else
echo 100500
fi
fi
SEA-GHOST - SHELL CODING BY SEA-GHOST