This tool now uses ffuf as the scanning backend and keeps the semantic recursion controller on top.
- It does not rely on
ffuf -recursion. - It scans one level at a time.
- It scores the findings from that round.
- It only continues into paths that look structurally valuable.
This fits your workflow better than plain status-based recursion. If /api, /swagger, /graphql, /admin, /v1 or similar paths appear, the tool continues there first instead of blindly descending into everything that returns 200.
ffuf is easier to orchestrate when you want custom control logic:
- clean JSON output
- simple request model
- easy rate and thread control
- easier to pair with AI ranking or custom recursion policies
dirsearch is still good for quick out-of-the-box scans, but this project is now built around ffuf.
semantic_recursive_dirscan.py: main scriptoutput/summary.json: machine-readable scan summaryoutput/README_REPORT.md: readable reportoutput/raw/: rawffufoutputs per round
- Python 3.11+
ffufinPATH, or pass--ffuf-bin
In your environment, ffuf was installed at:
C:\Users\Administrator\go\bin\ffuf.exeIf that directory is not in PATH, use --ffuf-bin.
For normal use, you only need:
- one Burp request
txt - optional custom wordlist
txt
Minimal command:
python .\semantic_recursive_dirscan.py `
-r .\burp-request.txt `
-w C:\wordlists\content.txtThat is enough to start testing.
If -w is omitted, the tool automatically merges usable .txt dictionaries from dict/ next to the script and uses the merged file for the scan.
Default behavior:
- automatically derives base URL from the request
- inherits method, body, cookie, authorization and useful headers
- uses practical recursion defaults
- enables auto-calibration
- writes results to an
outputdirectory next to your request file - reports likely stale authentication in the output
- starts a local dashboard at
http://127.0.0.1:8765/index.htmlwhen the port is free
python .\semantic_recursive_dirscan.py `
-u https://target.example/ `
-w C:\wordlists\raft-small-directories.txt `
-o .\output `
--ffuf-bin C:\Users\Administrator\go\bin\ffuf.exe `
--max-depth 3 `
--top-k 6 `
--min-score 3.0 `
--min-dir-score 2.2 `
-e php,txt,bak--include-status: which status codes are kept fromffuf--recurse-status: which statuses can trigger deeper scans--top-k: maximum children expanded per parent--max-depth: maximum recursion depth--simple: easiest day-to-day mode-r: short form of--raw-request-file--raw-request-file: inherit method, body, cookie and headers from a Burp/raw HTTP request--run-dirsearch: also launch a separate PowerShell window fordirsearch--no-dirsearch: suppressdirsearcheven if enabled in config--headers: repeatable extra headers--cookie: cookie string--proxy: proxy such as Burp--method: request method--data: request body--auto-calibration: enableffuf -ac--dirsearch-compat: enableffuf -D--dry-run: print commands without running-wcan be omitted to auto-usedict/wordlists
If you want to start from the site root, but only continue when paths like /api, /admin, /swagger, /openapi, /graphql, /v1 look promising:
python .\semantic_recursive_dirscan.py `
-u https://target.example/ `
-w C:\wordlists\content.txt `
-o .\output `
--ffuf-bin C:\Users\Administrator\go\bin\ffuf.exe `
--max-depth 4 `
--top-k 5 `
--min-score 3.4 `
--min-dir-score 2.4 `
--include-status 200-399,401,403 `
--recurse-status 200,204,301,302,307,308,401,403 `
--exclude-sizes 57,590 `
--proxy http://127.0.0.1:8080 `
--auto-calibrationThat setup is useful when the target returns many small fake positives, but a few paths reveal structure worth expanding.
If you already have a valid request in Burp, you can export or save it and let the tool inherit the session state automatically.
The tool will inherit:
- HTTP method
- request body
CookieAuthorization- most custom headers such as
X-Requested-With,Referer,Origin,Accept,Content-Type
The tool will not blindly forward transport-only headers such as:
HostContent-LengthConnectionTransfer-Encoding
Example:
python .\semantic_recursive_dirscan.py `
-r .\burp-request.txt `
-w C:\wordlists\content.txt `
-o .\output `
--ffuf-bin C:\Users\Administrator\go\bin\ffuf.exe `
--max-depth 3 `
--top-k 5 `
--proxy http://127.0.0.1:8080If --raw-request-file is used without -u, the tool derives the base URL from the Host header and the request path.
If the report says authentication may be stale, just go back to Burp, grab a fresh authenticated request, overwrite the txt, and run again.
If you want the tool to also start a separate PowerShell window that runs dirsearch, enable it in config.json:
{
"dirsearch_enabled": true,
"dirsearch_new_window": true
}Or turn it on just for one run:
python .\semantic_recursive_dirscan.py -r .\burp-request.txt -w C:\wordlists\content.txt --run-dirsearchThis gives you two things at once:
- a visible
dirsearchwindow for broad conventional scanning - the local semantic recursion logic running in the main process
- sidecar status recorded in the final report and
summary.json
No heavy refactor was needed for this. dirsearch is treated as a sidecar scan, while the tool's own recursion engine stays unchanged.
The tool now monitors basic sidecar state:
- whether
dirsearchwas launched - sidecar PID when available
- whether the sidecar has already exited
- current matched result line count from
dirsearch.txt
When the port is available, the tool starts a local web dashboard:
http://127.0.0.1:8765/index.html
The page reads runtime_state.json from the active output directory and shows:
- current phase
- current URL and queue size
dirsearchsidecar status- auth warnings
- top findings
- summary and report file paths
For day-to-day use, start the built-in Tkinter GUI from the same Python file:
python .\semantic_recursive_dirscan.py --guiThe GUI keeps the command-line scanner unchanged but makes common switches explicit:
- 项目选择器:每个工程独立保存在
projects/<工程名>/ - 菜单操作:新建、加载、保存、另存为、打开工程目录
?帮助按钮:查看参数说明- 字典支持:可选字典目录或单个字典文件;留空时自动合并软件目录
dict/ - 目标输入:每行一个
http(s)://URL 或请求文件路径 - 主界面简洁:高级设置和日志都用弹窗打开
- 启动自动恢复:下次打开自动恢复上次工程
- 目标列表自动回填:工程打开时自动回填到输入框
- 主按钮状态:
Start/Pause/Resume Stop:在 Windows 上用taskkill /T /F关闭ffuf子进程树- 工程设置:保存在
project.json - 目标输出:保存在
runs/<目标>_<id>/ - 默认并发:5
- 全局并发过高时,自动关闭每目标 Dashboard,避免端口冲突
- 进度说明:界面与报表都会显示运行状态、轮次、队列和已完成数量
- 导出结果:可一键导出中文 JSON、CSV、Markdown 报告、层级说明 MD 和 FreeMind
.mm脑图 - AI说明:默认未启用;可在全局设置弹窗里直接编辑
config.json中的 AI 配置;启用后只辅助候选路径排序/打分,不直接发包或操作目标
本地日志保存在 projects/<工程名>/gui.log,每个目标目录也有自己的 gui.log。
Start / Continue 会跳过已有成功 summary.json 的目标;失败或待运行目标可继续执行。
界面通过同一条 CLI 扫描链路调用 ffuf,实时状态来自 runtime_state.json,而命令和输出会写入 GUI 日志区和本地日志。
Proxy is now better handled from config.json.
Example HTTP proxy:
{
"use_proxy": true,
"proxy_type": "http",
"proxy_host": "127.0.0.1",
"proxy_port": 8080
}Example SOCKS5 proxy:
{
"use_proxy": true,
"proxy_type": "socks5",
"proxy_host": "127.0.0.1",
"proxy_port": 1080
}If proxy is enabled there, both ffuf and the optional dirsearch side scan will use it automatically unless you override --proxy on the command line.
AI is optional. The tool works without it.
The recommended way now is to configure AI once in config.json, not on every command.
If you want AI enabled by default, edit config.json like this:
{
"ffuf_bin": "C:\\Users\\Administrator\\go\\bin\\ffuf.exe",
"ai_enabled": true,
"ai_provider": "openai",
"ai_model": "gpt-4.1-mini",
"ai_base_url": "",
"ai_api_key": "sk-...",
"ai_temperature": 0.0,
"ai_top_n": 12
}If you want the model to help rank candidates:
python .\semantic_recursive_dirscan.py `
-r .\burp-request.txt `
-w C:\wordlists\api.txtThe model only ranks already discovered paths. It does not replace fuzzing.
Sometimes, but not in a way I would rely on as a rule.
dirsearchcan feel faster out of the box because its defaults, filtering behavior, and extension handling are convenient.ffufis usually very competitive, and often better once you tune-t,-rate,-ac, filters, and the wordlist.- In your use case, the backend speed is less important than the recursion strategy. Avoiding useless second-layer scans saves much more time than tool-level micro differences.
Not really in the same way people expect. Treat ffuf as the engine, not the wordlist source.
ffufdoes not come with the rich built-in discovery dictionaries people usually rely on from content scanners or external collections.- In practice, you usually pair
ffufwith your own lists,SecLists,raft, project-specific API lists, or extracted custom candidates.
The bigger difference is packaging and defaults, not capability.
dirsearchis more opinionated as a ready-to-use directory scanner and commonly used with its bundled ecosystem and conventions.ffufis deliberately minimal; you bring the wordlist strategy yourself.- For API-heavy targets, a focused custom list usually beats either tool's default behavior.
If you care about results quality, the best setup is usually:
- generic discovery list for first-pass surface mapping
- API-specific list for
/api,/rest,/graphql, version roots - custom list generated from JS, docs, swagger, parameter names, and prior findings
ffuf itself does not ship with a meaningful built-in content discovery dictionary in the installation you are using.
What I verified locally:
- binary:
C:\Users\Administrator\go\bin\ffuf.exe - source module:
C:\Users\Administrator\go\pkg\mod\github.com\ffuf\ffuf\v2@v2.1.0
Inside that module there are code files, config examples and images, but no bundled discovery wordlist directory. So in practice:
ffufis the fuzzing engine- your wordlists come from you,
SecLists,raft, CAA output, JS extraction, swagger extraction, or custom business dictionaries
- Use this only on targets you are authorized to test.
- For noisy targets, tune
--exclude-sizes,--exclude-regex, and--auto-calibration. - If you want to fuzz authenticated endpoints, pass cookies and headers from a real session.
- For daily use, the simple behavior is already the default. Just pass
-rand-w.