dirsearch 使用记录

 

# 简介

下载地址:https://github.com/maurosoria/dirsearch

环境:python3

 

# 命令

 

1、一般

python3 dirsearch.py -u url -e *

python3 dirsearch.py -u url -e * -t 5   //默认线程是16,调低保险一点

 

2、指定

+ 字典

  - python3 dirsearch.py -u url -e * -w $PATH/xxx.txt

+ url范围

  - python3 dirsearch.py -l targetUrl.txt -e *

 

3、显示结果指定

+  指定状态码

  - python3 dirsearch.py -u url -e * -t 5 -i 200,302,500

 

 

 

原版help:

 1 Usage: dirsearch.py [-u|--url] target [-e|--extensions] extensions [options]
 2 
 3 Options:
 4   -h, --help            show this help message and exit
 5 
 6   Mandatory:  //必填项
 7     -u URL, --url=URL   URL target
 8     -L URLLIST, --url-list=URLLIST
 9                         URL list target
10     -e EXTENSIONS, --extensions=EXTENSIONS
11                         Extension list separated by comma (Example: php,asp)
12     -E, --extensions-list
13                         Use predefined list of common extensions //使用常见扩展名的预定义列表
14 
15   Dictionary Settings:  //字典设置
16     -w WORDLIST, --wordlist=WORDLIST
17                         Customize wordlist (separated by comma)
18     -l, --lowercase
19     --suff=SUFFIXES, --suffixes=SUFFIXES
20                         Add custom suffixes to all files, ignores directories  //向所有文件添加自定义后缀,忽略目录
21                         (example.%EXT%%SUFFIX%)
22     -f, --force-extensions
23                         Force extensions for every wordlist entry (like in
24                         DirBuster)  //强制扩展每个单词列表条目(例如 DirBuster)
25     --nd, --no-dot-extensions
26                         Don't add a '.' character before extensions
27 
28   General Settings:  
29     --clean-view, --clean-view
30     -s DELAY, --delay=DELAY
31                         Delay between requests (float number)
32     -r, --recursive     Bruteforce recursively  //暴力递归
33     -R RECURSIVE_LEVEL_MAX, --recursive-level-max=RECURSIVE_LEVEL_MAX
34                         Max recursion level (subdirs) (Default: 1 [only
35                         rootdir + 1 dir])
36     --suppress-empty, --suppress-empty
37     --min=MINIMUMRESPONSESIZE
38                         Minimal response length
39     --max=MAXIMUMRESPONSESIZE
40                         Maximal response length
41     --scan-subdir=SCANSUBDIRS, --scan-subdirs=SCANSUBDIRS
42                         Scan subdirectories of the given -u|--url (separated
43                         by comma)
44     --exclude-subdir=EXCLUDESUBDIRS, --exclude-subdirs=EXCLUDESUBDIRS
45                         Exclude the following subdirectories during recursive
46                         scan (separated by comma)
47     -t THREADSCOUNT, --threads=THREADSCOUNT
48                         Number of Threads  //线程默认是16
49     -i INCLUDESTATUSCODES, --include-status=INCLUDESTATUSCODES
50                         Show only included status codes, separated by comma
51                         (example: 301, 500)  //状态码
52     -x EXCLUDESTATUSCODES, --exclude-status=EXCLUDESTATUSCODES
53                         Exclude status code, separated by comma (example: 301,
54                         500)  //排除状态码
55     --exclude-texts=EXCLUDETEXTS
56                         Exclude responses by texts, separated by comma
57                         (example: "Not found", "Error")  //排除的文字
58     --exclude-regexps=EXCLUDEREGEXPS
59                         Exclude responses by regexps, separated by comma
60                         (example: "Not foun[a-z]{1}", "^Error$")  //正则排除
61     -c COOKIE, --cookie=COOKIE
62     --ua=USERAGENT, --user-agent=USERAGENT
63     -F, --follow-redirects
64     -H HEADERS, --header=HEADERS
65                         Headers to add (example: --header "Referer:
66                         example.com" --header "User-Agent: IE"
67     --random-agents, --random-user-agents
68 
69   Connection Settings:
70     --timeout=TIMEOUT   Connection timeout
71     --ip=IP             Resolve name to IP address
72     --proxy=HTTPPROXY, --http-proxy=HTTPPROXY
73                         Http Proxy (example: localhost:8080)  //
74     --proxylist=PROXYLIST, --http-proxy-list=PROXYLIST
75                         Path to file containg http proxy servers.  //列表式代理
76     --http-method=HTTPMETHOD
77                         Method to use, default: GET, possible also: HEAD;POST  //请求方式指定,默认GET
78     --max-retries=MAXRETRIES  //最大重试次数
79     -b, --request-by-hostname
80                         By default dirsearch will request by IP for speed.
81                         This forces requests by hostname
82 
83   Reports:
84     --simple-report=SIMPLEOUTPUTFILE
85                         Only found paths
86     --plain-text-report=PLAINTEXTOUTPUTFILE
87                         Found paths with status codes
88     --json-report=JSONOUTPUTFILE
89     -q, --quiet-mode    Disable output to console (only to reports)

 

posted @ 2021-05-27 13:31  ardyh  阅读(384)  评论(0编辑  收藏  举报