-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdirectoryfuzz.py
More file actions
33 lines (28 loc) · 994 Bytes
/
directoryfuzz.py
File metadata and controls
33 lines (28 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from urllib.error import HTTPError
from colorama import init, Fore
import requests
init()
GREEN = Fore.GREEN
RESET = Fore.RESET
GRAY = Fore.LIGHTBLACK_EX
space = ' '
def directory_fuzz(url):
try:
with open ("wordpressfuzzing.txt","r") as f:
for i in f:
try:
words = i.split()
for word in words:
fuzz = url + word
# print(fuzz)
response = requests.get(fuzz)
status = response.status_code
if(status == 200):
print(f"{GREEN}[+]{fuzz}: {space*2} {status} {RESET}")
else:
print(f"{GRAY}[!]{fuzz}: {space*2} {status} {RESET}")
except HTTPError as e:
print(f"Error {e}")
except:
print("URL is not valid")
# directory_fuzz()