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

Encoding problem in cortexutils #54

Closed
albertogordillo opened this issue Jun 1, 2017 · 0 comments
Closed

Encoding problem in cortexutils #54

albertogordillo opened this issue Jun 1, 2017 · 0 comments
Assignees
Labels
category:bug Issue is related to a bug
Milestone

Comments

@albertogordillo
Copy link

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu
OS version (client) Windows
Cortex Version 1.1.2

Problem Description

After upgrading from cortexutils 1.0 to 1.1.0 some analyzers stop working with observables that previously worked.

MaxMind GeoIP:
Error: Invalid output {"artifacts": [{"type": "ip", "value": "8.8.8.8"}], "full": {"city": {"geoname_id": 5375480, "confidence": null, "name": "Mountain View", "names": {"ru": {"input": {"dataType": "ip", "config": {"max_tlp": 3, "check_tlp": false, "service": ""}, "tlp": 0, "data": "8.8.8.8"}, "errorMessage": "Invalid IP address", "success": false}

Msgparser:
"errorMessage": "Unexpected Error: 'ascii' codec can't encode character u'\xed' in position 115: ordinal not in range(128)", "success": false}

Trying to identify the problem I executed the analyzer directly:
./geo.py <<< '{"tlp":0,"dataType":"ip","data":"8.8.8.8","config":{"check_tlp":false,"max_tlp":3,"service":""}}'
And it worked.

Possible Solutions

The error message in Msgparser is related with encoding. Checking analyzers.py I saw a line commented #self.__set_encoding() that in cortexutils 1.0 was not commented. After removing the comment the analyzers worked again.

@nadouani nadouani added the category:bug Issue is related to a bug label Jun 14, 2017
@nadouani nadouani self-assigned this Jun 14, 2017
@nadouani nadouani modified the milestones: 1.5.0, 1.4.1 Jun 14, 2017
nadouani added a commit that referenced this issue Jun 14, 2017
nadouani added a commit that referenced this issue Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bug Issue is related to a bug
Projects
None yet
Development

No branches or pull requests

2 participants