SkillAgentSearch skills...

Dirsx

dirsx 是一款能够自动化过滤扫描结果的目录扫描工具

Install / Use

/learn @chasingboy/Dirsx
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<h1 align="center">dirsx</h1> <h3 align="center">dirsx 是一款能够自动化过滤扫描结果的目录扫描工具</h3> <p align="center"> <img src="https://img.shields.io/badge/Version-V1.8.0-green?style=flat"> <img src="https://img.shields.io/github/stars/chasingboy/dirsx?style=flat&labelColor=rgb(41%2C52%2C52)&color=green"> <img src="https://img.shields.io/github/issues/chasingboy/dirsx"> <img src="https://img.shields.io/github/downloads/chasingboy/dirsx/total?style=flat&labelColor=rgb(41%2C52%2C52)&color=green"> <img src="https://visitor-badge.laobi.icu/badge?page_id=chasingboy.dirsx&left_color=green&right_color=#66ccff"> </p> <img width="1154" alt="image" src="https://github.com/user-attachments/assets/87879581-7278-4e3f-8e89-02487f429acd">

前言

当时正值华为发布遥遥领先, 加上“遥遥领先”只是开个玩笑, 大佬们见笑了

平时使用过 dirsearch|dirmap 等一些目录扫描工具,针对如今的 WEB 多样化,对扫描结果的过滤总感觉与预期不符合。因此下定决心造个轮子,就这样有了 dirsx。当时是使用 python 写的,但是可移植性不是很好。所以使用 golang 进行重构,顺便学习一下 golang。

功能

大部分功能其他工具都有, 只是根据个人习惯更改</br>

✅ 支持使用 html 相似度对结果进行过滤</br> ✅ 支持对 301、302、403 状态进行二次判断</br> ✅ 支持对 json 返回结果进行判断</br> ✅ 支持字典第一个字母大写|全部字母大写|添加前后缀</br> ✅ 支持返回页面 title, 如无 title 返回内容前面 30 个字符串 (默认|设置)</br> ✅ 支持自动过滤模式, 默认开启 (开启|关闭)</br> ✅ 支持 httpx 工具探测 URL 存活</br> ✅ 支持 ffuf 工具部分 FUZZ 功能</br>

基本使用

🏷️ 指定字典进行扫描

dirsx -u https://www.baidu.com -w words.txt

🏷️ 指定目录递归扫描, 目前暂无添加结果递归功能扫描,担心目录误报

dirsx -u https://www.baidu.com -w words.txt --split

# https://www.baidu.com/a/b/
# -> https://www.baidu.com/a/
# -> https://www.baidu.com/a/b/

🏷️ 指定备份文件进行扫描

dirsx -u https://www.baidu.com -w words.txt --bak

image

🏷️ 指定添加后缀进行扫描

dirsx -u https://www.baidu.com -w words.txt --suffix h5

# https://www.baidu.com/admin
# -> https://www.baidu.com/adminh5

🏷️ 指定添加 cookie | headers

# --cookie
dirsx -u https://www.baidu.com -w words.txt --cookie "session=admin"

# --headers
dirsx -u https://www.baidu.com -w words.txt --headers "Authorization: bearer eyJ0eX..." --headers "X-Forwarded-For: 127.0.0.1"

# --headers-file
dirsx -u https://www.baidu.com -w words.txt --headers-file headers.txt

🏷️ 内置一些常用字典选择, 在没有指定字典时显示该列表

  • 常见目录字典
  • dirsearch 的自带字典
  • 长度为 1-5 的字母组合
  • ... ...
~ kali$ dirsx -u http://127.0.0.1/


    ██████╗ ██╗██████╗ ███████╗██╗  ██╗              
    ██╔══██╗██║██╔══██╗██╔════╝╚██╗██╔╝  
    ██║  ██║██║██████╔╝███████╗ ╚███╔╝ 
    ██║  ██║██║██╔══██╗╚════██║ ██╔██╗ 
    ██████╔╝██║██║  ██║███████║██╔╝ ██╗
    ╚═════╝ ╚═╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝
                                       1.1.0
                        xboy@遥遥领先

