MISP / MISP/misp-modules

google_search ... NameError:name 'google' is not defined

Open
#601 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Playing with some of the modules and came across this error, I seem to have a lot of them working now, BUT, I got this error on the google search?

Feb 16 19:14:44 MISP misp-modules[1794626]: File "/var/www/MISP/venv/lib/python3.8/site-packages/misp_modules/__init__.py", line 188, in run_request Feb 16 19:14:44 MISP misp-modules[1794626]: response = mhandlers[module].handler(q=jsonpayload) Feb 16 19:14:44 MISP misp-modules[1794626]: File "/var/www/MISP/venv/lib/python3.8/site-packages/misp_modules/modules/expansion/google_search.py", line 30,> Feb 16 19:14:44 MISP misp-modules[1794626]: search_results = google.search(request['url'], num_page) Feb 16 19:14:44 MISP misp-modules[1794626]: NameError: name 'google' is not defined

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 by reading modules/expansion/google_search.py, especially the call at line 30, and inspect how its imports and dependencies are configured. Reproduce the Google Search expansion request and trace why the referenced name is unavailable; done means the handler runs without this NameError and the module’s relevant test or request path passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
search
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.