No description
Find a file
Eduard Tolosa 98233a98b8
Add --max-redirects option.
Signed-off-by: Eduard Tolosa <edu4rdshl@protonmail.com>
2022-04-11 23:47:19 -05:00
.github Create FUNDING.yml 2021-07-26 09:12:15 +00:00
.vscode Add debug configs. 2022-03-17 16:17:12 -05:00
files Add file used in the benchmark 2020-10-05 15:38:18 -05:00
src Add --max-redirects option. 2022-04-11 23:47:19 -05:00
.gitignore Add support for using wordlists. 2021-05-09 04:51:02 -05:00
builder.sh Update builder.sh 2022-03-11 15:32:39 -05:00
Cargo.lock Implementations for the Findomain Plus integration. 2022-03-09 22:50:29 -05:00
Cargo.toml Implementations for the Findomain Plus integration. 2022-03-09 22:50:29 -05:00
fhc.1 Update month. 2022-03-17 16:17:33 -05:00
LICENSE Initial commit. 2020-10-03 16:12:39 -05:00
README.md README.md: add information about installation from AUR. 2020-10-13 13:33:49 -05:00

FHC

FHC stands for Fast HTTP Checker, it's written in Rust. Works on Linux, Windows, macOS, Android, Aarch64, ARM and possibly in your oven.

Goal

Offer the community an efficient HTTP checker tool.

Methodology

FHC try to resolve https first, if this fails then fallback to http, in that way you don't miss any active HTTP host.

Performance & speed

FHC is very resource friendly, you can use up to 1000 threads in an single core machine and this will work without any problem, the bottleneck for this tool is your network speed. By default, FHC is able to perform HTTP check for ~913 hosts per second in good network conditions (tested in an Google Cloud machine). Depending on how much host have only http (not https) and/or are alive the number of host resolved in average can be low/higher as the tool have or not to perform a double check. In our demo we used an real-world scenario performing resolution for google.com subdomains.

Demo

The hosts file used in the demo is here.

asciicast

Installation

Using precompiled binaries.

Download the asset from the releases page according to your platform.

Using the source code.

  1. You need to have the latest stable Rust version installed in your system.
  2. Clone the repo or download the source code, then run cargo build --release.
  3. Execute the tool from ./target/release/fhc or add it to your system PATH to use from anywhere.

Using the AUR packages. (Arch Linux)

fhc can be installed from available AUR packages using an AUR helper. For example,

yay -S fhc

If you prefer, you can clone the AUR packages and then compile them with makepkg. For example,

git clone https://aur.archlinux.org/fhc.git && cd fhc && makepkg -si

Usage

  • Show all HTTP urls depite their response codes:
cat hosts.txt | fhc
  • If you want to see only the HTTP host with 200-299 codes:
cat hosts.txt | fhc -2

You can tune the --timeout, -t/--threads, -u/--user-agent and other options according to your needs. See fhc --help