[+] You have not appoint payloads, so you can select from the list: 
[0] fuzzing-dirs-common.txt
[1] fuzzing-dirs-dirsearch.txt
[2] fuzzing-files-php.txt
[3] fuzzing-letter-len1.txt
[4] fuzzing-letter-len2.txt
[5] fuzzing-letter-len3.txt
[6] fuzzing-letter-len4.txt
... ...
[+] Select payloads with number: 1

--httpx 模式

增加 httpx 模式, 可以在没有 httpx 工具的情况下用来探测 WEB 服务

dirsx -u https://www.baidu.com --httpx
<img width="1316" alt="image" src="https://github.com/chasingboy/dirsx/blob/main/assets/httpx.png">

--ffuf 模式

增加 ffuf 模式, 用法与 ffuf 工具一样, 使用 FUZZ 指定 Fuzzing 位置

# Fuzzing dirs
dirsx --ffuf -u http://127.0.0.1/FUZZ -w words.txt
dirsx --ffuf -u http://127.0.0.1/FUZZ.php -w words.txt
dirsx --ffuf -u http://127.0.0.1/FUZZ/index.php -w words.txt

# Fuzzing headers
dirsx --ffuf -u http://127.0.0.1/ -H "x-forwarded-for: FUZZ"

dirsx -h

~ kali$ dirsx -h


    ██████╗ ██╗██████╗ ███████╗██╗  ██╗              
    ██╔══██╗██║██╔══██╗██╔════╝╚██╗██╔╝  
    ██║  ██║██║██████╔╝███████╗ ╚███╔╝ 
    ██║  ██║██║██╔══██╗╚════██║ ██╔██╗ 
    ██████╔╝██║██║  ██║███████║██╔╝ ██╗
    ╚═════╝ ╚═╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝
                                       1.8.2
                        xboy@遥遥领先
Usage:
  dirsx [OPTIONS]

Common Options:
  -u, --url=          input target url to scan
  -l, --list=         input file containing list of target urls
  -w, --wordlist=     appoint wordlist for scanning directory
      --title-len=    set title display length (default: 30)
  -t, --threads=      number of threads to use (default: 20)
      --timeout=      timeout in seconds (default: 5)
  -o, --output=       file to write output results
      --json          output results in json format
  -X=                 method of http requests (default: GET)
      --cookie=       set request cookies eg: --cookie "session=admin"
  -H, --headers=      set request headers string[] eg: -H "Token: admin=true" -H "Cookie:
                      login=true"
      --headers-file= set request headers file eg: --headers-file headers.txt
      --is-redirect   follow http redirects (default: false)
      --proxy=        set request proxy eg: --proxy http://127.0.0.1:8080
      --split         enable spliting the url path eg: /a/b -> /a/, /a/b (default: false)
      --no-smart      disable smart mode (automated filtering)
      --no-show-bar   disable show progress bar
      --word-first    prioritize words over urls when scanning

Response Options:
  -c, --code=         match response with specified status code eg: 200,302
  -x, --excode=       exclude response with specified status code eg: 400,404 (default:
                      400,401,404,406,416,501,502,503)
  -s, --string=       match response with specified string
      --exstring=     exclude response with specified string

Payloads Options:
      --upper-title   capitalize the first letter eg: admin -> Admin
      --upper-all     capitalize the all letter eg: admin -> ADMIN
      --prefix=       add prefix of payloads
      --suffix=       add suffix of payloads
  -e, --extension=    add extension eg: -e php,html
      --remove-ext=   remove extension eg: --remove-ext php | admin.php -> admin
      --bak           enable scanning backup file (default:false)

Fuzzing Options:
      --ffuf          ffuf mode - fuzzing target like ffuf tool eg: http://127.0.0.1/FUZZ.php

