html隐藏目录在哪里查找,使用Dirsearch查找隐藏目录
對網站進行
安裝Dirsearch
我們需要做的第一件事是從GitHub安裝dirsearch 。最簡單的方法是使用
git。因此,如果尚未在系統上安裝它,請在終端中使用以下命令進行安裝:
apt-get update && apt-get install git
現在,我們可以使用git clone命令來克隆該工具所在的目錄:
git clone
https://github.com/maurosoria/dirsearch
接下來,使用cd命令切換到新創建的目錄:
cd dirsearch/
并使用ls驗證是否存在所有內容:
~/dirsearch# ls
CHANGELOG.md??db??default.conf??dirsearch.py??lib??logs??README.md??reports??thirdparty
配置目錄搜索
無需進行安裝,我們現在可以運行dirsearch,并且可以通過幾種不同的方式來運行。
1、使用Python運行Dirsearch
第一個方法是簡單地使用Python運行它,盡管它需要Python 3才能正常工作。我們可以在下面看到它為我們提供了一個簡短的用法示例,告訴我們我們需要指定一個有效的URL。
~/dirsearch# python3 dirsearch.py
URL target is missing, try using -u
2、使用Bash運行Dirsearch
我們可以運行dirsearch的另一種方法是使用Bash。使用ls -la將為我們提供此目錄中所有內容的權限,并且我們可以看到該工具是可執行的。
~/dirsearch# ls -la
所以我們要做的就是使用點斜線,它基本上是當前目錄中文件的相對路徑:
~/dirsearch# ./dirsearch.py
URL target is missing, try using -u
3、使用符號鏈接運行Dirsearch
運行dirsearch的最后一種方法(我的首選方法)是在/ bin目錄中創建鏈接。這將使我們能夠從任何地方運行該工具,而不是僅在從GitHub克隆的目錄中運行。
首先,進入/ bin目錄:
~/dirsearch# cd /bin/
然后,使用ln -s命令創建指向該工具的鏈接:
/bin# ln -s ~/dirsearch/dirsearch.py dirsearch
在這里,我將其命名為dirsearch,因此當我現在在終端中運行dirsearch時,該工具將能夠從任何目錄運行。現在,讓我們回到主目錄,然后再繼續操作:
/bin# cd
使用Dirsearch掃描
現在,當我們在終端中鍵入dirsearch時,我們會從之前獲得相同的用法消息:
~# dirsearch
URL target is missing, try using -u
要獲得更詳細的用法示例和完整的幫助菜單,請使用-h標志:
~# dirsearch -h
Usage: dirsearch [-u|--url] target [-e|--extensions] extensions [options]
Options:
-h, --help? ?? ?? ?? ?show this help message and exit
Mandatory:
-u URL, --url=URL? ?URL target
-L URLLIST, --url-list=URLLIST
URL list target
-e EXTENSIONS, --extensions=EXTENSIONS
Extension list separated by comma (Example: php,asp)
Dictionary Settings:
-w WORDLIST, --wordlist=WORDLIST
-l, --lowercase
-f, --force-extensions
Force extensions for every wordlist entry (like in
DirBuster)
General Settings:
-s DELAY, --delay=DELAY
Delay between requests (float number)
-r, --recursive? ???Bruteforce recursively
-R RECURSIVE_LEVEL_MAX, --recursive-level-max=RECURSIVE_LEVEL_MAX
Max recursion level (subdirs) (Default: 1 [only
rootdir 1 dir])
--suppress-empty, --suppress-empty
--scan-subdir=SCANSUBDIRS, --scan-subdirs=SCANSUBDIRS
Scan subdirectories of the given -u|--url (separated
by comma)
--exclude-subdir=EXCLUDESUBDIRS, --exclude-subdirs=EXCLUDESUBDIRS
Exclude the following subdirectories during recursive
scan (separated by comma)
-t THREADSCOUNT, --threads=THREADSCOUNT
Number of Threads
-x EXCLUDESTATUSCODES, --exclude-status=EXCLUDESTATUSCODES
Exclude status code, separated by comma (example: 301,
500)
-c COOKIE, --cookie=COOKIE
--ua=USERAGENT, --user-agent=USERAGENT
-F, --follow-redirects
-H HEADERS, --header=HEADERS
Headers to add (example: --header "Referer:
example.com" --header "User-Agent: IE"
--random-agents, --random-user-agents
Connection Settings:
--timeout=TIMEOUT? ?Connection timeout
--ip=IP? ?? ?? ?? ? Resolve name to IP address
--proxy=HTTPPROXY, --http-proxy=HTTPPROXY
Http Proxy (example: localhost:8080
--http-method=HTTPMETHOD
Method to use, default: GET, possible also: HEADOST
--max-retries=MAXRETRIES
-b, --request-by-hostname
By default dirsearch will request by IP for speed.
This forces requests by hostname
Reports:
--simple-report=SIMPLEOUTPUTFILE
Only found paths
--plain-text-report=PLAINTEXTOUTPUTFILE
Found paths with status codes
--json-report=JSONOUTPUTFILE
我們可以看到該工具具有大量的選項和潛在的配置設置,但是在本教程中,我們將重點介紹一些更重要的選項。
dirsearch至少需要一個URL和至少一個文件擴展名才能運行。例如,我們可以使用-u標志指定一個有效的URL ,并使用-e標志指定要搜索的文件擴展名:
在啟動之后,它為我們提供了有關擴展,正在使用的HTTP方法,線程數以及當前字典大小(在本例中為默認列表)的信息。然后,它開始爬網目錄并返回找到的內容,包括狀態碼,大小和目錄名稱。
我們可以使用-x標志來排除某些HTTP狀態代碼。例如,讓我們省略任何403代碼:
根據我們追求的結果,這可以使結果更清晰。我們還可以指定多個代碼,以逗號分隔來排除它們。
我們可以通過設置-w標志來告訴dirsearch使用我們選擇的字典:
~# dirsearch -u?http://10.10.0.50/dvwa?-e php -x 403,301,302 -w /usr/share/wordlists/wfuzz/general/common.txt
我們可以看到在這個特定的字典中找不到太多的結果,這是有道理的,因為它較小。
dirsearch的真正功能是執行遞歸目錄掃描的能力。要運行遞歸搜索,只需添加-r標志:
一旦完成初始掃描,它將返回并遞歸掃描每個找到的目錄。例如,我們可以看到它開始掃描docs目錄:
我們還可以通過鍵盤中斷隨時暫停掃描。按e會完全退出掃描,按c會從上次停止的地方繼續進行,按n會轉到下一個目錄。由于遞歸掃描通常需要花費一些時間,因此這些操作使我們可以控制結果。
像這樣使用它只會遞歸地搜索一個級別。要將遞歸級別設置為更深的值,請使用-R標志,后跟要執行的級別數:
我們了解了dirsearch(一種功能強大的暴力Web目錄掃描程序)及其與其他類似工具相比的一些優點。我們在系統上安裝了dirsearch并設置了符號鏈接以允許我們從任何地方運行它。然后,我們研究了一些基本的使用示例,并展示了該工具的遞歸掃描功能的強大功能。最后,通過dirsearch可以輕松地在掃描網站時發現隱藏的目錄和文件。
總結
以上是生活随笔為你收集整理的html隐藏目录在哪里查找,使用Dirsearch查找隐藏目录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: discuz 生成静态html,Disc
- 下一篇: html tr中可以有br吗,html