DIRSEARCH(1)

πŸ’– DIRSEARCH(1) πŸ’–

okay bestie, sit down, hydrate, and let me tell you about dirsearch β€” she's an advanced command-line tool designed to brute force directories and files in webservers. that's it. that's the girl. she's giving main character energy and she is coming for your hidden paths ✨


πŸŽ€ NAME πŸŽ€

dirsearch β€” an advanced command-line tool designed to brute force directories and files in webservers. no cap, that's literally what she does and she does it beautifully πŸ’…


🌸 SYNOPSIS 🌸

dirsearch.py [-u|--url] target [-e|--extensions] extensions [options]

that's the whole vibe right there. give her a target, maybe some extensions, and she goes πŸ¦‹


✨ OPTIONS ✨

πŸ’œ the basics first

  • --version β€” show program's version number and exit. she'll tell you who she is and then dip πŸ‘‹
  • -h, --help β€” show this help message and exit. the classic "wait what do i do" button 🫢

πŸ‘‘ Mandatory:

okay so these ones are lowkey the whole point. you need a target, bestie.

  • -u URL, --url=URL β€” Target URL 🎯
  • -l FILE, --url-list=FILE β€” Target URL list file. a whole file of targets?? yes, she's ambitious πŸ“‹
  • --stdin β€” Target URL list from STDIN. pipe it in, we love a flexible queen 🌈
  • --cidr=CIDR β€” Target CIDR. network ranges, she's doing the most (respectfully) 🌐
  • --raw=FILE β€” Load raw HTTP request from file (use --scheme flag to set the scheme). fyi you gotta pair her with --scheme, don't forget or it's giving chaos πŸ’€
  • -e EXTENSIONS, --extensions=EXTENSIONS β€” Extension list separated by commas (Example: php,asp) πŸ“
  • -X EXTENSIONS, --exclude-extensions=EXTENSIONS β€” Exclude extension list separated by commas (Example: asp,jsp) 🚫
  • -f, --force-extensions β€” Add extensions to every wordlist entry. By default dirsearch only replaces the %EXT% keyword with extensions. so yeah, -f is the "no thoughts, just extensions everywhere" mode ✨

πŸ“š Dictionary Settings:

