Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Some Polish domains returning "expired" when they're not #24

Open
hawkeye116477 opened this issue Jan 27, 2019 · 19 comments
Open

Some Polish domains returning "expired" when they're not #24

hawkeye116477 opened this issue Jan 27, 2019 · 19 comments

Comments

@hawkeye116477
Copy link

hawkeye116477 commented Jan 27, 2019

Welcome! Just like on title, also it returns wrong expiration date (-0-) of course.
For example:

promocjanastacjach.pl
ekosalus.pl
kursnaruciane.pl
wyjazdzpringles.pl
hawkeye116477 referenced this issue in MajkiIT/polish-ads-filter Feb 10, 2019
@click0
Copy link

click0 commented Feb 11, 2019

Try my commit:
click0@476f6a4

@hawkeye116477
Copy link
Author

hawkeye116477 commented Feb 13, 2019

Now expiration date is fine, but i still have wrong expired status and incorrect days left.

@click0
Copy link

click0 commented Feb 13, 2019

Excuse me. There were still a few commits.
Download the latest version of the script.
https://raw.githubusercontent.com/click0/domain-check-2/master/domain-check-2.sh

@hawkeye116477
Copy link
Author

@click0 With latest I also have that problem.

@click0
Copy link

click0 commented Feb 13, 2019

Show problem domains and a screenshot of how they are displayed on the console

@hawkeye116477
Copy link
Author

@click0 Ok, here you have promocjanastacjach.pl
screenshot_20190213_155303

@click0
Copy link

click0 commented Feb 13, 2019

# sh domain-check-2.sh -d promocjanastacjach.pl

Domain                              Registrar                                      Status   Expires     Days Left
----------------------------------- ---------------------------------------------- -------- ----------- ---------
promocjanastacjach.pl               DDsp.zo.o.                                     Expiring 17-feb-2019   4

@click0
Copy link

click0 commented Feb 13, 2019

Please run the script like this:
bash -x domain-check-2.sh -d promocjanastacjach.pl or
sh -x domain-check-2.sh -d promocjanastacjach.pl

@hawkeye116477
Copy link
Author

hawkeye116477 commented Feb 13, 2019

@click0 Output

+ PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/ssl/bin:/usr/sfw/bin
+ export PATH
+ [email protected]
+ WARNDAYS=30
+ QUIET=FALSE
+ ALARM=FALSE
+ WHOIS_SERVER=whois.internic.org
++ which awk
+ AWK=/bin/awk
++ which whois
+ WHOIS=/bin/whois
++ which date
+ DATE=/bin/date
++ which cut
+ CUT=/bin/cut
++ which grep
+ GREP=/bin/grep
++ which tr
+ TR=/bin/tr
++ which mail
+ MAIL=/bin/mail
+ WHOIS_TMP=/var/tmp/whois.17041
+ getopts ae:f:hd:s:qx: option
+ case "${option}" in
+ DOMAIN=promocjanastacjach.pl
+ getopts ae:f:hd:s:qx: option
+ '[' '!' -f /bin/whois ']'
+ '[' '!' -f /bin/date ']'
++ /bin/date +%m
+ MONTH=02
++ /bin/date +%d
+ DAY=13
++ /bin/date +%Y
+ YEAR=2019
++ date2julian 2 13 2019
++ '[' '2 !=  ] && [ 13' '!=' '' ']'
++ '[' 2019 '!=' '' ']'
++ d2j_tmpmonth=24227
++ d2j_tmpyear=2018
++ echo 2458528
+ NOWJULIAN=2458528
+ touch /var/tmp/whois.17041
+ '[' promocjanastacjach.pl '!=' '' ']'
+ print_heading
+ '[' FALSE '!=' TRUE ']'
+ printf '\n%-35s %-46s %-8s %-11s %-5s\n' Domain Registrar Status Expires 'Days Left'

