Add nic.ar patterns...

It also trim spaces in the expiration which may be a problem with my pattern, but this shouldn't be a problem for the rest of the options.
This commit is contained in:
Matias De lellis 2025-05-15 10:32:52 -03:00 committed by GitHub
parent 9b8e1279fb
commit f3b41e75b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -447,6 +447,15 @@ get_expiration() {
$0 ~ "expires: *" DATE_YYYY_MM_DD_DASH_HH_MM_SS_TZOFFSET {split($2, a, "-"); printf("%s-%s-%s", a[1], a[2], a[3]); exit}
# FIXME: XXX: weak patterns
# .ar domains
# expire: 2025-12-22 00:00:00
# (uses tabs between colon and date, we match tabs or spaces regardless)
$0 ~ "expire:[ \t]*" DATE_YYYY_MM_DD_HHMMSS {
sub(/^.*expire:[ \t]*/, "")
split($1, a, "-");
printf("%s-%s-%s", a[1], a[2], a[3]);
}
# renewal: 31-March-2016
/renewal:/{split($2, a, "-"); printf("%s-%s-%s\n", a[3], month2moy(a[2]), a[1]); exit}
@ -481,6 +490,9 @@ else
fi
expiration=$(get_expiration "$outfile")
# Trim leading and trailing whitespace
expiration=$(echo "$expiration" | xargs)
[ -z "$expiration" ] && die "$STATE_UNKNOWN" "State: UNKNOWN ; Unable to figure out expiration date for $domain Domain."
expseconds=$(date +%s --date="$expiration")