this is where she plays dress-up with your wordlist πŸ’…

  • -w WORDLIST, --wordlists=WORDLIST β€” Customize wordlists (separated by commas) πŸ“–
  • --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) πŸŽ€
  • --only-selected β€” Remove paths have different extensions from selected ones via -e (keep entries don't have extensions) βœ‚οΈ
  • --remove-extensions β€” Remove extensions in all paths (Example: admin.php -> admin) 🧚
  • -U, --uppercase β€” Uppercase wordlist. LOUD MODE πŸ”₯
  • -L, --lowercase β€” Lowercase wordlist. soft mode 🌸
  • -C, --capital β€” Capital wordlist. Title Case Bestie Mode πŸ‘‘

βš™οΈ General Settings:

the knobs and dials, the whole control room ✨

  • -t THREADS, --threads=THREADS β€” Number of threads. more threads = more zoomies πŸƒβ€β™€οΈπŸ’¨
  • -r, --recursive β€” Brute-force recursively. she goes deeper. that's the tweet πŸŒ€
  • --deep-recursive β€” Perform recursive scan on every directory depth (Example: api/users -> api/) πŸ•³οΈ
  • --force-recursive β€” Do recursive brute-force for every found path, not only paths end with slash πŸ’ͺ
  • -R DEPTH, --recursion-depth=DEPTH β€” Maximum recursion depth. set a limit or she'll spiral (relatable) 😭
  • --recursion-status=CODES β€” Valid status codes to perform recursive scan, support ranges (separated by commas) πŸ“Š
  • --subdirs=SUBDIRS β€” Scan sub-directories of the given URL[s] (separated by commas) πŸ—‚οΈ
  • --exclude-subdirs=SUBDIRS β€” Exclude the following subdirectories during recursive scan (separated by commas) 🚫
  • -i CODES, --include-status=CODES β€” Include status codes, separated by commas, support ranges (Example: 200,300-399) βœ…
  • -x CODES, --exclude-status=CODES β€” Exclude status codes, separated by commas, support ranges (Example: 301,500-599) ❌
  • --exclude-sizes=SIZES β€” Exclude responses by sizes, separated by commas (Example: 123B,4KB) πŸ“
  • --exclude-texts=TEXTS β€” Exclude responses by texts, separated by commas (Example: 'Not found', 'Error') πŸ“
  • --exclude-regexps=REGEXPS β€” Exclude responses by regexps, separated by commas (Example: 'Not foun[a-z]{1}', '^Error$') 🧠
  • --exclude-redirects=REGEXPS β€” Exclude responses by redirect regexps or texts, separated by commas (Example: 'https://okta.com/*') πŸ”€
  • --exclude-response=PATH β€” Exclude responses by response of this page (path as input) πŸͺž
  • --skip-on-status=CODES β€” Skip target whenever hit one of these status codes, separated by commas, support ranges ⏭️
  • --minimal=LENGTH β€” Minimal response length πŸ“‰
  • --maximal=LENGTH β€” Maximal response length πŸ“ˆ
  • --max-time=SECONDS β€” Maximal runtime for the scan. a lil timer, we love boundaries ⏰
  • -q, --quiet-mode β€” Quiet mode. she's shy (she is not) 🀫
  • --full-url β€” Full URLs in the output (enabled automatically in quiet mode) πŸ”—
  • --no-color β€” No colored output. for the monochrome minimalists πŸ–€

🌐 Request Settings:

how she knocks on the door πŸšͺ

  • -m METHOD, --http-method=METHOD β€” HTTP method (default: GET) πŸ› οΈ
  • -d DATA, --data=DATA β€” HTTP request data πŸ“¦
  • -H HEADERS, --header=HEADERS β€” HTTP request header, support multiple flags (Example: -H 'Referer: example.com') πŸ“¨
  • --header-list=FILE β€” File contains HTTP request headers πŸ“„
  • -F, --follow-redirects β€” Follow HTTP redirects 🧭
  • --random-agent β€” Choose a random User-Agent for each request. she's in disguise, nobody knows her πŸ₯Έ
  • --auth-type=TYPE β€” Authentication type (basic, digest, bearer, ntlm) πŸ”
  • --auth=CREDENTIAL β€” Authentication credential (user:password or bearer token) πŸ—οΈ
  • --user-agent=USERAGENT β€” (no description given, she just lets you set your own vibe) πŸ¦‹
  • --cookie=COOKIE β€” (no description given either, but you know what a cookie is bestie) πŸͺ

πŸ”Œ Connection Settings:

the plumbing. the infrastructure. the ✨network✨ 🫢

  • --timeout=TIMEOUT β€” Connection timeout ⏳
  • -s DELAY, --delay=DELAY β€” Delay between requests. breathe, girl πŸ§˜β€β™€οΈ
  • --proxy=PROXY β€” Proxy URL, support HTTP and SOCKS proxies (Example: localhost:8080, socks5://localhost:8088) 🎭
  • --proxy-list=FILE β€” File contains proxy servers πŸ“
  • --replay-proxy=PROXY β€” Proxy to replay with found paths πŸ”
  • --scheme=SCHEME β€” Default scheme (for raw request or if there is no scheme in the URL) 🧬
  • --max-rate=RATE β€” Max requests per second 🚦
  • --retries=RETRIES β€” Number of retries for failed requests πŸ”„
  • -b, --request-by-hostname β€” By default dirsearch requests by IP for speed. This will force dirsearch to request by hostname 🏷️
  • --ip=IP β€” Server IP address πŸ“
  • --exit-on-error β€” Exit whenever an error occurs. dramatic exit, love that for her πŸšͺπŸ’¨

πŸ“Š Reports:

receipts, bestie. always keep the receipts 🧾

  • -o FILE, --output=FILE β€” Output file πŸ’Ύ
  • --format=FORMAT β€” Report format (Available: simple, plain, json, xml, md, csv, html) 🎨

You can change the dirsearch default configurations (default extensions, timeout, wordlist location, ...) by editing the "/etc/dirsearch/default.conf" file. More information at https://github.com/maurosoria/dirsearch.

so yeah, if you wanna make her act different by default, that's the file to go touch. and if you want the full lore, that github link is right there πŸ’–

πŸ‘€ SEE ALSO πŸ‘€

The full documentation for dirsearch is maintained as a Texinfo manual. If the info and dirsearch programs are properly installed at your site, the command

info dirsearch

should give you access to the complete manual.

iykyk β€” that's your one-stop shop for the full manual, no cap πŸ“–βœ¨


and that's the whole page, bestie. this was dirsearch v0.4.2, brought to you from September 2021 β€” an icon, a legend, and she is the moment πŸ‘‘πŸ’…πŸ¦‹