Installation

Pick the installer that fits your platform. Dalfox is a single binary with no runtime to manage.

Homebrew (macOS & Linux)

brew install dalfox

The Homebrew formula tracks the latest stable release. Source: formulae.brew.sh/formula/dalfox.

The project's own tap builds the same release from source (so it pulls in Rust) and also installs the man page and shell completions:

brew install hahwul/dalfox/dalfox

Snap (Ubuntu / Linux)

sudo snap install dalfox

Arch Linux (AUR)

Using an AUR helper (recommended):

yay -S dalfox
# or
paru -S dalfox

Manual build from the AUR package:

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

Chocolatey (Windows)

choco install dalfox

Installs the prebuilt windows-x86_64 release binary and puts dalfox on your PATH.

Nix & NixOS

# Run once without installing
nix-shell -p dalfox

# Nix flakes: run the latest from GitHub
nix run github:hahwul/dalfox -- scan https://example.com

# Install into your profile
nix profile install github:hahwul/dalfox

Dalfox is in nixpkgs, where a new release reaches unstable first and can take a while. The flake builds from this repository's main branch, so it is never behind.

The flake builds for x86_64-linux, aarch64-linux and aarch64-darwin. Intel macOS is not on the list because nixpkgs unstable dropped x86_64-darwin. Use the macos-x86_64 release archive below instead.

To build Dalfox against your own nixpkgs instead of the one this flake pins, use the overlay. In your system flake:

# flake.nix
{
  inputs.dalfox.url = "github:hahwul/dalfox";

  outputs = { self, nixpkgs, dalfox, ... }@inputs: {
    nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
      specialArgs = { inherit inputs; };
      modules = [ ./configuration.nix ];
    };
  };
}

Then, in a module that receives inputs:

# configuration.nix
{ pkgs, inputs, ... }:
{
  nixpkgs.overlays = [ inputs.dalfox.overlays.default ];
  environment.systemPackages = [ pkgs.dalfox ];
}

The flake also has a development shell for working on Dalfox itself. It carries the Rust toolchain, just, and the Crystal compiler the repo's scripts/ need, but not the dalfox binary:

git clone https://github.com/hahwul/dalfox && cd dalfox
nix develop

With direnv installed, direnv allow picks the same shell up automatically from the repo's .envrc.

Docker

Multi-arch images (linux/amd64, linux/arm64) are published to Docker Hub and GitHub Container Registry. The binary sits at /app/dalfox and the image has no entrypoint, so name it in the command:

docker run --rm hahwul/dalfox:latest ./dalfox scan https://example.com

# or from GHCR
docker run --rm ghcr.io/hahwul/dalfox:latest ./dalfox scan https://example.com

A bare dalfox fails: /app is not on the image's PATH. To scan a URL list, mount it into the container, or pipe it in with -i:

docker run --rm -v "$PWD:/data" hahwul/dalfox:latest ./dalfox scan /data/urls.txt
cat urls.txt | docker run --rm -i hahwul/dalfox:latest ./dalfox scan

latest is the newest release. Each release is also tagged v<major>.<minor>.<patch>, and Docker Hub adds v<major>.<minor> and v<major>. ghcr.io/hahwul/dalfox:main tracks the main branch.

Cargo (from crates.io)

cargo install dalfox

Requires Rust 1.93 or newer (the crate's rust-version). Builds into ~/.cargo/bin/dalfox.

Prebuilt binaries

Grab a release archive for your OS/arch from github.com/hahwul/dalfox/releases, extract it, and drop the binary somewhere on your PATH (/usr/local/bin, ~/.local/bin, etc.).

We publish the following per release:

  • macos-x86_64, macos-aarch64
  • linux-x86_64 (glibc), linux-x86_64-musl (statically linked, recommended for Alpine, Docker, and CI)
  • linux-aarch64 (glibc), linux-aarch64-musl (statically linked)
  • windows-x86_64

Archives are named dalfox-v<version>-<platform>: .tar.gz on macOS and Linux, .zip on Windows. Linux also gets .deb and .rpm packages for both architectures. Every archive and package has its own .sha256 file next to it, and each release carries a CycloneDX SBOM (dalfox.cdx.xml).

Build from source

git clone https://github.com/hahwul/dalfox
cd dalfox
cargo build --release
# Binary at ./target/release/dalfox

You'll need Rust 1.93 or newer (2024 edition). Install with rustup if you don't have it.

Verify

dalfox --version

You should see a single line such as dalfox 3.2.4.

Shell completions

The hahwul/dalfox Homebrew tap, the AUR package, the .deb / .rpm packages and the Nix flake install bash, zsh and fish completions and the dalfox(1) man page for you.

Installed another way (the core brew install dalfox formula, Snap, Docker, Cargo, a release archive, a source build)? Generate them yourself:

dalfox completion bash > /etc/bash_completion.d/dalfox
dalfox completion zsh > "${fpath[1]}/_dalfox"
dalfox completion fish > ~/.config/fish/completions/dalfox.fish

powershell and elvish work too. See the CLI reference.

Getting help

Every command has built-in help:

dalfox --help
dalfox scan --help

Next steps

Run your first scan in the Quick Start. If you want to tune defaults before scanning, jump to Configuration.

ESC