Domain                              Registrar                                      Status   Expires     Days Left
+ echo '----------------------------------- ---------------------------------------------- -------- ----------- ---------'
----------------------------------- ---------------------------------------------- -------- ----------- ---------
+ check_domain_status promocjanastacjach.pl
+ local REGISTRAR=
+ sleep 1
+ DOMAIN=promocjanastacjach.pl
++ echo promocjanastacjach.pl
++ /bin/awk -F. '{print tolower($NF);}'
+ TLDTYPE=pl
+ '[' pl == '' ']'
+ '[' pl == ua ']'
++ /bin/whois -h whois.iana.org pl
++ /bin/grep whois:
++ /bin/awk '{print $2}'
+ WHS=whois.dns.pl
+ '[' pl == jp ']'
+ env LC_CTYPE=C LC_ALL=C /bin/tr -d '\r'
+ /bin/whois -h whois.dns.pl promocjanastacjach.pl
+ '[' pl == aero ']'
+ '[' pl == cn ']'
+ '[' pl == pl ']'
+ /bin/whois -h whois.dns.pl promocjanastacjach.pl
+ env LC_CTYPE=C LC_ALL=C /bin/tr -d '\r'
++ cat /var/tmp/whois.17041
++ /bin/awk -F: '/Registrar:/ && $2 != ""  { REGISTRAR=substr($2,2,17) } END { print REGISTRAR }'
++ env LC_CTYPE=C LC_ALL=C /bin/tr -d '\r'
+ REGISTRAR=
+ '[' pl == uk ']'
+ '[' pl == me ']'
+ '[' pl == jp ']'
+ '[' pl == md ']'
+ '[' pl == info ']'
+ '[' pl == ca ']'
+ '[' pl == edu ']'
+ '[' pl == cafe ']'
+ '[' pl == link ']'
+ '[' pl == blog ']'
+ '[' pl == ru -o pl == su ']'
+ '[' pl == ua -a '' == od.ua ']'
+ '[' pl == ua ']'
+ '[' pl == cz ']'
+ '[' pl == pl ']'
++ cat /var/tmp/whois.17041
++ /bin/awk -F: '/REGISTRAR:/ && $0 != "" { getline; REGISTRAR=substr($0,0,35) } END { print REGISTRAR }'
++ /bin/tr -d ' \r'
+ REGISTRAR=DDsp.zo.o.
+ '[' DDsp.zo.o. = '' ']'
+ '[' pl == info -o pl == org ']'
+ '[' pl == md ']'
+ '[' pl == uk ']'
+ '[' pl == jp ']'
+ '[' pl == ca ']'
+ '[' pl == me ']'
+ '[' pl == ru -o pl == su ']'
+ '[' pl == ua ']'
+ '[' pl == com -o pl == net -o pl == org -o pl == link -o pl == blog -o pl == cafe -o pl == biz -o pl == us -o pl == mobi -o pl == tv -o pl == co -o pl == pro -o pl == cafe -o pl == in -o pl == cat -o pl == asia -o pl == cc -o pl == college -o pl == aero ']'
+ '[' pl == edu ']'
+ '[' pl == cz ']'
+ '[' pl == pl ']'
++ cat /var/tmp/whois.17041
++ /bin/awk -F: '/expiration date:/ { print $2 }'
++ /bin/awk '{ print $1 ;}'
+ tdomdate=2019.02.17
++ echo 2019.02.17
++ /bin/cut -d. -f1
+ tyear=2019
++ echo 2019.02.17
++ /bin/cut -d. -f2
+ tmon=02
+ case ${tmon} in
+ tmonth=feb
++ echo 2019.02.17
++ /bin/cut -d. -f3
+ tday=17
++ echo 17-feb-2019
+ DOMAINDATE=17-feb-2019
+ IFS=-
+ set -- 17 feb 2019
++ getmonth feb
+++ tolower feb
++++ echo feb
++++ /bin/tr V j u
/bin/tr: extra operand 'u'
Try '/bin/tr --help' for more information.
+++ LOWER=
+++ echo
++ LOWER=
++ case ${LOWER} in
++ echo 0
+ MONTH=0
+ IFS=
++ date2julian 0 17 2019
++ '[' '0 !=  ] && [ 17' '!=' '' ']'
++ '[' 2019 '!=' '' ']'
++ d2j_tmpmonth=24225
++ d2j_tmpyear=2018
++ echo 2458470
+ DOMAINJULIAN=2458470
++ date_diff 2458528 2458470
++ '[' 2458528 '!=' '' ']'
++ '[' 2458470 '!=' '' ']'
+++ expr 2458470 - 2458528
++ echo -58
+ DOMAINDIFF=-58
+ '[' -58 -lt 0 ']'
+ '[' FALSE == TRUE ']'
+ prints promocjanastacjach.pl Expired 17-feb-2019 -58 DDsp.zo.o.
+ '[' FALSE '!=' TRUE ']'
++ echo 17-feb-2019
++ /bin/awk '{ print $1, $2, $4 }'
+ MIN_DATE='17-feb-2019  '
+ printf '%-35s %-46s %-8s %-11s %-5s\n' promocjanastacjach.pl DDsp.zo.o. Expired '17-feb-2019  ' -58
promocjanastacjach.pl               DDsp.zo.o.                                     Expired  17-feb-2019   -58  
+ echo

