Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
unfurl — 从 stdin 提供的 URL 中提取片段 | Kitploit
工具/GitHubGitHub/tomnomnom/unfurl
通用工具侦察信息收集
GitHubtomnomnom/unfurl

unfurl

从 stdin 提供的 URL 中提取片段

查看仓库
1.3k1363年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

unfurl

提取 stdin 提供的 URL 的各个部分

安装

如果你已经安装并配置好 Go:

root@kitploit:~
▶ go install github.com/tomnomnom/unfurl@latest

否则,下载适用于你平台的最新二进制文件,解压后将其移动到 $PATH 中的某个位置(例如 /usr/bin/):

root@kitploit:~
▶ wget https://github.com/tomnomnom/unfurl/releases/download/v0.0.1/unfurl-linux-amd64-0.0.1.tgz
▶ tar xzf unfurl-linux-amd64-0.0.1.tgz
▶ sudo mv unfurl /usr/bin/

用法

unfurl 处理通过 stdin 提供的 URL;这些 URL 可能来自类似这样的文件:

root@kitploit:~
▶ cat urls.txt
https://sub.example.com/users?id=123&name=Sam
https://sub.example.com/orgs?org=ExCo#about
http://example.net/about#contact

域名

你可以使用 domains 模式从 URL 中提取域名:

root@kitploit:~
▶ cat urls.txt | unfurl domains
sub.example.com
sub.example.com
example.net

如果你不想输出重复的值,可以使用 -u 或 --unique 标志:

root@kitploit:~
▶ cat urls.txt | unfurl --unique domains
sub.example.com
example.net

-u/--unique 标志适用于所有模式。

Apex 域名

你可以使用 apexes 模式提取域名的 apex 部分(即根域名,例如 http://sub.example.com 中的 example.com):

root@kitploit:~
▶ cat urls.txt | unfurl -u apexes
example.com
example.net

路径

root@kitploit:~
▶ cat urls.txt | unfurl paths
/users
/orgs
/about

查询字符串键

root@kitploit:~
▶ cat urls.txt | unfurl keys
id
name
org

查询字符串值

root@kitploit:~
▶ cat urls.txt | unfurl values
123
Sam
ExCo

查询字符串键/值对

root@kitploit:~
▶ cat urls.txt | unfurl keypairs
id=123
name=Sam
org=ExCo

JSON

root@kitploit:~
▶ cat urls.txt | unfurl json
{"scheme":"https","opaque":"","user":"","host":"sub.example.com","path":"/users","raw_path":"","raw_query":"id=123\u0026name=Sam","fragment":"","parameters":[{"key":"id","value":"123"},{"key":"name","value":"Sam"}],"url":"https://sub.example.com/users?id=123\u0026name=Sam","domain":"sub.example.com","subdomain":"sub","root":"example","tld":"com","apex":"example.com","port":"","extension":""}
{"scheme":"https","opaque":"","user":"","host":"sub.example.com","path":"/orgs","raw_path":"","raw_query":"org=ExCo","fragment":"about","parameters":[{"key":"org","value":"ExCo"}],"url":"https://sub.example.com/orgs?org=ExCo#about","domain":"sub.example.com","subdomain":"sub","root":"example","tld":"com","apex":"example.com","port":"","extension":""}
{"scheme":"http","opaque":"","user":"","host":"example.net","path":"/about","raw_path":"","raw_query":"","fragment":"contact","parameters":null,"url":"http://example.net/about#contact","domain":"example.net","subdomain":"","root":"example","tld":"net","apex":"example.net","port":"","extension":""}

自定义格式

你可以使用 format 模式指定自定义输出格式:

root@kitploit:~
▶ cat urls.txt | unfurl format %d%p
sub.example.com/users
sub.example.com/orgs
example.net/about

可用的格式指令如下:

root@kitploit:~
%%  A literal percent character
%s  The request scheme (e.g. https)
%u  The user info (e.g. user:pass)
%d  The domain (e.g. sub.example.com)
%S  The subdomain (e.g. sub)
%r  The root of domain (e.g. example)
%t  The TLD (e.g. com)
%P  The port (e.g. 8080)
%p  The path (e.g. /users)
%e  The path's file extension (e.g. jpg, html)
%q  The raw query string (e.g. a=1&b=2)
%f  The page fragment (e.g. page-section)
%@  Inserts an @ if user info is specified
%:  Inserts a colon if a port is specified
%?  Inserts a question mark if a query string exists
%#  Inserts a hash if a fragment exists
%a  Authority (alias for %u%@%d%:%P)

任何不匹配格式指令的字符都会原样保留:

root@kitploit:~
▶ cat urls.txt | unfurl -u format "%d (%s)"
sub.example.com (https)
example.net (http)

请注意,如果 URL 不包含所请求的数据,该 URL 将不会有输出:

root@kitploit:~
▶ echo http://example.com | unfurl format "%P"
▶ echo http://example.com:8080 | unfurl format "%P"
8080

帮助

root@kitploit:~
▶ unfurl -h
Format URLs provided on stdin

Usage:
  unfurl [OPTIONS] [MODE] [FORMATSTRING]

Options:
  -u, --unique   Only output unique values
  -v, --verbose  Verbose mode (output URL parse errors)

Modes:
  keys     Keys from the query string (one per line)
  values   Values from the query string (one per line)
  keypairs Key=value pairs from the query string (one per line)
  domains  The hostname (e.g. sub.example.com)
  paths    The request path (e.g. /users)
  apexes   The apex domain (e.g. example.com from sub.example.com)
  json     JSON encoded url/format objects
  format   Specify a custom format (see below)

Format Directives:
  %%  A literal percent character
  %s  The request scheme (e.g. https)
  %u  The user info (e.g. user:pass)
  %d  The domain (e.g. sub.example.com)
  %S  The subdomain (e.g. sub)
  %r  The root of domain (e.g. example)
  %t  The TLD (e.g. com)
  %P  The port (e.g. 8080)
  %p  The path (e.g. /users)
  %e  The path's file extension (e.g. jpg, html)
  %q  The raw query string (e.g. a=1&b=2)
  %f  The page fragment (e.g. page-section)
  %@  Inserts an @ if user info is specified
  %:  Inserts a colon if a port is specified
  %?  Inserts a question mark if a query string exists
  %#  Inserts a hash if a fragment exists
  %a  Authority (alias for %u%@%d%:%P)

Examples:
  cat urls.txt | unfurl keys
  cat urls.txt | unfurl format %s://%d%p?%q
下载工具