这个警告表示当前使用的 pip 版本为 21.2.4,但是还有更新的版本可用(版本号为 23.0),建议通过命令 C:\Python3\python.exe -m pip install --upgrade pip 来升级 pip。
于是我们输入C:\Python3\python.exe -m pip install --upgrade pip
但还是下载失败,原因是依赖项未升级。
因此我们输入pip install --upgrade -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
该命令会根据 requirements.txt 文件中列出的依赖项,自动安装或升级所需的包,并使用指定的阿里云镜像源来获取依赖项的安装文件。
下载成功:
现在,就可以开始正常使用dirsearch了。
接下来将介绍dirsearch的使用方法。
注意:dirsearch的命令必须在C:\Python3\Dirsearch\dirsearch-master目录下运行
语法及参数
输入python dirsearch.py -h
得到dirsearch帮助
回显如下:
C:\Python3\Dirsearch\dirsearch-master>python dirsearch.py -h
Usage: dirsearch.py [-u|--url] target [-e|--extensions] extensions [options]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
Mandatory:
-u URL, --url=URL Target URL(s), can use multiple flags
-l PATH, --urls-file=PATH
URL list file
--stdin Read URL(s) from STDIN
--cidr=CIDR Target CIDR
--raw=PATH Load raw HTTP request from file (use '--scheme' flag
to set the scheme)
-s SESSION\_FILE, --session=SESSION\_FILE
Session file
--config=PATH Path to configuration file (Default:
'DIRSEARCH\_CONFIG' environment variable, otherwise
'config.ini')
Dictionary Settings:
-w WORDLISTS, --wordlists=WORDLISTS
Wordlist files or directories contain wordlists
(separated by commas)
-e EXTENSIONS, --extensions=EXTENSIONS
Extension list separated by commas (e.g. php,asp)
-f, --force-extensions
Add extensions to the end of every wordlist entry. By
default dirsearch only replaces the %EXT% keyword with
extensions
-O, --overwrite-extensions
Overwrite other extensions in the wordlist with your
extensions (selected via `-e`)
--exclude-extensions=EXTENSIONS
Exclude extension list separated by commas (e.g.
asp,jsp)
--remove-extensions
Remove extensions in all paths (e.g. admin.php ->
admin)
--prefixes=PREFIXES
Add custom prefixes to all wordlist entries (separated
by commas)
--suffixes=SUFFIXES
Add custom suffixes to all wordlist entries, ignore
directories (separated by commas)
-U, --uppercase Uppercase wordlist
-L, --lowercase Lowercase wordlist
-C, --capital Capital wordlist