首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >工具 | 一款自动化过滤扫描结果的目录扫描工具dirsx

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

作者头像
Timeline Sec
发布2024-11-23 14:10:59
发布2024-11-23 14:10:59
3310
举报
文章被收录于专栏:Timeline SecTimeline Sec

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

项目地址:https://github.com/chasingboy/dirsx

01 前言

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

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

02 功能

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

  • 使用 html 相似度对结果进行过滤
  • 对 301、302、403 状态进行二次判断
  • 对 json 返回结果进行判断
  • 字典第一个字母大写|全部字母大写|添加前后缀
  • 返回页面 title, 如无 title 返回内容前面 30 个字符串 (默认|设置)
  • 自动过滤模式,默认开启 (开启|关闭)

03 基本使用

指定字典进行扫描

代码语言:javascript
复制
dirsx -u https://www.baidu.com -w words.txt

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

代码语言:javascript
复制
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/

指定备份文件进行扫描

代码语言:javascript
复制
dirsx -u https://www.baidu.com -w words.txt --bak

指定添加后缀进行扫描

代码语言:javascript
复制
dirsx -u https://www.baidu.com -w words.txt --suffix h5

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

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

  • 常见目录字典
  • dirsearch 的自带字典
  • 长度为 1-5 的字母组合
  • ... ...
代码语言:javascript
复制
~ 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

dirsx -h
代码语言:javascript
复制
~ kali$ dirsx -h


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

Usage:
  dirsx [OPTIONS]

Application Options:
  -u, --url=         input url of target
  -l, --list=        input file containing list of target
  -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
      --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
      --upper-title  capitalize the first letter eg: admin -> Admin
      --upper-all    capitalize the all letter eg: admin -> ADMIN
      --bak          enable scanning backup file (default:false)
      --split        enable spliting the url path, eg: /a/b -> /a/, /a/b (default: false)
  -X=                method of http requests (default: GET)
  -x, --excode=      specify the status codes that be filtered eg: 400,404 (default: 400,404,406,416,501,502,503)
      --no-smart     disable smart mode (automated filtering)

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

04 特别感谢

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

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

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2024-09-04,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 Timeline Sec 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 一款自动化过滤扫描结果的目录扫描工具
  • 01 前言
  • 02 功能
  • 03 基本使用
    • dirsx -h
  • 04 特别感谢
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档