dirsearch使用教程

“如果你觉得孤单就转圈吧,一圈,两圈,三圈......你会发现全世界都围着你转~”


介绍

dirsearch是一个基于python的命令行工具,用于暴力扫描页面结构,包括网页中的目录和文件。

dirsearch下载地址: GitHub - maurosoria/dirsearch: Web path scanner

运行环境:必须安装python3.7或更高版本

一、Dirsearch是什么?

Dirsearch是一个用于探测WEB服务器下的敏感文件/目录的命令行工具。

二、安装和使用

1.安装

1.1选择以下安装选项之一:

  • 使用 git 安装:(推荐git clone https://github.com/maurosoria/dirsearch.git --depth 1)
  • 使用 ZIP 文件安装:在此处下载
  • 使用 Docker 安装:(更多信息可以在这里找到docker build -t "dirsearch:v0.4.3" .)
  • 使用 PyPi 安装:或pip3 install dirsearchpip install dirsearch
  • 使用 Kali Linux 安装:(已弃用)sudo apt-get install dirsearch

1.2下载zip包,解压后进入控制台,输入下面命令进行安装依赖:

pip3 install -r requirements.txt        //安装依赖

 python dirsearch.py -h        //查看帮助

 帮助信息的简单翻译:

  -h, --help                                 显示此帮助消息并退出
  Mandatory:    -u URL, --url=URL                        URL目标        -L URLLIST, --url-list=URLLIST           URL列表目标                            -e EXTENSIONS, --extensions=EXTENSIONS   以逗号分隔的扩展列表(示例:php、asp)                            -E, --extensions-list                    使用公共扩展的预定义列表
  Dictionary Settings:    -w WORDLIST, --wordlist=WORDLIST         自定义单词表(用逗号分隔)    -l, --lowercase    -f, --force-extensions                   强制扩展每个单词表条目(如DirBuster)
  常规设置:    -s DELAY, --delay=DELAY                  请求之间的延迟(浮点数)                            -r, --recursive                          递归暴力        -R RECURSIVE_LEVEL_MAX, --recursive-level-max=RECURSIVE_LEVEL_MAX  最大递归级别(子目录)(默认值:1[仅限根目录+1目录])                            --suppress-empty, --suppress-empty    --scan-subdir=SCANSUBDIRS, --scan-subdirs=SCANSUBDIRS              扫描给定-u |--url的子目录(分开逗号)                            --exclude-subdir=EXCLUDESUBDIRS, --exclude-subdirs=EXCLUDESUBDIRS  在递归过程中排除下列子目录扫描(用逗号分隔)                            -t THREADSCOUNT, --threads=THREADSCOUNT                            线程数                            -x EXCLUDESTATUSCODES, --exclude-status=EXCLUDESTATUSCODES         排除状态代码,用逗号分隔(例如:301,500个)                            --exclude-texts=EXCLUDETEXTS                                       用逗号分隔的文本排除响应(示例: "Not found", "Error")                            --exclude-regexps=EXCLUDEREGEXPS         按regexp排除响应,用逗号分隔(示例:"Not foun[a-z]{1}", "^Error$")                            -c COOKIE, --cookie=COOKIE        --ua=USERAGENT, --user-agent=USERAGENT   用户代理             -F, --follow-redirects                   --遵循重定向             -H HEADERS, --header=HEADERS 页眉,--页眉=页眉             要添加的标题 (example: --header "Referer:example.com" --header "User-Agent: IE")                            --random-agents, --random-user-agents    随机代理,--随机用户代理
  连接设置:    --timeout=TIMEOUT                        连接超时        --ip=IP                                  将名称解析为

2.使用方法

命令总结:

python3 dirsearch.py -e php,txt,zip -u https://target     //简单的查看网址目录和文件
python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt        //使用文件拓展名为php,txt,zip的字典扫描目标urlpython3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --recursive -R 2
python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --recursive -R 4 --scan-subdirs=/,/wp-content/,/wp-admin/
python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --exclude-texts=This,AndThat
python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt -H "User-Agent: IE"
python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt -t 20
python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --random-agents
python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --json-report=reports/target.json
python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --simple-report=reports/target-paths.txt
python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --plain-text-report=reports/target-paths-and-status.js

个人常用命令:

python dirsearch.py -u http://xxxx        //日常使用

python dirsearch.py -u http://xxxx -r        //递归扫描,不过容易被检测

python dirsearch.py -u http://xxxx -r -t 30        //线程控制请求速率

python dirsearch.py -u http://xxxx -r -t 30 --proxy 127.0.0.1:8080        //使用代理


总结

        以上就是今天要讲的内容,本文演示了如何使用有效的Web目录暴力破解工具Dirsearch来扫描和搜索用户可能看不到的隐藏Web目录。这是渗透测试中的第一个非常重要的任务。

####################
免责声明:工具本身并无好坏,希望大家以遵守《网络安全法》相关法律为前提来使用该工具,支持研究学习,切勿用于非法犯罪活动,对于恶意使用该工具造成的损失,和本人及开发者无关。
####################

  • 26
    点赞
  • 175
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
dirsearch是一款用于目录扫描的工具,可以帮助用户查找网站中的敏感文件和目录,以找到可能的漏洞或入口。下面是dirsearch的详细教程: 1. 首先,在以下网址下载dirsearch工具:https://github.com/maurosoria/dirsearch 2. 下载后解压缩到Python的文件夹中。 3. 打开命令行窗口(CMD)并导航到dirsearch的主目录(即解压后的文件夹)。 4. 在命令行中输入以下命令来安装所需的依赖库: ``` pip3 install -r requirements.txt ``` 5. 安装完成后,即可开始使用dirsearch。在命令行中输入以下命令格式来扫描目标网站: ``` python3 dirsearch.py -u 目标网站的URL ``` 请注意,将“目标网站的URL”替换为您要扫描的实际网站URL。 6. dirsearch将开始扫描目标网站,并输出扫描结果。它将尝试对目标网站的各个目录进行扫描,并显示找到的文件和目录。 请注意,以上是dirsearch的基本使用步骤和安装说明。dirsearch还具有许多其他参数和选项,可以根据具体需要进行配置和调整。您可以在dirsearch的文档或官方网站上找到更详细的信息和教程。 [1][2][3<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [dirsearch安装教程](https://blog.csdn.net/Barlow_121212/article/details/120390552)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [dirsearch的安装(非常详细)和使用](https://blog.csdn.net/m0_73185293/article/details/131239309)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [windows下dirsearch安装](https://blog.csdn.net/qq_53030229/article/details/117961784)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值