Skip to content

How to add a new module

Matt edited this page Mar 11, 2020 · 2 revisions

Contributing to theHarvester has gotten much easier with the latest updates!

How to add a new module

  1. Find a search engine or something interesting that returns data.
  2. Programatically create a way to get the results. or see how well our parser handles the results.
  3. Inside theHarvester/discovery, create a file called your_module.py.
  4. Copy an existing module's code into your new file as a template. We suggest using the module Baidu This module is fairly straightforward.
  5. If you need a custom parser for your results, take a look at other modules such as Bufferoverun or otxsearch.
  6. Pat yourself on the back as you have completed the hardest part!
  7. Go to line 37 of main and enter your module there.
  8. Scroll down to line 159 and add your module where it fits alphabetically.
  9. Go to line 123 and add your module there.

How to add a new module with an API

These steps are fairly similar for this method. We will only list the differences.

  1. Go to api-keys.yaml and enter your module in this format:
module_name:
 key: 
  1. Go to theHarvester/lib/core.py line 16, copy the method bing_key and replace bing with your module name.
  2. Inside /theHarvester/lib/discovery create a python file and copy the code from hunter or if the API requires post request look at the intelx module.

Everything else will be the same as creating a normal module!

Clone this wiki locally