Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CZ and SK domain dont work #1

Open
pavkamlc opened this issue May 30, 2018 · 22 comments
Open

CZ and SK domain dont work #1

pavkamlc opened this issue May 30, 2018 · 22 comments

Comments

@pavkamlc
Copy link

pavkamlc commented May 30, 2018

On Centos 7 may be problem with date calculation.

[root@zabbix externalscripts]# ./dns-domain-expiration-checker.py --domainname brno.com
Unable to calculate the expiration days
[root@zabbix externalscripts]# ./dns-domain-expiration-checker.py --domainname brno.cz
Unable to calculate the expiration days
[root@zabbix externalscripts]# ./dns-domain-expiration-checker.py --domainname brno.sk
Unable to calculate the expiration days
[root@zabbix externalscripts]#

@Matty9191
Copy link
Owner

Can you try running the program again? It looks like the expire string used by a number of registrars changed again.

@Matty9191
Copy link
Owner

FWIW: It's working OK now with the change I just merged:

dns-domain-expiration-checker.py --domainname brno.com --interactive
Domain Name Registrar Expiration Date Days Left
brno.com GoDaddy.com, LLC 2019-05-15 04:00:00 343

@pavkamlc
Copy link
Author

pavkamlc commented Jun 13, 2018 via email

@pfilbin90
Copy link

Hello @Matty9191 - just wanted to let you know that I have tried this today and I am experiencing the same issue that @pavkamlc has. ".co.uk" and ".ca" domains were not working for me. Can you please check this for me?
Thanks

@pfilbin90
Copy link

pfilbin90 commented Jan 2, 2019

I would also like to ask about speed. I am adding in a domain file with about 15 different domains and it appears to be taking a really long time. About 15-20 minutes before the script is completed. Is there any way to hasten its completion?

@Matty9191
Copy link
Owner

It looks like I need to add another expire string to the mix. I'll try to get a new version uploaded this week to address this issue.

@Matty9191
Copy link
Owner

@pfilbin90 can you add "--sleeptime 0" to your command line? By default the script will wait 60-seconds between queries to avoid triggering the registrars DOS logic.

@pfilbin90
Copy link

Thank you, that fixed my issue with the speed. Looking forward to the update with the new expire strings!

@Matty9191
Copy link
Owner

Can you try the version I just checked in? I added a new expire string and it looks like that fixed the issue:

$ ./dns-domain-expiration-checker.py --domainname google.cz --interactive
Domain Name Registrar Expiration Date Days Left
google.cz Unknown 2019-07-22 00:00:00 200

@pfilbin90
Copy link

I'm still getting "Unable to calculate the expiration days". I'm trying with ".co.uk" and ".ca" domains.

@Matty9191
Copy link
Owner

Can you paste the complete command line you are using? Let me debug further.

@pfilbin90
Copy link

python dns-domain-expiration-checker.py --interactive --domainname google.co.uk --sleeptime 0

I get the response:

Domain Name                Registrar             Expiration Date                 Days Left
Unable to calculate the expiration days

@Matty9191
Copy link
Owner

I uploaded another variant with the co.uk expiration string. Can you try 9.0?

@pfilbin90
Copy link

It is working now, thank you so much. I have one last question. Is there a flag for SMTP username and password if I'm using an SMTP server that requires authentication?

@Matty9191
Copy link
Owner

Let me read through the smtplib source code to see if they accept a username and password.

@pfilbin90
Copy link

Hello again. Looks like I have run into 1 more issue. This script does not work with .org domains.

For example
python dns-domain-expiration-checker.py --interactive --domainname wikipedia.org --sleeptime 0

Will return the following:

Traceback (most recent call last):
  File "dns-domain-expiration-checker.py", line 244, in <module>
    main()
  File "dns-domain-expiration-checker.py", line 229, in main
    expiration_date, registrar = make_whois_query(conf_options["domainname"])
  File "dns-domain-expiration-checker.py", line 90, in make_whois_query
    return(parse_whois_data(whois_data))
  File "dns-domain-expiration-checker.py", line 103, in parse_whois_data
    expiration_date = dateutil.parser.parse(line.partition(": ")[2], ignoretz=True)
  File "/home/centos/Envs/dns-domain-expiration-checker/lib/python2.7/site-packages/dateutil/parser/_parser.py", line 1356, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/home/centos/Envs/dns-domain-expiration-checker/lib/python2.7/site-packages/dateutil/parser/_parser.py", line 651, in parse
    raise ValueError("String does not contain a date:", timestr)
ValueError: (u'String does not contain a date:', '')

@pfilbin90
Copy link

I apologize for continually bombarding you. I am also needing ".com.au" domains which are experiencing the "Unable to calculate the expiration days" error.

@pfilbin90
Copy link

I just wanted to update you on the ".org" domain. It appears something is wrong with the Linux server that I'm running the script on. If I run it on a different server (with an updated version of Python), it works just fine.

Something about Python 2.7.5 doesn't like the date value that is being returned. However when I run it on a machine with Python 2.7.10 it works just fine.

@mukesh120
Copy link

Hey Matty,

I am unable to run the file, can you please tell me How I can run this file. I needed it badly but because I am a noob I don't know how to use it. Even the installation process is difficult for me to follow.

@mrpackethead
Copy link

Any chance of a requirements.txt ? That would make it easier for folks to install.

@copenhaus
Copy link

copenhaus commented Jun 4, 2020

another noob giving a shot at this...yes, I agree. We need steps for "pre-requisite" from a fresh Ubuntu (insert your flavor) install...thanks...

@Matty9191
Copy link
Owner

Those are reasonable suggestions. I will try to get the repo updated this weekend.

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

No branches or pull requests

6 participants