Giter Club home page Giter Club logo

fsi-dnsdb's People

Contributors

giovino avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hstern threathive

fsi-dnsdb's Issues

Support filtering of results by DNS type

In the post-processing of results returned by DNSDB API, support the filtering (excluding) of DNS records types. A common example might be the excluding of SOA record types.

Add support for Python 3.5

Please add support for Python 3.5.

The latest Python 3 from the Ubuntu 16.04 LTS repo is Python 3.5.2. This Ubuntu LTS still has 5 years of support :)

Explore including a CLI

A CLI might have some features like:

  • JSON Lines output
  • CSV Output
  • ASCII Table Output
  • Read options from a .ini file
  • take input from stdin and CLI arguments

Support ISO 8601 formats for time filters

DNSDB API supports four query parameters to filter by time. The parameters expect an integer in epoch time.

DNSDB API doc

You may filter results by time using the "time_first_before," "time_first_after,"
"time_last_before," and "time_last_after" query parameters. These
parameters expect a integer (Unix/Epoch time) with seconds granularity
or a relative time in seconds (preceded by -).

this module currently only supports integers. It could support ISO 8601 data formats.

Example:

results = dnsdb.search(name="fsi.io", time_last_after=2018-01-01T00:00:00Z)

Would likely use the Python module dateutil.parser or Pendulum to support this feature.

Problem with python > 3.8 and MutableMapping

On my computer with python 3.10.4 with dnsdb 0.2.5

> from dnsdb import Dnsdb
File ~/env/default3/lib/python3.10/site-packages/diskcache/persistent.py:8, in <module>
      5 import operator as op
      6 import sys
----> 8 from collections import MutableMapping, OrderedDict, Sequence
      9 from collections import KeysView, ValuesView, ItemsView
     10 from itertools import islice

ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

On python > 3.8, you need to import MutableMapping fromcollections.abc (ref). This code should solve the issue :

import sys

if sys.version_info[:2] >= (3, 8):
    from collections.abc import MutableMapping
else:
    from collections import MutableMapping

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.