MISP / MISP/misp-modules

Exception in passivetotal.py

Open
#117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
377
Forks
280
Avg merge
2d 2h
Merged PRs (30d)
10

Description

I'm not sure what caused this, just noticed this in the terminal I used the start misp-modules:

2017-04-05 15:26:23,920 - misp-modules - ERROR - Something went wrong:
Traceback (most recent call last):
  File "/opt/rh/rh-python34/root/usr/lib/python3.4/site-packages/misp_modules/__init__.py", line 197, in post
    response = yield tornado.gen.with_timeout(timeout, self.run_request(jsonpayload))
  File "/opt/rh/rh-python34/root/usr/lib64/python3.4/site-packages/tornado/gen.py", line 1015, in run
    value = future.result()
  File "/opt/rh/rh-python34/root/usr/lib64/python3.4/site-packages/tornado/concurrent.py", line 237, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/opt/rh/rh-python34/root/usr/lib64/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/rh/rh-python34/root/usr/lib/python3.4/site-packages/misp_modules/__init__.py", line 185, in run_request
    response = mhandlers[x['module']].handler(q=jsonpayload)
  File "/opt/rh/rh-python34/root/usr/lib/python3.4/site-packages/misp_modules/modules/expansion/passivetotal.py", line 305, in handler
    for service in profile['playbook']['services']:
TypeError: 'NoneType' object is not subscriptable

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at modules/expansion/passivetotal.py line 305 and inspect the handler's profile and playbook data when this traceback occurs. Reproduce the reported request and verify that the handler no longer raises the reported TypeError for that input.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.