| 1 |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5. |
| 2 |
.TH DIRSEARCH "1" "September 2021" "dirsearch v0.4.2" "User Commands" |
| 3 |
.SH NAME |
| 4 |
dirsearch \- An advanced command-line tool designed to brute force directories and files in webservers |
| 5 |
.SH SYNOPSIS |
| 6 |
.B dirsearch.py |
| 7 |
[\fI\,-u|--url\/\fR] \fI\,target \/\fR[\fI\,-e|--extensions\/\fR] \fI\,extensions \/\fR[\fI\,options\/\fR] |
| 8 |
.SH OPTIONS |
| 9 |
.TP |
| 10 |
\fB\-\-version\fR |
| 11 |
show program's version number and exit |
| 12 |
.TP |
| 13 |
\fB\-h\fR, \fB\-\-help\fR |
| 14 |
show this help message and exit |
| 15 |
.IP |
| 16 |
Mandatory: |
| 17 |
.TP |
| 18 |
\fB\-u\fR URL, \fB\-\-url\fR=\fI\,URL\/\fR |
| 19 |
Target URL |
| 20 |
.TP |
| 21 |
\fB\-l\fR FILE, \fB\-\-url\-list\fR=\fI\,FILE\/\fR |
| 22 |
Target URL list file |
| 23 |
.TP |
| 24 |
\fB\-\-stdin\fR |
| 25 |
Target URL list from STDIN |
| 26 |
.TP |
| 27 |
\fB\-\-cidr\fR=\fI\,CIDR\/\fR |
| 28 |
Target CIDR |
| 29 |
.TP |
| 30 |
\fB\-\-raw\fR=\fI\,FILE\/\fR |
| 31 |
Load raw HTTP request from file (use `\-\-scheme` flag |
| 32 |
to set the scheme) |
| 33 |
.TP |
| 34 |
\fB\-e\fR EXTENSIONS, \fB\-\-extensions\fR=\fI\,EXTENSIONS\/\fR |
| 35 |
Extension list separated by commas (Example: php,asp) |
| 36 |
.TP |
| 37 |
\fB\-X\fR EXTENSIONS, \fB\-\-exclude\-extensions\fR=\fI\,EXTENSIONS\/\fR |
| 38 |
Exclude extension list separated by commas (Example: |
| 39 |
asp,jsp) |
| 40 |
.TP |
| 41 |
\fB\-f\fR, \fB\-\-force\-extensions\fR |
| 42 |
Add extensions to every wordlist entry. By default |
| 43 |
dirsearch only replaces the %EXT% keyword with |
| 44 |
extensions |
| 45 |
.IP |
| 46 |
Dictionary Settings: |
| 47 |
.TP |
| 48 |
\fB\-w\fR WORDLIST, \fB\-\-wordlists\fR=\fI\,WORDLIST\/\fR |
| 49 |
Customize wordlists (separated by commas) |
| 50 |
.TP |
| 51 |
\fB\-\-prefixes\fR=\fI\,PREFIXES\/\fR |
| 52 |
Add custom prefixes to all wordlist entries (separated |
| 53 |
by commas) |
| 54 |
.TP |
| 55 |
\fB\-\-suffixes\fR=\fI\,SUFFIXES\/\fR |
| 56 |
Add custom suffixes to all wordlist entries, ignore |
| 57 |
directories (separated by commas) |
| 58 |
.TP |
| 59 |
\fB\-\-only\-selected\fR |
| 60 |
Remove paths have different extensions from selected |
| 61 |
ones via `\-e` (keep entries don't have extensions) |
| 62 |
.TP |
| 63 |
\fB\-\-remove\-extensions\fR |
| 64 |
Remove extensions in all paths (Example: admin.php \-> |
| 65 |
admin) |
| 66 |
.TP |
| 67 |
\fB\-U\fR, \fB\-\-uppercase\fR |
| 68 |
Uppercase wordlist |
| 69 |
.TP |
| 70 |
\fB\-L\fR, \fB\-\-lowercase\fR |
| 71 |
Lowercase wordlist |
| 72 |
.TP |
| 73 |
\fB\-C\fR, \fB\-\-capital\fR |
| 74 |
Capital wordlist |
| 75 |
.IP |
| 76 |
General Settings: |
| 77 |
.TP |
| 78 |
\fB\-t\fR THREADS, \fB\-\-threads\fR=\fI\,THREADS\/\fR |
| 79 |
Number of threads |
| 80 |
.TP |
| 81 |
\fB\-r\fR, \fB\-\-recursive\fR |
| 82 |
Brute\-force recursively |
| 83 |
.TP |
| 84 |
\fB\-\-deep\-recursive\fR |
| 85 |
Perform recursive scan on every directory depth |
| 86 |
(Example: api/users \-> api/) |
| 87 |
.TP |
| 88 |
\fB\-\-force\-recursive\fR |
| 89 |
Do recursive brute\-force for every found path, not |
| 90 |
only paths end with slash |
| 91 |
.TP |
| 92 |
\fB\-R\fR DEPTH, \fB\-\-recursion\-depth\fR=\fI\,DEPTH\/\fR |
| 93 |
Maximum recursion depth |
| 94 |
.TP |
| 95 |
\fB\-\-recursion\-status\fR=\fI\,CODES\/\fR |
| 96 |
Valid status codes to perform recursive scan, support |
| 97 |
ranges (separated by commas) |
| 98 |
.TP |
| 99 |
\fB\-\-subdirs\fR=\fI\,SUBDIRS\/\fR |
| 100 |
Scan sub\-directories of the given URL[s] (separated by |
| 101 |
commas) |
| 102 |
.TP |
| 103 |
\fB\-\-exclude\-subdirs\fR=\fI\,SUBDIRS\/\fR |
| 104 |
Exclude the following subdirectories during recursive |
| 105 |
scan (separated by commas) |
| 106 |
.TP |
| 107 |
\fB\-i\fR CODES, \fB\-\-include\-status\fR=\fI\,CODES\/\fR |
| 108 |
Include status codes, separated by commas, support |
| 109 |
ranges (Example: 200,300\-399) |
| 110 |
.TP |
| 111 |
\fB\-x\fR CODES, \fB\-\-exclude\-status\fR=\fI\,CODES\/\fR |
| 112 |
Exclude status codes, separated by commas, support |
| 113 |
ranges (Example: 301,500\-599) |
| 114 |
.TP |
| 115 |
\fB\-\-exclude\-sizes\fR=\fI\,SIZES\/\fR |
| 116 |
Exclude responses by sizes, separated by commas |
| 117 |
(Example: 123B,4KB) |
| 118 |
.TP |
| 119 |
\fB\-\-exclude\-texts\fR=\fI\,TEXTS\/\fR |
| 120 |
Exclude responses by texts, separated by commas |
| 121 |
(Example: 'Not found', 'Error') |
| 122 |
.TP |
| 123 |
\fB\-\-exclude\-regexps\fR=\fI\,REGEXPS\/\fR |
| 124 |
Exclude responses by regexps, separated by commas |
| 125 |
(Example: 'Not foun[a\-z]{1}', '^Error$') |
| 126 |
.TP |
| 127 |
\fB\-\-exclude\-redirects\fR=\fI\,REGEXPS\/\fR |
| 128 |
Exclude responses by redirect regexps or texts, |
| 129 |
separated by commas (Example: 'https://okta.com/*') |
| 130 |
.TP |
| 131 |
\fB\-\-exclude\-response\fR=\fI\,PATH\/\fR |
| 132 |
Exclude responses by response of this page (path as |
| 133 |
input) |
| 134 |
.TP |
| 135 |
\fB\-\-skip\-on\-status\fR=\fI\,CODES\/\fR |
| 136 |
Skip target whenever hit one of these status codes, |
| 137 |
separated by commas, support ranges |
| 138 |
.TP |
| 139 |
\fB\-\-minimal\fR=\fI\,LENGTH\/\fR |
| 140 |
Minimal response length |
| 141 |
.TP |
| 142 |
\fB\-\-maximal\fR=\fI\,LENGTH\/\fR |
| 143 |
Maximal response length |
| 144 |
.TP |
| 145 |
\fB\-\-max\-time\fR=\fI\,SECONDS\/\fR |
| 146 |
Maximal runtime for the scan |
| 147 |
.TP |
| 148 |
\fB\-q\fR, \fB\-\-quiet\-mode\fR |
| 149 |
Quiet mode |
| 150 |
.TP |
| 151 |
\fB\-\-full\-url\fR |
| 152 |
Full URLs in the output (enabled automatically in |
| 153 |
quiet mode) |
| 154 |
.TP |
| 155 |
\fB\-\-no\-color\fR |
| 156 |
No colored output |
| 157 |
.IP |
| 158 |
Request Settings: |
| 159 |
.TP |
| 160 |
\fB\-m\fR METHOD, \fB\-\-http\-method\fR=\fI\,METHOD\/\fR |
| 161 |
HTTP method (default: GET) |
| 162 |
.TP |
| 163 |
\fB\-d\fR DATA, \fB\-\-data\fR=\fI\,DATA\/\fR |
| 164 |
HTTP request data |
| 165 |
.TP |
| 166 |
\fB\-H\fR HEADERS, \fB\-\-header\fR=\fI\,HEADERS\/\fR |
| 167 |
HTTP request header, support multiple flags (Example: |
| 168 |
\fB\-H\fR 'Referer: example.com') |
| 169 |
.TP |
| 170 |
\fB\-\-header\-list\fR=\fI\,FILE\/\fR |
| 171 |
File contains HTTP request headers |
| 172 |
.TP |
| 173 |
\fB\-F\fR, \fB\-\-follow\-redirects\fR |
| 174 |
Follow HTTP redirects |
| 175 |
.TP |
| 176 |
\fB\-\-random\-agent\fR |
| 177 |
Choose a random User\-Agent for each request |
| 178 |
.TP |
| 179 |
\fB\-\-auth\-type\fR=\fI\,TYPE\/\fR |
| 180 |
Authentication type (basic, digest, bearer, ntlm) |
| 181 |
.TP |
| 182 |
\fB\-\-auth\fR=\fI\,CREDENTIAL\/\fR |
| 183 |
Authentication credential (user:password or bearer |
| 184 |
token) |
| 185 |
.HP |
| 186 |
\fB\-\-user\-agent\fR=\fI\,USERAGENT\/\fR |
| 187 |
.HP |
| 188 |
\fB\-\-cookie\fR=\fI\,COOKIE\/\fR |
| 189 |
.IP |
| 190 |
Connection Settings: |
| 191 |
.TP |
| 192 |
\fB\-\-timeout\fR=\fI\,TIMEOUT\/\fR |
| 193 |
Connection timeout |
| 194 |
.TP |
| 195 |
\fB\-s\fR DELAY, \fB\-\-delay\fR=\fI\,DELAY\/\fR |
| 196 |
Delay between requests |
| 197 |
.TP |
| 198 |
\fB\-\-proxy\fR=\fI\,PROXY\/\fR |
| 199 |
Proxy URL, support HTTP and SOCKS proxies (Example: |
| 200 |
localhost:8080, socks5://localhost:8088) |
| 201 |
.TP |
| 202 |
\fB\-\-proxy\-list\fR=\fI\,FILE\/\fR |
| 203 |
File contains proxy servers |
| 204 |
.TP |
| 205 |
\fB\-\-replay\-proxy\fR=\fI\,PROXY\/\fR |
| 206 |
Proxy to replay with found paths |
| 207 |
.TP |
| 208 |
\fB\-\-scheme\fR=\fI\,SCHEME\/\fR |
| 209 |
Default scheme (for raw request or if there is no |
| 210 |
scheme in the URL) |
| 211 |
.TP |
| 212 |
\fB\-\-max\-rate\fR=\fI\,RATE\/\fR |
| 213 |
Max requests per second |
| 214 |
.TP |
| 215 |
\fB\-\-retries\fR=\fI\,RETRIES\/\fR |
| 216 |
Number of retries for failed requests |
| 217 |
.TP |
| 218 |
\fB\-b\fR, \fB\-\-request\-by\-hostname\fR |
| 219 |
By default dirsearch requests by IP for speed. This |
| 220 |
will force dirsearch to request by hostname |
| 221 |
.TP |
| 222 |
\fB\-\-ip\fR=\fI\,IP\/\fR |
| 223 |
Server IP address |
| 224 |
.TP |
| 225 |
\fB\-\-exit\-on\-error\fR |
| 226 |
Exit whenever an error occurs |
| 227 |
.IP |
| 228 |
Reports: |
| 229 |
.TP |
| 230 |
\fB\-o\fR FILE, \fB\-\-output\fR=\fI\,FILE\/\fR |
| 231 |
Output file |
| 232 |
.TP |
| 233 |
\fB\-\-format\fR=\fI\,FORMAT\/\fR |
| 234 |
Report format (Available: simple, plain, json, xml, |
| 235 |
md, csv, html) |
| 236 |
.IP |
| 237 |
You can change the dirsearch default configurations (default extensions, |
| 238 |
.PP |
| 239 |
timeout, wordlist location, ...) by editing the "/etc/dirsearch/default.conf" |
| 240 |
file. More information at https://github.com/maurosoria/dirsearch. |
| 241 |
.SH "SEE ALSO" |
| 242 |
The full documentation for |
| 243 |
.B dirsearch |
| 244 |
is maintained as a Texinfo manual. If the |
| 245 |
.B info |
| 246 |
and |
| 247 |
.B dirsearch |
| 248 |
programs are properly installed at your site, the command |
| 249 |
.IP |
| 250 |
.B info dirsearch |
| 251 |
.PP |
| 252 |
should give you access to the complete manual. |