Skip to content

Commit 3344434

Browse files
authored
Merge pull request #2 from ahliweb/awicodex/fix-csv-expiry-date-issue
Fix WHOIS expiry parsing for CSV output
2 parents 68c8ad8 + ffed019 commit 3344434

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Script Bash untuk memeriksa status domain dan tanggal expired baik **domain inte
1515
* Mengambil tanggal expired domain via **WHOIS global** atau **PANDI (khusus .id)**.
1616
* Menampilkan **progress bar + persentase + ETA**.
1717
* Menyimpan hasil ke file **CSV** dengan format aman (quoted).
18+
* Parser WHOIS menjaga kolom **Expiry Date** tetap utuh (termasuk jam & zona) untuk domain internasional.
1819
* Menyimpan log detail ke file **LOG** dengan header & footer.
1920
* Auto install dependency (`whois`, `dig`, `curl`, `grep`).
2021
* Highlight otomatis:
@@ -234,7 +235,7 @@ Supported by SatpamSiber.com | AhliWeb.com | AhliWeb.co.id | AhliWeb.my.id
234235
**CSV aman (quoted)**: `"Domain","Status","Expiry Date","Note"`
235236

236237
* `Status`: `Active`/`Inactive` (untuk `Active` dapat memuat IP pertama, mis. `Active (203.0.113.10)`).
237-
* `Expiry Date`: ISO‑8601 UTC atau `(N/A)` jika tidak ditemukan.
238+
* `Expiry Date`: ISO‑8601 UTC lengkap (contoh: `2026-02-21T08:56:22Z`) atau `(N/A)` jika tidak ditemukan.
238239
* `Note`: `❌ Expired`, `⚠️ Expiring Soon (≤30 hari)`, `✅ OK`, atau penjelasan jika expiry tak ditemukan.
239240

240241
**LOG**:

check_domains.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ ensure_tools() {
109109
extract_expiry_whois() {
110110
grep -iE 'Registry Expiry Date|Expiry Date|Expiration Date|paid-till|expire' \
111111
| head -n 1 \
112-
| sed -E 's/.*:[[:space:]]*//; s/\r$//'
112+
| sed -E 's/^[^:]*:[[:space:]]*//; s/\r$//'
113113
}
114114

115115
# Parser WHOIS (spesial TLD/registrar), mis. .top menggunakan field Registrar Registration Expiration Date
116116
extract_expiry_special() {
117117
grep -iE 'Registrar Registration Expiration Date|Domain Expiration Date|Expiry|Expires On' \
118118
| head -n 1 \
119-
| sed -E 's/.*:[[:space:]]*//; s/\r$//'
119+
| sed -E 's/^[^:]*:[[:space:]]*//; s/\r$//'
120120
}
121121

122122
# Hitung sisa hari dari string tanggal yang bisa dipahami `date -d`

0 commit comments

Comments
 (0)