Skip to content

Broken DnsResponse - Not available for import  #11

Open

Description

@jbabbin

Trying to use passivetotal library in a CRITS instance. However the service keeps reporting that the 'DnsResponse' function isn't available.

'
WARNING 2016-06-15 12:39:38,306 crits.services.core Failed to import service (passivetotal_service): cannot import name DnsResponse
`

`
------------------ Trying to manually import following docs found here

Python 2.7.11 (default, Dec 14 2015, 22:56:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from passivetotal.libs.dns import DnsRequest
from passivetotal.libs.dns import DnsResponse
Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name DnsResponse

`

I've tried both with 'pip' and manual installs as well as using the provided 'pt-config' to set my options

------------- Setting by hand

xxx@crits:/opt/git_passivetotal_python# pt-config setup jakxxxx@xxx.com ee7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Current Configuration:

api_key : ee7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
api_server : api.passivetotal.org
api_version : v2
http_proxy :
https_proxy :
username : jakxxxx@xxx.com
xxx@crits:/opt/git_passivetotal_python#
xxx@crits:/opt/git_passivetotal_python# pt-config show

Current Configuration:

api_key : ee7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
api_server : api.passivetotal.org
api_version : v2
http_proxy :
https_proxy :
username : jakxxxx@xxx.com

Activity

  1. 9b commented on Jun 15, 2016

    @9b
    Collaborator

    Will fix this. Please use https://github.com/passivetotal/python_api/releases/tag/v1.0.23 for now which works with CRITs. You can install it by running "pip install 'passivetotal==1.0.23'" (note the single quotes).

  2. jbabbin commented on Jun 15, 2016

    @jbabbin
    Author

    Thank for the quick response the version 1.0.23 works

    Successfully installed dicttoxml-1.6.6 passivetotal-1.0.23 tabulate-0.7.5
    xxx@crits:/opt/git_pyew# python
    Python 2.7.11 (default, Dec 14 2015, 22:56:59)
    [GCC 4.6.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.

    from passivetotal.libs.dns import DnsRequest
    from passivetotal.libs.dns import DnsResponse
    exit

  3. vesche commented on Jan 15, 2019

    @vesche

    Bump, this issue persists in Python 2 & 3.

  4. aeetos commented on Oct 21, 2021

    @aeetos
    Collaborator

    @vesche Is this still an issue? If so, please comment and let us know how we can repro it so we can prioritize accordingly.

  5. vesche commented on Oct 24, 2021

    @vesche

    @aeetos This is from a little while back, so I don't remember the details of the use case I was doing.

    However, this seems fixed in Python 3 having just installed the latest package & attempted these imports:

    ❯ pip3 install passivetotal --user
    ...
    
    ❯ python3
    Python 3.9.7 (default, Oct 13 2021, 06:45:31)
    [Clang 13.0.0 (clang-1300.0.29.3)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from passivetotal.libs.dns import DnsRequest
    >>> from passivetotal.libs.dns import DnsResponse
    >>> # 👍
    

    It seems this package no longer supports Python 2 so the problem is moot on that end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions