dirsearch指令大全


基本用法

python3 dirsearch.py -u URL

主要参数和选项

目标和URL设置

–url URL

指定目标 URL

-u http://example.com

–url-list FILE

从文件中读取多个 URL

-l urls.txt

扩展名

–extensions EXTENSIONS

逗号分隔的文件扩展名列表

-e php,html

字典文件

–wordlists WORDLIST

使用自定义字典文件

-w /path/to/wordlist.txt

线程和性能

–threads THREADS

指定扫描线程数(默认值:20)

-t 10

–timeout SECONDS

设置请求超时时间(默认值:3秒)

--timeout 5

–delay MILLISECONDS

设置每次请求之间的延迟

--delay 500

忽略状态码

–exclude-status CODES
逗号分隔的要忽略的 HTTP 状态码列表。

-x 400,403,404

代理和请求设置

–proxy PROXY

使用代理服务器

--proxy http://127.0.0.1:8080

–headers HEADERS

添加自定义 HTTP 请求头

--headers "User-Agent: Custom,Authorization: Bearer <token>"

保存结果

–output FILE

将结果保存到指定文件

--output result.txt

其他选项

–recursive

递归扫描找到的目录

-r

–recursive-depth DEPTH

设置递归扫描的最大深度

-R 3

–exclude-sizes SIZES

逗号分隔的要忽略的响应大小列表

--exclude-sizes 0B,123KB

–exclude-text TEXT

忽略包含指定文本的响应

--exclude-text "Not Found"

–force-extensions

强制所有字典条目带上扩展名

-f

–full-url

在输出中显示完整的 URL

–random-agent

使用随机的 User-Agent

-c FILE, --config FILE

使用配置文件

完整命令示例

python3 dirsearch.py -u http://example.com -e php,html,js -w /path/to/wordlist.txt -x 404,403 -t 20 --timeout=5 --proxy=http://127.0.0.1:8080 --output=result.txt

  • 扫描 http://example.com
  • 搜索 .php, .html, 和 .js 扩展名的文件
  • 使用指定的字典文件 /path/to/wordlist.txt
  • 忽略状态码 404 和 403
  • 使用 20 个线程
  • 请求超时时间设置为 5 秒
  • 通过 http://127.0.0.1:8080 代理进行扫描
  • 将结果保存到 result.txt

查看帮助

使用 -h 或 --help 参数来查看 dirsearch 的所有选项和用法:

python3 dirsearch.py -h

常用组合

基本扫描

python3 dirsearch.py -u http://example.com

使用特定扩展名和字典文件

python3 dirsearch.py -u http://example.com -e php,html -w /path/to/wordlist.txt

使用代理和自定义头

python3 dirsearch.py -u http://example.com --proxy http://127.0.0.1:8080 --headers "User-Agent: Custom"

保存结果并忽略状态码

python3 dirsearch.py -u http://example.com --output result.txt -x 404,403

总结

dirsearch 是一个强大的工具,通过其各种选项和灵活的配置,可以有效地扫描和枚举目标 Web 服务器上的隐藏目录和文件。

GitHub官方文档仓库:https://github.com/maurosoria/dirsearch

相关推荐

  1. dirsearch指令大全

    2024-05-26 03:46:46       15 阅读
  2. Fastboot指令大全

    2024-05-26 03:46:46       41 阅读
  3. Nginx指令配置大全

    2024-05-26 03:46:46       20 阅读
  4. ChatGPT 指令大全工具

    2024-05-26 03:46:46       43 阅读
  5. 如何使用 ChatGPT 指令大全

    2024-05-26 03:46:46       21 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-05-26 03:46:46       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-05-26 03:46:46       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-05-26 03:46:46       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-05-26 03:46:46       20 阅读

热门阅读

  1. golang问题

    2024-05-26 03:46:46       11 阅读
  2. v-if 和 v-for 为什么不建议一起使用 ?

    2024-05-26 03:46:46       10 阅读
  3. HCIA-ARP

    HCIA-ARP

    2024-05-26 03:46:46      11 阅读
  4. 分区4K对齐那些事,你想知道的都在这里

    2024-05-26 03:46:46       14 阅读
  5. 【AIGC调研系列】MiniCPM-Llama3-V2.5模型与GPT-4V对比

    2024-05-26 03:46:46       18 阅读
  6. WMI技术介绍以及使用WMI技术获取系统信息

    2024-05-26 03:46:46       12 阅读
  7. 黄金价格创新高,交易风险提示

    2024-05-26 03:46:46       13 阅读