You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-62Lines changed: 57 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,3 @@
1
-
 - *Hacking is not a crime*
2
-
3
1
dirsearch - Web path scanner
4
2
=========
5
3
@@ -16,13 +14,13 @@ dirsearch - Web path scanner
16
14
17
15
Overview
18
16
--------
19
-
-Dirsearch is a mature command-line tool designed to brute force directories and files in webservers.
17
+
-"dirsearch" is a mature command-line tool designed to brute force directories and files in webservers.
20
18
21
19
- With 6 years of growth, dirsearch now has become the top web content scanner.
22
20
23
21
- As a feature-rich tool, dirsearch gives users the opportunity to perform a complex web content discovering, with many vectors for the wordlist, high accuracy, impressive performance, advanced connection/request settings, modern brute-force techniques and nice output.
24
22
25
-
-Dirsearch is being actively developed by [@maurosoria](https://twitter.com/_maurosoria) and [@shelld3v](https://github.com/shelld3v)
23
+
-"dirsearch" is being actively developed by [@maurosoria](https://twitter.com/_maurosoria) and [@shelld3v](https://github.com/shelld3v)
- To can use SOCKS proxy or work with `../` in the wordlist, you need to install pips with `requirements.txt`: `pip3 install -r requirements.txt`
38
36
39
-
- If you are using Windows and don't have git, you can install the ZIP file [here](https://github.com/maurosoria/dirsearch/archive/master.zip). Dirsearch also supports [Docker](https://github.com/maurosoria/dirsearch#support-docker)
37
+
- If you are using Windows and don't have git, you can install the ZIP file [here](https://github.com/maurosoria/dirsearch/archive/master.zip). dirsearch also supports [Docker](https://github.com/maurosoria/dirsearch#support-docker)
40
38
41
-
*Dirsearch requires python 3 or greater*
39
+
*dirsearch requires python 3 or greater*
42
40
43
41
44
42
Features
@@ -84,22 +82,20 @@ Features
84
82
85
83
About wordlists
86
84
---------------
87
-
**Summary**: Wordlist must be a text file, each line will be an endpoint. About extensions, unlike other tools, dirsearch won't append extensions to every word, if you don't use the `-f` flag. By default, only the `%EXT%` keyword in the wordlist will be replaced with extensions (`-e <extensions>`).
85
+
**Summary**: Wordlist must be a text file, each line will be an endpoint. About extensions, unlike other tools, dirsearch doesn't append extensions to every word, if you don't use the `-f` flag. By default, only the `%EXT%` keyword in the wordlist will be replaced with extensions (`-e <extensions>`).
88
86
89
87
**Details**:
90
88
- Each line in the wordlist will be processed as such, except when the special keyword *%EXT%* is used, it will generate one entry for each extension (-e | --extensions) passed as an argument.
91
89
92
90
Example:
93
91
94
92
```
95
-
root/
96
93
index.%EXT%
97
94
```
98
95
99
96
Passing the extensions "asp" and "aspx" (`-e asp,aspx`) will generate the following dictionary:
100
97
101
98
```
102
-
root/
103
99
index
104
100
index.asp
105
101
index.aspx
@@ -111,7 +107,6 @@ Example:
111
107
112
108
```
113
109
admin
114
-
home.%EXT%
115
110
api%NOFORCE%
116
111
```
117
112
@@ -122,9 +117,6 @@ admin
122
117
admin.php
123
118
admin.html
124
119
admin/
125
-
home
126
-
home.php
127
-
home.html
128
120
api
129
121
```
130
122
@@ -169,8 +161,8 @@ Options:
169
161
--suffixes=SUFFIXES
170
162
Add custom suffixes to all entries, ignore directories
171
163
(separated by commas)
172
-
--only-selected Only entries with selected extensions or no extension
173
-
+ directories
164
+
--only-selected Only directories + files with selected extensions (or
165
+
no extension)
174
166
--remove-extensions
175
167
Remove extensions in all wordlist entries (Example:
176
168
admin.php -> admin)
@@ -207,10 +199,11 @@ Options:
207
199
--exclude-redirects=REGEXPS
208
200
Exclude responses by redirect regexps or texts,
209
201
separated by commas (Example: 'https://okta.com/*')
210
-
--calibration=PATH Path to test for calibration
211
-
--random-agentChoose a random User-Agent for each request
202
+
--exclude-content=PATH
203
+
Exclude responses by response content of this path
212
204
--minimal=LENGTH Minimal response length
213
205
--maximal=LENGTH Maximal response length
206
+
--skip-on-429 Skip target whenever 429 status code is returned
-**--suffixes**: Adding custom suffixes to all entries
@@ -342,34 +335,48 @@ internal~
342
335
internal/
343
336
```
344
337
345
-
### Exclude extensions
346
-
Use **-X | --exclude-extensions** with your exclude-extension list to remove all entries in the wordlist that have the given extensions
338
+
### Blacklist
339
+
Inside the `db` folder, there are several "blacklist files". Paths in those files will be filtered from the scan result if they have the same status as mentioned in the filename.
340
+
341
+
Example: If you add `admin.php` into `db/403_blacklist.txt`, whenever you do a scan that `admin.php` returns 403, it (`admin.php`) will be excluded.
342
+
343
+
### Filters
344
+
Use **-i | --include-status** and **-x | --exclude-status** to select allowed and not allowed response status codes
**--exclude-sizes**, **--exclude-texts**, **--exclude-regexps**, **--exclude-redirects** and **--exclude-content** are also supported for a more advanced filter
dirsearch allows you to import the raw request from a file. The raw file content will be looked something like this:
370
+
371
+
```
372
+
GET /admin HTTP/1.1
373
+
Host: admin.example.com
374
+
Cache-Control: max-age=0
375
+
Accept: */*
371
376
```
372
377
378
+
Since there is no way for dirsearch to know what the URI scheme is (`http` or `https`), you need to set it using the `--scheme` flag. By default, the scheme is `http`, which is not popular in modern web servers now. That means, without setting up the scheme, you may brute-force with the wrong protocol, and will end up with false negatives.
dirsearch allows you to import the raw request from a file. The raw file content will be looked something like this:
419
+
After:
423
420
424
421
```
425
-
GET /admin HTTP/1.1
426
-
Host: admin.example.com
427
-
Cache-Control: max-age=0
428
-
Accept: */*
422
+
admin
423
+
admin.asp
424
+
admin.aspx
429
425
```
430
426
431
-
Since there is no way for dirsearch to know what the URI scheme is (`http` or `https`), you need to set it using the `--scheme` flag. By default, the scheme is `http`, which is not popular in modern web servers now. That means, without setting up the scheme, you may brute-force with the wrong protocol, and will end up with false negatives.
432
-
433
427
### Scan sub-directories
434
428
From an URL, you can scan sub-directories with **--subdirs**.
0 commit comments