Skip to content

Commit 8b4ff20

Browse files
authored
Merge pull request #844 from palanioffcl/main
Automate Directory bruteforcing
2 parents 2e8779f + b9b11c4 commit 8b4ff20

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

directory_bruteforcing/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# directory bruteforcing
2+
A simple tool for bruteforcing directories in a webserver used in initial stage of recon in penetration testing
3+
4+
## requirements:
5+
* <code>pip install -r requirements.txt</code>
6+
7+
## usage:
8+
* python <code>dirbrute.py</code>
9+
10+
* Enter the url or IP of the site to be searched:
11+
12+
* Enter the path for the wordlists file
13+
14+
## Suggested Wordlists:
15+
https://github.com/3ndG4me/KaliLists/tree/master/dirbuster
16+
17+
Credits: **Dirbuster**

directory_bruteforcing/dirbrute.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import requests
2+
3+
url = input("Enter domain or IP with / at end:")
4+
path = input("Enter Wordlist path :")
5+
file = open(path, "r")
6+
7+
for i in range(len(file)):
8+
wls = file.readline()
9+
r = requests.get(url + wls)
10+
stats = r.status_code
11+
12+
if stats == 200:
13+
print("_" * 50)
14+
print("Path :" + url + wls, (stats))
15+
print("_" * 50)
16+
elif stats == 404:
17+
print("_" * 50)
18+
print("Path :" + url + wls, (stats))
19+
print("_" * 50)
20+
else:
21+
print("_" * 50)
22+
print("Path :" + url + wls, (stats))
23+
print("_" * 50)
24+
file.close()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
requests==2.25.1

0 commit comments

Comments
 (0)