Commit Graph
127 Commits
Author SHA1 Message Date
Alisson Moretto 2f5ba88b79 Sherlockeye Integration 2026-05-30 10:56:08 -03:00
L1ghtn1ng 98dbda9af7 Harden API auth and fix type lint issues 2026-05-10 05:04:06 +01:00
J.TownsendandGitHub aff0e652a1 Merge pull request #2304 from ChrisJr404/surface-work-item-errors
fix(worker): surface the underlying exception when a work item fails (#2227)
2026-05-10 03:46:35 +01:00
Chris (ChrisJr404) 131e23813a feat(discovery): add Dymo API data verifier source (#2300)
Adds a new passive source that calls the Dymo data verifier endpoint
(https://api.tpeoficial.com/v1/private/secure/verify) with the target
domain. The response is stored on the source for downstream inspection
and any matching canonical domain or didYouMean suggestion is added to
the host set so the rest of the pipeline can resolve it.

The source follows the existing plugin shape: SearchDymo lives in
theHarvester/discovery/dymosearch.py, the API key is read from the
``dymo`` block in api-keys.yaml via Core.dymo_key(), and the engine is
registered in get_supportedengines() and the -b/--source dispatcher.

Tests cover the missing-key path, header/payload shape, the empty,
unrelated-suggestion and non-dict-response branches, and the
get_supportedengines() registration. Closes #2300.
2026-05-06 11:04:34 -04:00
Chris (ChrisJr404) 4fb1ad7ef3 fix(worker): surface the underlying exception when a work item fails (#2227)
The async worker that drains the engine queue catches `Exception` with
no `as` binding and prints the bare line

    "A error occurred while processing a 'work item'."

That message both swallows the actual error class+text (so users
report bugs like #2227 with no actionable detail and the maintainer
has to ask them to repro under more verbosity) and reads "A error"
instead of the grammatical "An error".

Bind the exception, print its type and message, and fix the article.
The shodan integration test (`tests/discovery/test_shodan_engine.py`)
already asserts the message is not in output on the happy path; the
assertion is updated to match the new string.

Closes #2227.
2026-05-03 11:35:54 -04:00
SedatandClaude Sonnet 4.6 e4da0efa27 fix(builtwith): pass content_type=None to accept text/json responses
BuiltWith API returns 'text/json; charset=utf-8' as the Content-Type
header instead of 'application/json'. aiohttp's response.json() raises
a ContentTypeError by default when the MIME type is not application/json.

Passing content_type=None tells aiohttp to skip the content-type check
and parse the response body as JSON regardless of the declared MIME type.

Fixes #2235

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 15:39:02 +11:00
cyberkimchi cd0f300b2e Add Mojeek search source with API and scraping support + README file update 2026-03-09 15:17:54 +01:00
L1ghtn1ng acf099f6ac Bump dependencies, replace UJSONResponse with JSONResponse, and add _API_KEY_FIELDS to Core. 2026-03-07 08:26:21 +00:00
AliceandGitHub eb9b6318fa Merge branch 'laramies:master' into feat-mojeek 2026-03-04 16:10:52 +01:00
L1ghtn1ng 1af278d12b Fix all mypy and ty type check errors and add CHANGELOG.md file 2026-02-22 02:53:53 +00:00
L1ghtn1ng 6741919076 Update censys to match the current api docs 2026-02-20 14:16:07 +00:00
L1ghtn1ng ffc7420d71 Update rocketreach module to latest api docs 2026-02-20 14:01:42 +00:00
L1ghtn1ng 06c2fbd955 Fixes #2229 2026-02-20 13:35:40 +00:00
cyberkimchi 06d8fc4832 feat(discovery): add Mojeek search engine support 2026-02-13 14:11:28 +01:00
L1ghtn1ng 419291a3e7 implement fixes by cyberkimchi in #2227 2026-02-08 13:31:49 +00:00
L1ghtn1ng fa2dedd38b Refactor and standardize output handling with new utilities in theHarvester.lib.output, add tests for print_linkedin_sections and sorted_unique. Fix regex inaccuracies and enhance CORS validation. 2026-01-24 11:28:20 +00:00
L1ghtn1ng ffe1f3a832 Synchronize api-keys.yaml with Core class API key references and add a test to ensure consistency 2026-01-18 01:15:26 +00:00
L1ghtn1ng 3d7489c962 Add security tests and enhance input sanitization mechanisms
- Introduced comprehensive security tests, including CORS configuration, XML injection prevention, path traversal prevention, and information disclosure protection.
- Improved input sanitization for filenames and XML content to mitigate injection attacks and ensure safe handling.
- Updated CORS middleware to restrict HTTP methods and block credentials with wildcard origins.
- Removed traceback exposure in API error responses, even in debug mode.
- Verified rate limiting and input validation for sensitive API endpoints.
- Ensured no hardcoded secrets are present in the main codebase.
2026-01-17 01:05:40 +00:00
L1ghtn1ng bc2fce07cc Update proxy parameter handling in tests: expand default structure to include both "http" and "socks5" fields 2026-01-06 22:14:02 +00:00
RandGitHub 86ad5ad945 feat(discovery): add THC subdomain enumeration module (#2221)
* feat(discovery): add THC subdomain enumeration module

Add new THC module integrating ip.thc.org for subdomain discovery.

Features:
- Free service, no API key required
- No rate limits
- Fast plain-text response parsing

Includes 24 comprehensive tests covering:
- API endpoint validation
- Subdomain search functionality
- Edge cases (empty, unicode, special chars)
- Proxy support
- Response format validation
- Integration with theHarvester framework

Closes #2217

* fix: translate test comments to English

Accidentally pushed the Spanish version of the test file.
This commit updates all docstrings and comments to English.

* fix: correct rate limit documentation and add rate limit header test

- Remove 'no rate limits' claim from README.md
- Add test_api_returns_rate_limit_headers to verify x-ratelimit-* headers

* feat: add explicit rate limit handling

Based on bravesearch.py pattern:
- Detect HTTP 429 status code
- Read x-ratelimit-remaining header
- Implement retry logic with backoff (3 retries, 2s base delay)
- Handle rate limit exceptions

Added test for rate limit settings initialization.
2025-12-31 09:42:17 +00:00
Branch VincentandGitHub 26c8d639be Merge pull request #2220
* support python 3.14

* fix syntax warnings

* bump dockerfile to 3.14, optimize build time + size
2025-12-30 09:36:19 +00:00
L1ghtn1ng 2bb20d29ad Refactor hackertarget module follow core logic to make it consistent with the rest of the code base since the api key support got added. 2025-12-21 05:31:38 +00:00
Raghav ChowdaryandGitHub 4c803566a0 Merge pull request #2142
* feat: add Hackertarget API key support (fixes #2122)

* feat(hackertarget): add API key support + tests (fixes #2122)

* style: run ruff fixes
2025-12-21 05:13:39 +00:00
L1ghtn1ng 3f7450b35b Refactor test_otx.py: Remove unused test_api and refine exception handling in test_search 2025-10-12 00:58:20 +01:00
L1ghtn1ng be106ad779 Add missing @pytest.mark.asyncio decorators to async tests and improve error handling in otxsearch.py 2025-10-12 00:03:13 +01:00
L1ghtn1ng 2b4732497f Replace requests with httpx for improved async support and update related tests accordingly. 2025-08-29 03:20:58 +01:00
L1ghtn1ng 61eb9f8893 Add tests for SearchBaidu to validate parsing, pagination limits, and proxy usage. 2025-08-09 19:00:58 +01:00
L1ghtn1ng e2b044e109 Add tests for SearchGithubCode process; handle edge cases in pagination and retries
- Implemented unittests to validate `process` method behavior under error, retry, and pagination conditions.
- Introduced safeguards against infinite loops in pagination and retries within `SearchGithubCode`.
2025-08-09 03:45:31 +01:00
L1ghtn1ng 51d76e4ed1 Fix mypy errors lee to qa 2025-08-08 01:51:44 +01:00
L1ghtn1ng 7a539ae155 Fix #2012 2025-07-08 21:56:54 +01:00
L1ghtn1ng e758a94f26 remove anubis module as the site has been down for a while now 2025-05-26 23:24:01 +01:00
L1ghtn1ng d1a983f6fb fix ci/cd error 2025-05-18 18:48:38 +01:00
L1ghtn1ng 93966a4a24 fix mypy errors 2025-01-26 06:28:18 +00:00
L1ghtn1ng 13a0cdd62a Add async pagination helper and update pytest settings
Introduce the `next_page_or_end` method in `githubcode.py` to handle pagination. Additionally, modify the test case and upgrade pytest settings in `pyproject.toml` to the latest versions, ensuring compatibility and updated configurations.
2024-10-27 01:02:05 +01:00
L1ghtn1ng 467a33fd3a remove test that is not stable enough due to the site not always being up or is getting blocked intermittently 2023-12-16 13:46:38 +00:00
L1ghtn1ng cddcb5f383 Fix otx test 2023-11-12 22:24:45 +00:00
Branch VincentandGitHub 4d825aaf33 build: migrate to pep517 backend (#1505)
* build: migrate to pep517 backend

* test loading config files
2023-10-08 19:45:23 +01:00
J.TownsendandGitHub 76ce3b3c6f lint fix 2023-10-02 00:18:00 +01:00
J.Townsend c397275cac fix test 2023-09-24 16:15:35 +00:00
yoonthegoonandJ.Townsend c13843ec0d #1492 run black . and isort . 2023-07-27 01:34:21 +01:00
éclairevoyantandJ.Townsend bbe3f02a07 Delete qwant tests (see #1390) 2023-05-04 08:52:04 +01:00
MattandGitHub 90082dbaa0 Added 4 new sources, Removed 2 Sources, Added custom DNS resolver, backported to python3.9, and other misc changes (#1381)
* Added call to api endpoint to explicitly gather subdomains from zoomeye, updated user agents, replaced orjson with ujson, and fixed substring not found error.

* Updated orjson to ujson.

* Fixed semantic error in html check in google workaround.

* Fixed flake8 errors.

* Fixed VT to use API.

* Fixed virustotal module.

* Fixed possible edge case that could possibly cause an infinite loop.

* Removed broken modules.

* Added 4 new sources: brave, criminalip, hunterhow, and subdomainfinderc99, added dnsresolve, and other misc changes.

* Added TODO comment.

* Fixed bin\theHarvester to allow python3.9

* Pep8 newline at end of file.

* Fixed error when passing in comma seperated resolvers and allow for user to pass in --dns-resolve flag with no arguments to use default resolvers that user has.
2023-04-10 18:51:04 +01:00
J.TownsendandGitHub b50f2ad2c5 remove sublist3r test as the domain no longer works 2023-04-06 12:59:07 +01:00
L1ghtn1ng 3a2c180295 Remove missed omnisint ci removal and version import fix 2022-11-13 01:33:01 +00:00
L1ghtn1ng f175269941 add a boat load of static typing fixes 2022-10-31 00:51:59 +00:00
L1ghtn1ng 56fe724a1c sublist3r Skipping on Github CI due unstable site 2022-08-14 03:03:04 +01:00
J.TownsendandGitHub 72d8dcad21 Flake8 fixes (#1181)
* Flake8 fixes

* Remove test due to bufferover run moving to api only
2022-08-14 01:23:56 +01:00
J.TownsendandGitHub 22e1eb9bdb A lot of changes and fixes (#1168)
* add pytest.ini file and fix test warning in qwantsearch

* ignore unsed imports

* Remove n45ht as the api is down

* Remove modules that use google as google blocks you after one go

* Remove missed code from when removing modules that use google

* Remove missed code from when removing modules that use google

* Add new vt-py dep and update pytest

* WIP virustotal migration to api

* Remove test that fails due to how the api returns not found entries

* Remove entries from myparser re google

* update fastapi and starlette

* update version

* Update dockerfile to use dev ubuntu version

* remove spyse module

* remove spyse dep

* fix tests by removing un-needed tests and indentation fix

* fix some mypy errors

* remove spyse and remove color output and fix mypy error

* flake8 fixes

* bump version and set it a dev version
2022-08-03 23:12:59 +01:00
J.TownsendandGitHub 15fe11130c Add new n45ht module, lots of results returned (#899)
* Add new fullhunt module

* Remove python checks in the run script as they are not needed anymore

* Remove netcraft from ci as it is not needed

* Update Dockerfile to fix security issues

* Add new n45ht module, lots of results returned
2021-10-24 04:10:37 +01:00
L1ghtn1ng 8f978821af Fix omnisint module 2021-10-04 00:57:57 +01:00