Httpx Options:
      --httpx         httpx mode - probe url like httpx tool
      --protocol=     probe with protocol scheme specified in input (http|https) eg: --protocol
                      https (default: all)
      --path=         path or list of paths to probe (comma-separated, file)

Help Options:
  -h, --help          Show this help message

字典添加

可在 dicts 目录下根据个人需求更新常用字典

dirsx $ tree
.
├── dicts
│   ├── fuzzing-dirs-common.txt
│   ├── fuzzing-dirs-dirsearch.txt
│   ├── fuzzing-files-php.txt
│   ├── fuzzing-letter-len1.txt
│   ├── fuzzing-letter-len2.txt
│   ├── fuzzing-letter-len3.txt
│   ├── fuzzing-letter-len4.txt
│   ├── fuzzing-months-1-12.txt
│   ├── fuzzing-numbers-0-9.txt
│   ├── fuzzing-payloads-aspx.txt
│   ├── fuzzing-payloads-bakfile.txt
│   ├── fuzzing-payloads-common.txt
│   ├── fuzzing-payloads-java.txt
│   ├── fuzzing-payloads-null.txt
│   ├── fuzzing-payloads-php.txt
│   ├── fuzzing-routers-common.txt
│   ├── fuzzing-words-len1-5.txt
│   └── fuzzing-years-1990-2024.txt
├── dirsx

dirsx 安装

根据对应系统类型下载执行文件 https://github.com/chasingboy/dirsx/releases

⚠️注意: 源代码中删除了部分还需要完善的代码,所以请不要使用源代码编译

window 10 终端颜色显示问题, 可以更换系统终端为 window terminal 解决此问题 https://github.com/microsoft/terminal

公众号

该公众号用于编写 Xtools 系列工具使用文档和工具更新通知

<p align="center"><img width="300" alt="image" src="https://github.com/chasingboy/appsx/blob/main/assets/xsec.png"></p>

特别感谢

chainreactors@ https://github.com/chainreactors/spray

maurosoria@ https://github.com/maurosoria/dirsearch

ffuf@ https://github.com/ffuf/ffuf

更新记录

[+] 2024-09-21【修复】--split bug| 302 filter bug

[+] 2024-10-07【新增】cookie|header|proxy 功能

[+] 2024-09-27【修复】302 filter 错误

[+] 2024-10-11【修复】tls handshake failure, basic 页面对比错误

[+] 2024-11-03【修复】title 特殊字符导致格式问题、Redirect 二次判断问题

[+] 2024-11-15【新增】--httpx|--ffuf 模式

[+] 2024-11-18【修复】发生异常时 -o 没有输出结果的问题 #4

[+] 2024-12-17【修复】map error: concurrent map read and map write

[+] 2024-12-17【修改】扫描结果实时打印, 增加进度条设置是否显示

[+] 2024-12-19【新增】@tony 师傅整理字典 fuzzing-payloads-vulnerability.txt

[+] 2024-12-20【修复】--no-smart 模式 30X 跳转丢包问题

[+] 2025-04-20【修复】ffuf 模式 bug|修改字典目录 wordlist|重构部分代码

[+] 2025-05-28【新增】json 格式结果输出功能

[+] 2025-08-06【修复】URL 格式处理和 http 连接错误 bug

[+] 2025-09-25【修复】--ffuf 模式显示 payload 问题

[+] 2025-09-25【新增】支持目标扫描过程中保存结果|Ctrl+C 中断且保存结果

[+] 2025-09-25【新增】字典优先模式 --word-first

[+] 2025-11-18【修复】参数 -x 过滤问题

[+] 2026-03-10 【新增】支持自定义是否重定向跳转 --is-redirect

[+] 2026-03-10 【新增】支持自定义字符串选择和过滤 --string|--exstring

[+] 2026-03-10 【新增】支持状态码选择和过滤 --code|--excode

View on GitHub
GitHub Stars359
CategoryDevelopment
Updated11h ago
Forks16

Security Score

80/100

Audited on Apr 5, 2026

No findings