- A wordlist is a text file where each line is a path.
- Unlike other tools, dirsearch only replaces the
%EXT%keyword with extensions from the-eflag. - For wordlists without
%EXT%, such as SecLists, use-f/--force-extensionsto append extensions and/to every wordlist entry. - To apply selected extensions to entries that already have extensions, use
--overwrite-extensions. - Some extensions are excluded from overwrite behavior, such as
.log,.json,.xml, and media extensions like.jpgand.png. - Multiple wordlists can be separated with commas, for example
wordlist1.txt,wordlist2.txt. - Bundled wordlist categories live in
db/categories/and can be selected with--wordlist-categories. - Wordlist generation uses
--wordlist-backend=autoby default.pythonselects the built-in backend andnativerequires a native backend build. - Template wordlists live in
db/templates/and support placeholders. - Use
--wordlist-statusto preview resolved wordlist files and generated entry count before scanning. - Use
--wordlist-max-sizeto cap generation.
Normal extension replacement:
index.%EXT%
Passing asp and aspx as extensions generates:
index
index.asp
index.aspx
Force extensions:
admin
Passing php and html as extensions with -f / --force-extensions generates:
admin
admin.php
admin.html
admin/
Overwrite extensions:
login.html
Passing jsp and jspa as extensions with --overwrite-extensions generates:
login.html
login.jsp
login.jspa
Bundled wordlist categories are stored in db/categories/.
Available categories:
extensionsconfvcsbackupsdblogskeyswebcommon
Use all to include everything:
python3 dirsearch.py -u https://target --wordlist-categories allTemplate wordlists live in db/templates/ and support placeholders such as:
%SUBJECT%%CRUD_OP%%AUTH_OP%%ADMIN_OP%%ENV%%DATE%%API_VERSION%%CATEGORY:name%%EXT%
Preview resolved files and generated entry counts without scanning:
python3 dirsearch.py -u https://target --wordlist-statusLimit generated entries:
python3 dirsearch.py -u https://target --wordlist-max-size 500000Use --prefixes to add custom prefixes to all entries:
python3 dirsearch.py -e php -u https://target --prefixes .,admin,_Wordlist:
tools
Generated with prefixes:
tools
.tools
admintools
_tools
Use --suffixes to add custom suffixes to all entries:
python3 dirsearch.py -e php -u https://target --suffixes ~Wordlist:
index.php
internal
Generated with suffixes:
index.php
internal
index.php~
internal~
Supported transformations: lowercase, uppercase, and capitalization.
Lowercase:
admin
index.html
Uppercase:
ADMIN
INDEX.HTML
Capital:
Admin
Index.html
Use --exclude-extensions with an extension list to remove all paths in the wordlist that contain the given extensions.
python3 dirsearch.py -u https://target --exclude-extensions jspWordlist:
admin.php
test.jsp
After:
admin.php