Skip to main content

High-performance HTTP probing engine written in Rust

Project description

Hprobe 🚀 PyPI Downloads

A high-performance HTTP probing tool for asset discovery.

hprobe 是一个高性能 HTTP 探测引擎,基于 Rust 实现,并通过 Python 提供简单易用接口。 它支持同步和异步调用,能够快速探测目标 HTTP 服务、端口、指纹等,适用于大规模资产发现/网络空间测绘。

  • 跨平台(Linux / Windows / macOS)
  • 支持多线程和异步模式
  • 可统一全局配置,方便批量调用
  • 提供参数化和字典配置两种接口

🔗 GitHub: https://github.com/FlyfishSec/hprobe-python


Core Advantages 📌| 核心优势

  1. Tokio 异步运行时,极致高并发

    • 基于 Tokio 异步运行时构建,充分利用多核性能,支撑大规模高并发探测
  2. 纳秒级 ASN 查询

    • 自定义二进制结构体,采用零拷贝设计 + mmap 内存映射 + 二分查找,实现纳秒级 ASN 信息查询
  3. 极速 Web 指纹识别

    • 集成 17000 + 指纹规则,进程内单例懒加载,10MB HTML 毫秒级指纹识别

Quick Start⚡| 快速开始

# PyPI 安装(Python >=3.7)
pip install hprobe

示例1 同步快速调用(配置字典调用)

import hprobe

# 核心配置
CORE_CONFIG = {
    # 目标支持ip/domain/url,示例:192.168.1.1/example.com/192.168.1.1:443/https://example.com
    "target": "example.com",  # 必选
    "ports": [80, 443],       # 可选:探测端口,不填则使用自动端口识别
    "timeout": 5.0,           # 可选:超时配置,默认10s
    "threads": 64,            # 可选:并发数配置,默认80
    "tls_info": True,         # 可选:开启TLS证书信息检测
    "asn": True,              # 可选:开启ASN归属查询
    "tech_detect": True,      # 可选:开启技术栈识别
    "fingerprint": True,      # 可选:开启Web指纹识别
    "silent": True,           # 可选:禁用命令行冗余日志
}

# 一行调用(字典接口,推荐)
result = hprobe.scan_target_with_config(CORE_CONFIG)
# 打印结果(返回字典,含所有探测信息)
print("探测结果:", result)

示例2 异步快速调用(配置字典调用)

import asyncio
import hprobe

# 核心配置
CORE_CONFIG = {
    # 目标支持ip/domain/cidr/url
    # 示例:192.168.1.1、example.com、192.168.1.1:443、192.168.1.1/24、https://example.com
    "target": "192.168.1.1/24",  # 必选
    "ports": [80, 443],       # 可选:探测端口,不填则使用自动端口识别
    "timeout": 5.0,           # 可选:超时配置,默认10s
    "threads": 64,            # 可选:并发数配置,默认80
    "tls_info": True,         # 可选:开启TLS证书信息检测
    "asn": True,              # 可选:开启ASN归属查询
    "tech_detect": True,      # 可选:开启技术栈识别
    "fingerprint": True,      # 可选:开启Web指纹识别
    "silent": True,           # 可选:禁用命令行冗余日志
}

async def async_core_scan():
    # 异步字典接口,一行调用
    result = await hprobe.scan_target_with_config_async(CORE_CONFIG)
    print("探测结果:", result)

# 执行异步函数并打印结果
asyncio.run(async_core_scan())

⚙️ 进阶参数配置说明

# ⚠️ 可选:自定义数据目录
# import os
# os.environ["HPROBE_DATA_ROOT"] = r"C:\mydata\"

🔹 基础参数

  • target
    扫描目标,支持 IP 或域名

  • ports
    探测端口列表,例如:[80, 443]

  • threads
    并发线程数,用于控制整体并发规模

  • timeout
    单请求超时时间(单位:秒)

  • methods
    HTTP 请求方法:GET / POST

  • scheme_policy
    协议策略:Auto / HTTP / HTTPS


🔹 HTTP / 请求相关参数

  • user_agent
    自定义 User-Agent,默认使用内置随机

  • max_redirects
    最大重定向次数,设置为0则禁止重定向

  • post_data
    POST 请求体数据(字符串)

  • post_file
    POST 文件路径(与 post_data 二选一)

  • content_type
    POST 请求 Content-Type
    默认值:application/x-www-form-urlencoded


🔹 功能开关(布尔值)

  • asn
    是否启用 ASN 查询

  • tech_detect
    是否启用技术栈识别

  • fingerprint
    是否启用 Web 指纹识别

  • screenshot
    是否启用网页截图

  • common_ports
    是否启用常见端口扫描


🔹 其他参数

  • silent
    静默模式,仅输出结果,不打印日志

  • dns
    指定dns: [223.5.5.5,8.8.8.8]

  • proxy
    使用代理(http/https/socks):socks5://127.0.0.1:1080

License 📄 | 许可证

Copyright (c) 2026 FlyfishSec All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

hprobe-0.4.1-cp37-abi3-win_amd64.whl (11.8 MB view details)

Uploaded CPython 3.7+Windows x86-64

hprobe-0.4.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

File details

Details for the file hprobe-0.4.1-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: hprobe-0.4.1-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 11.8 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for hprobe-0.4.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 159b2fbc7aa331b948c6443509c27ab25d3244f75595d413c5a980fc116ea727
MD5 cb49053b0e96e0229c47d816a163aa0b
BLAKE2b-256 fa70b9c7ab5a426ee9809d0b4b63a4d41986f02c79a4f855514bc8e6c1636d99

See more details on using hashes here.

File details

Details for the file hprobe-0.4.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hprobe-0.4.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4aa26db319a0e737845fba568a015e1f800545ccc8b638c0032f31ff85cd555d
MD5 dbf30541d5792b45c5eb7dc110a6c073
BLAKE2b-256 c1acf663061df49a090f623ef3932f435e759416621a2db35736079dccb8c300

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page