mirror of
https://github.com/laramies/theHarvester.git
synced 2026-10-19 14:31:35 +02:00
Every removal was verified against the full repo including tests: - fullhuntsearch: drop the unused data-intelligence filter framework (constants, add_filter/add_filters, advanced_search, nine search_* helpers, get_all_results, the filters branch in do_search, and the never-supplied process filters parameter); 528 -> 290 lines - myparser: drop six never-called methods (url_clean, fileurls, hostnames_all, set, urls, unique) - shodan_internetdb: stop collecting ports/CVEs/tags/CPEs that no route ever read; _has_results is unchanged because a valid payload always records its IP - githubcode: drop next_page_or_end and ErrorResult.body - securityscorecard, sherlockeye, haveibeenpwned, leaklookup: drop never-populated attributes and unwired getters (leaklookup keeps its routed get_emails) - windvane: drop never-called set_api_key and correct the docstring's env-var claim; duckduckgosearch: drop four unused attributes - mojeek, thc: unreachable returns; criminalip: a no-op wildcard filter that could never match; api_endpoints: dead 'POST' membership test; hunter/tomba: unused counter; takeover_evidence: no-op conditional - __main__: drop the rest_filename machinery (always empty; its other branch wrote into a nonexistent directory), unreachable NameError guards, and a pointless else: pass; screenshot durations no longer silently drop hours - output: print_linkedin_people loses its CLI-unreachable no-users-with-linkin-engine branch and its engines parameter
18 lines
531 B
Python
18 lines
531 B
Python
from __future__ import annotations
|
|
|
|
from theHarvester.lib.output import configure_logging, print_linkedin_people, sorted_unique
|
|
|
|
|
|
def test_sorted_unique_sorts_and_deduplicates() -> None:
|
|
assert sorted_unique(['b', 'a', 'b']) == ['a', 'b']
|
|
|
|
|
|
def test_print_linkedin_people_prints_people(capsys) -> None:
|
|
configure_logging(verbose=False)
|
|
print_linkedin_people(people=['bob', 'alice', 'bob'])
|
|
|
|
out = capsys.readouterr().out
|
|
assert 'LinkedIn Users found: 3' in out
|
|
assert 'alice' in out
|
|
assert 'bob' in out
|