Skip to content

DNSDB Python3 Support#696

Closed
milesflo wants to merge 6 commits intoTheHive-Project:developfrom
milesflo:dnsdb-python3
Closed

DNSDB Python3 Support#696
milesflo wants to merge 6 commits intoTheHive-Project:developfrom
milesflo:dnsdb-python3

Conversation

@milesflo
Copy link

These are the changes ported over from #607 that allow DNSDB to work on Python3.

Works on my machine but please test extensively as the vendor lib was upgraded by https://github.com/guyddr/dnsdb-query (a 3rd party).

@dadokkio
Copy link
Contributor

dadokkio commented Apr 6, 2020

Hi, I'm trying your analyzer but I don't know why my apy key [community edition trial] is working only few times and then returns error.

In any case when api fails it returns "Error: Bad API key" and then the analyzer fails with the following error [at line 119 when it tries to parse the error as json]:
image

Can you please check if the response is 200 before trying to parse it?

@dadokkio
Copy link
Contributor

dadokkio commented Apr 8, 2020

Ok, it wasn't the not 200 response but all the responses return error.

I think the problem [in dnsdb.py] is:


            self.report({
                "records": map(lambda r: self.update_date('time_first', self.update_date('time_last', r)),
                               self.execute_dnsdb_service(client))
            })

because map is an iterable and cannot be serialized.
If I add list to the code in this way:


            self.report({
                "records": list(map(lambda r: self.update_date('time_first', self.update_date('time_last', r)),
                               self.execute_dnsdb_service(client)))
            })

it seems to be working.

garanews added a commit that referenced this pull request Apr 24, 2020
@garanews
Copy link
Contributor

merged the #745

@garanews garanews closed this Apr 24, 2020
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

Successfully merging this pull request may close these issues.

4 participants