How to Customize the Request Timeout in Holehe: Complete Guide

Use the -T or --timeout flag to set a custom timeout in seconds when running Holehe, or modify the default value in holehe/core.py for permanent changes.

Holehe is an open-source OSINT tool that checks whether an email address is registered on hundreds of websites. By default, it waits 10 seconds for each HTTP request before timing out. This article explains how to customize that timeout value using command-line arguments or by modifying the source code directly.

Command-Line Timeout Configuration

The fastest way to adjust the timeout is through Holehe's CLI. The tool accepts the -T (short form) or --timeout (long form) parameter, which accepts an integer value in seconds.

Basic Syntax

holehe -T <seconds> <email>
holehe --timeout <seconds> <email>

Common Use Cases


# Default 10-second timeout (no flag required)

holehe john.doe@example.com

# Faster timeout for quick scans on reliable networks

holehe -T 5 john.doe@example.com

# Extended timeout for slow connections or rate-limited targets

holehe --timeout 30 john.doe@example.com

# Very long timeout for unstable networks

holehe -T 60 john.doe@example.com

Where the Timeout Is Defined in Source Code

According to the megadose/holehe source code, the timeout configuration flows through two key locations in holehe/core.py:

CLI Argument Definition

Lines 194–195 register the timeout flag with argparse:


# holehe/core.py

parser.add_argument("-T", "--timeout", type=int, default=10,
                    required=False, dest="timeout",
                    help="Set max timeout value (default 10)")

This establishes:

  • Default value: 10 seconds
  • Accepted type: Integer
  • Optional flag: Not required to run the tool

Client Instantiation

Lines 209–213 create the httpx.AsyncClient using the parsed timeout value:


# holehe/core.py

client = httpx.AsyncClient(timeout=args.timeout)

This single client instance is shared across all modules in Holehe, meaning your timeout setting applies uniformly to every website check—social media platforms, shopping sites, developer tools, and all other supported services.

Permanently Changing the Default Timeout

If you frequently need a different timeout than 10 seconds, you can modify the source code rather than typing the flag each time.

Steps to Modify

  1. Locate your Holehe installation (or clone the repository):
git clone https://github.com/megadose/holehe.git
cd holehe
  1. Edit holehe/core.py and change the default parameter:

# Original

parser.add_argument("-T", "--timeout", type=int, default=10,
                    required=False, dest="timeout",
                    help="Set max timeout value (default 10)")

# Modified — now defaults to 20 seconds

parser.add_argument("-T", "--timeout", type=int, default=20,
                    required=False, dest="timeout",
                    help="Set max timeout value (default 20)")
  1. Reinstall the package:
pip install -e .

Or for production installation:

pip install --upgrade .

Timeout Behavior and Performance Considerations

The timeout value directly impacts Holehe's reliability and speed:

Timeout Best For Trade-off
3–5 seconds Fast scans, reliable networks May miss slow-responding sites
10 seconds (default) Balanced performance Good for most connections
30–60 seconds Slow/VPN connections, rate-limited targets Slower overall execution

Since Holehe runs checks asynchronously, a single slow site won't block others—but each individual request still respects your timeout ceiling.

Summary

  • Command line: Use holehe -T <seconds> or holehe --timeout <seconds> for one-off changes
  • Default location: Defined in holehe/core.py at line 194, passed to httpx.AsyncClient at line 213
  • Permanent change: Edit default=10 to your preferred value and reinstall with pip install -e .
  • Scope: The timeout applies globally to all HTTP requests performed by Holehe's modules

Frequently Asked Questions

What happens if a request exceeds the timeout?

Holehe catches the timeout exception and records the check as failed for that specific service. The tool continues processing remaining modules—timeouts don't crash the entire scan.

Why is the default timeout set to 10 seconds?

As implemented in megadose/holehe, the 10-second default balances responsiveness against false negatives. Many OSINT targets include slower international sites or services with rate limiting. Ten seconds captures most successful responses without making scans unbearably slow.

Can I set different timeouts for different modules?

No. The current architecture in holehe/core.py creates a single shared httpx.AsyncClient with one timeout value used globally. To implement per-module timeouts would require restructuring how clients are instantiated in each module file.

Does the timeout include DNS resolution time?

Yes. The timeout passed to httpx.AsyncClient covers the entire request lifecycle: DNS resolution, connection establishment, TLS handshake, and response download. If any phase exceeds your specified limit, the request aborts.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →