Skip to content

Commit 2a9d724

Browse files
authored
Update dirbrute.py
1 parent f838b9a commit 2a9d724

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

directory_bruteforcing/dirbrute.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,21 @@
1-
# importing requests python module
21
import requests
3-
4-
# enter your ip or domain which youre gonna search for
52
url = input("Enter domain or IP with / at end:")
6-
7-
# path for the wordlists
83
path = input("Enter Wordlist path :")
9-
10-
#opening the wordlists in read mode
114
file = open(path, "r")
12-
13-
#sending the requests and with url, wordlists
145
for i in range(len(file)):
156
wls = file.readline()
167
r = requests.get(url+wls)
178
stats = r.status_code
18-
19-
# if the status code is 200 then it is success and there is folder exists
209
if stats == 200:
2110
print("_"*50)
2211
print("Path :"+url+wls, (stats))
2312
print("_"*50)
24-
25-
# if the status code is 404 then it is not found means there is no such folder exists
2613
elif stats == 404:
2714
print("_"*50)
2815
print("Path :"+url+wls, (stats))
2916
print("_"*50)
30-
31-
# else if none of the above things exists
3217
else:
3318
print("_"*50)
3419
print("Path :"+url+wls, (stats))
3520
print("_"*50)
36-
37-
# closing the file
3821
file.close()

0 commit comments

Comments
 (0)