Giter Club home page Giter Club logo

czdap-tools's Introduction

CZDAP Tools

Some registries allow users to download zone data directly from CZDAP, and others provide FTP credentials that you can use to login to their servers. These tools allow you to programatically perform these two tasks:

  • Decrypt FTP credentials downloaded from ICANN's CZDAP application.
  • Download zone data directly using the CZDAP API.

Installation

This script requires Python 2.x plus the pycrypto and requests extension libraries.

Mac OSX

Tested on Snow Leopard and Mountain Lion

OSX comes with Python preinstalled. To install the required extensions, issue the following commands:

sudo easy_install pip
sudo pip install --upgrade pycrypto requests

Linux

Tested on Ubuntu 13.04 Raring Ringtail

sudo apt-get install python-crypto python-requests

Windows

Tested on Windows 7

Download and configure the Python environment:

  • Download Python version 2.7.x from the main download page.
  • Run the installer and follow the installation instructions.

Install pycrypto and requests:

Decrypting credentials

To confirm that you've installed the dependencies correctly, simply run the test and it should process the example data successfully:

cd credentials-decrypt/test
python test-decrypt.py

You should get the following sample output in basic CSV format:

server,username,password
ftp.download.com,com_ftp_access,specialpassword__22
ftp.download.biz,sally,password12345$
ftp.download.net,net_access,secretpassword456

To decrypt your own FTP credentials:

  1. Visit CZDAP and copy your token. You can find it on your user profile page, under the tab "API".
  2. In the /credentials-decrypt directory, make a copy of the config.sample.json file and name it config.json.
  3. Edit config.json and overwrite the "token" parameter with the your unique token.
  4. Copy your private key into this directory and make sure it's named czdap.private.key.
  5. Run python decrypt.py.

Downloading zone data

  1. Visit CZDAP and copy your token. You can find it on your user profile page.
  2. In the /zonedata-download directory, make a copy of the config.sample.json file and name it config.json.
  3. Edit config.json and overwrite the "token" parameter with the your unique token.
  4. Run python download.py

Contributing

Contributions are welcome.

czdap-tools's People

Contributors

marktheunissen avatar megahall avatar rupl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

czdap-tools's Issues

Does not work on CentOS

I did yum install python-crypto python-requests. Python-crypto installed but python-requests said No Package found.

Then when running pythong test-decrypt.py I get:
Traceback (most recent call last):
File "test-decrypt.py", line 5, in
from Crypto.Cipher import PKCS1_v1_5
ImportError: cannot import name PKCS1_v1_5

Please advise how to run this on CentOS. Thanks.

error running test-decrypt.py

cd credentials-decrypt/test
ubuntu@x:/opt/czdap-tools/credentials-decrypt/test$ python test-decrypt.py
Traceback (most recent call last):
  File "test-decrypt.py", line 5, in <module>
    from Crypto.Cipher import PKCS1_v1_5
ImportError: cannot import name PKCS1_v1_5

download.py not working

ubuntu 12.04 LTS

I install the requirements

sudo apt-get install python-crypto python-requests

then I copy the config and replace xxxx.... with my api key

then

python download.py

Unable to parse JSON returned from CZDAP

Thoughts?
Eddie

Issue with decrypt.py

Test is working fine. Able to download zonefiles but unable to decrypt. I am getting output as below

server,username,password

But no host, user, pass in it. I think credentials.json gets generated through decrypt.py as I dont have in the file.

Please solve this issue & correct me if I am wrong.

CZDS API changing

I got this in an email from ICANN earlier this month.

"If you currently use the CZDS API to programmatically download zone files, please be aware that the API is changing with the introduction of the new CZDS portal. The updated CZDS API specification will be available shortly, and ICANN will provide an opportunity for you to test the new CZDS API implementation by making a test bed available starting 10 December 2018. The test bed will operate until the CZDS update goes live in January 2019."

Anyone have plans to update this set of tools to work with the changed API?

Too much memory used

Hey!
Update the download.py file to use less memory:

r = s.get(config['base_url'] + url, stream = True)

Setting stream = True makes it not allocate that much memory. Since we iterate it on 1024b blocks it's not necessary.

Failed to establish a new connection: [Errno 11002]

I have successfully run "python download.py" and a number of files have been downloaded. But after a while I get the below error:

Error occoured: HTTPSConnectionPool(host='czds.icann.org', port=443): Max retries exceeded with url: /en/download-zone-data/3659?token=XXXXXXXXXXXXXXX (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x030300F0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',))

(I have replaced the actual token in the error message with XXXXXXXX)

When I rerun the script, it seems to run for some time and then again the same error. This is on Windows 10, using Python 2.7

Any ideas?

Missing tld/id in user-credentials.json output

As the first registries released their user credentials in key crypted form, there is something very important missing - the tld where this credentials should be used.

$ ./decrypt.py
server,username,password
******.CN,c*******,***********
******.CN,c*******,***********

Could you please extend the API to return the id or the tld?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.