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

Error: 'TypeError' object has no attribute 'message' #42

Open
thejjw opened this issue Aug 26, 2021 · 3 comments
Open

Error: 'TypeError' object has no attribute 'message' #42

thejjw opened this issue Aug 26, 2021 · 3 comments

Comments

@thejjw
Copy link

thejjw commented Aug 26, 2021

Description

Hello,
I have trouble setting up otx-misp. I'm using OTX API key that I tested with curl to be working and whole thing is running on rocky linux 8 vm where fresh MISP installation has been done.
It seems to run --dry-run just fine but fails to perform actual import when run without.
According to error code(21) and its location from cli.py it does seem to communicate with OTX fine (that is.. no wrong api key error or so reported) but create_events() call must be failing somehow.

try:
create_events(pulses, author=config.author, **kwargs)
except Exception as ex:
log.error("Error: {}".format(ex))
sys.exit(21)

Any idea what I can do about it?
Thanks.

Versions

  • otx-misp: 1.4.3
  • PyMISP: 2.4.148
  • MISP: 2.4.148
  • Python (Python 2 will not be supported): 3.6 from rocky linux 8 (i.e. rhel 8)
  • Operating system: rocky linux 8 (rhel 8 compatible)

Traceback or error

[user@testmachine ~]$ otx-misp --otx [otx-api-key] --server https://localhost --misp [misp-auth-key] --timestamp "2021-8-25" -vv --dry-run
## Emerging Ransomware Groups: AvosLocker, Hive, HelloKitty, LockBit 2.0 - 2021-08-25
         - Adding external analysis link: https://unit42.paloaltonetworks.com/emerging-ransomware-groups/
         - Adding SHA1 hash: 75f06b636efe53360287c0ff1f51ea7de1e7c8b5
         - Adding SHA1 hash: 488e532e55100da68eaeee30ba342cc05810e296
...
         - Adding SHA256 hash: f453e8ae426133ace544cd4bb1ab2435620a8d4d5f70b936d8f3118e22f254e8
         - Adding domain: monotal.xyz
         - Adding hostname: irc-nbg.v001.com

[user@testmachine ~]$ otx-misp --otx [otx-api-key] --server https://localhost --misp [misp-auth-key] --timestamp "2021-8-25" -vv
Error: 'TypeError' object has no attribute 'message'
[user@testmachine ~]$ echo $?
21

@robben-ar
Copy link

Same error!

@robben-ar
Copy link

Dear, there is a problem when you build the URL "OTXv2.py" to request the pulses from OTX. It is sending the extra "/" character when consulting the API .. it could be that they modified something in OTX and now they validate the sending of these extra values.

To solve it you have to modify line 8 in the "OTXv2.py" the following value:

"/api/v1/" --> "/api/v1"
image

Thanks @BlueJokerr for helping to find the error.

@Naaren128
Copy link

Naaren128 commented May 31, 2022

@robben-ar same error. but replacing the value didnt work either. @thejjw did you manage to find the fix?

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

No branches or pull requests

3 participants