+ rm -f /var/tmp/whois.17041
+ exit 0

@click0
Copy link

click0 commented Feb 13, 2019

Not worked command
/bin/tr '[A-Z]' '[a-z]'
Please, show output:
cat /etc/os-release
And test:
echo FEB | awk '{print tolower($0);}'

@hawkeye116477
Copy link
Author

hawkeye116477 commented Feb 13, 2019

cat /etc/os-release
NAME="Manjaro Linux"
ID=manjaro
ID_LIKE=arch
PRETTY_NAME="Manjaro Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.manjaro.org/"
SUPPORT_URL="https://www.manjaro.org/"
BUG_REPORT_URL="https://bugs.manjaro.org/"

echo FEB | awk '{print tolower($0);}'
feb

@click0
Copy link

click0 commented Feb 13, 2019

Please.
Download the fresh version of the script.
https://raw.githubusercontent.com/click0/domain-check-2/master/domain-check-2.sh

@hawkeye116477
Copy link
Author

@click0 Thanks, now it works correct 😄

@click0
Copy link

click0 commented Feb 13, 2019

Say hello to the developers of Manjaro Linux, for they are puzzled with command tr.

@hawkeye116477
Copy link
Author

hawkeye116477 commented Feb 13, 2019

Ok, anyway I see that tr works correct without brackets, as they suggested on
https://stackoverflow.com/questions/14646022/tr-a-z-a-z-shows-error-in-unix.

LOWER=`echo ${1} | ${TR} A-Z a-z`

@click0
Copy link

click0 commented Feb 13, 2019

It does not work in some OS.
On FreeBSD and MacOS X, this will not work.

@hawkeye116477
Copy link
Author

hawkeye116477 commented Feb 13, 2019

@click0 I have another problem.
fileup.com.pl,otosponsorki.pl => here it returns unkown.
lapkowo.pl - here it returns -0-, but here is renewal date instead of expiration

Problem no 2 I solved by tdomdate=`cat ${WHOIS_TMP} | ${AWK} -F':' '/expiration date:/ || /renewal date:/ { print $2 }' | ${AWK} '{ print $1 ;}'

@click0
Copy link

click0 commented Feb 13, 2019

No problem.

DOMAIN NAME: fileup.com.pl after release from the queue, available for registration

created:               2018.11.21 10:58:24
last modified:         2018.11.21 10:58:24
expiration date:       2019.03.05 10:58:24

Domain is not registered.
Available for registration from such a date.

Similar situation for the second domain

@hawkeye116477
Copy link
Author

hawkeye116477 commented Feb 14, 2019

Ok, indeed, thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants