Created
May 17, 2022 06:52
-
-
Save vadirajks/3e9625ca9c3f9a967211d95d82dd8862 to your computer and use it in GitHub Desktop.
whois workaround
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1> | |
cat /custom-scripts/domain_expire.sh | |
#!/bin/bash | |
target=$1 | |
expdate=$(whois $1 | grep -m1 -oPi '(expir.*date|expir.*on).*\s\K\d.+'.) | |
expdate=$(date -d"$expdate" +%s) | |
curdate=$(date +%s) | |
echo $(((expdate-curdate)/86400)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment