pwnwriter/haylxon
GitHub: pwnwriter/haylxon
基于Rust和Chromium无头浏览器的高性能命令行网页截图工具,支持批量URL快速截图与丰富的自定义选项。
Stars: 430 | Forks: 20
# Haylxon 🔥🦀
`SHOOT BEFORE THE BLINK` || [`Haylxon`](https://github.com/pwnwriter/haylxon/), 一款体现 [`K1SS`](https://en.wikipedia.org/wiki/KISS_principle) 哲学的工具,利用 `chromes` 的 [`Headless`](https://en.wikipedia.org/wiki/Headless) 特性以闪电般的速度截取 `网页/URL` 的屏幕快照,这意味着你需要一个 [***`chromium based browser`***](https://en.wikipedia.org/wiki/Chromium_(web_browser) 才能使其工作。
从零开始构建,注重易用性、性能、美观的用户界面和便携性。 💖
[](https://ko-fi.com/pwnwriter)

## 目录 📔
* [`功能`](#features)
* [`安装`](#installation)
* [`Hxn 实战`](#action)
* [`基准测试`](#benchmarking)
* [`贡献`](#contribution)
* [`支持`](#support)
* [`另请参阅`](#see)
* [`许可证`](#license)
* [`常见问题`](#faq)

## 功能 🍙
- **快速**:[`Hxn`](https://github.com/pwnwriter/haylxon) 专为速度而设计,这完全归功于 [`rustlang`](https://rust-lang.org)。 🦀
- **便携**:你可以在 [`*nix`](https://en.wikipedia.org/wiki/Linux) 和 [`windows`](https://en.wikipedia.org/wiki/Microsoft_Windows) 上使用 [`haylxon`](https://github.com/pwnwriter/haylxon/)。
- **易用**:该工具设计非常人性化,选项很少,但能完成用户期望的所有必要工作。👨🎨
- **简单**:正如 always [`Keeping It Simple and Stupid`](https://en.wikipedia.org/wiki/KISS_principle)
## 安装 📩
- **手动**:你可以直接从 [**releases**](https://github.com/pwnwriter/haylxon/releases) 下载适合你架构的二进制文件并运行。
- **一行命令**:运行此单行脚本
```
wget -qO- "$(curl -qfsSL "https://api.github.com/repos/pwnwriter/haylxon/releases/latest" | jq -r '.assets[].browser_download_url' | grep -Ei "$(uname -m).*$(uname -s).*musl" | grep -v "\.sha")" | tar -xzf - --strip-components=1 && ./hxn -h
```
🪄 Binary
```
git clone --depth=1 https://github.com/pwnwriter/haylxon --branch=main
cd haylxon
cargo build --release
```
然后进入 `release` 目录并运行 `./hxn`,或者将 `binary` 移动到任何 `$PATH` 中以便从任何地方即时访问。
🌼 源码
- 使用 [crates.io](https://crates.io/crates/hxn)
cargo install hxn
- 使用 [binstall](https://github.com/cargo-bins/cargo-binstall)
cargo binstall hxn
🎠 Cargo
```
sudo/doas pacman -Syyy hxn
```
🎠 METIS Linux
```
paru/yay -S haylxon-git
```
💢 Arch user repository
```
# 从源码构建并运行
nix run github:pwnwriter/haylxon
# 不使用 flakes:
nix-env -iA nixpkgs.haylxon
# 使用 flakes:
nix profile install nixpkgs#haylxon
```
❄️ On Nix
hxn -b $(which brave) -u https://example.com
单个 URL
hxn -b $(which brave) -f urls.txt
从文件读取多个 URL
cat urls.txt | hxn -b $(which brave) --stdin
从 stdin 读取 URL
cat urls.txt | hxn -b $(which brave) -x 144 -y 400 --stdin
自定义尺寸
hxn -b $(which brave) -f urls.txt --ports 8080,8081
带端口
hxn -b $(which brave) -u 任意 JavaScript
hxn -b $(which brave) -u https://example.com --fullpage
全页截图
hxn -b $(which brave) -u https://example.com --screenshot-type jpeg
截图格式
hxn -b $(which brave) -u https://example.com --proxy socks5://127.0.0.1:9050
代理
hxn -b $(which brave) -f urls.txt --user-agent "random"
自定义 UA
hxn -b $(which brave) -f urls.txt --json
JSON 输出
hxn -b $(which brave) -f urls.txt --silent
静默模式
hxn -b $(which brave) -f urls.txt --timeout 200 --delay 5
超时和延迟
hxn -b $(which brave) -f urls.txt --tabs 8
并行标签页
hxn -b $(which brave) -f urls.txt --accept-invalid-certs
接受无效证书
安装依赖 -
pkg install tur-repo -y ; pkg install chromium -y
ln -s "$PREFIX/bin/chromium-browser" "$PREFIX/bin/chromium"
termux 中使用 hxn
Copyright © 2023 - present pwnwriter me ☘️