-
Notifications
You must be signed in to change notification settings - Fork 1
/
directory.py
42 lines (38 loc) · 919 Bytes
/
directory.py
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
34
35
36
37
38
39
40
41
42
import requests
import sys
intro = """
Directory Bruteforcing Tool
.--. .--.
_ ` \ / ` _
`\.===. \.^./ .===./`
\/`"`\/
, |NAZU| ,
/ `\|;-.-'|/` \
/ |::\ | \
.-' ,-'`|:::; |`'-, '-.
| |::::\| |
| |::::;| |
| \::::// |
| `.://' |
By Nazu .' `.
_,' `,_
Usage: python3 http://url/ path_of_wordlist
"""
print(intro)
url = sys.argv[1]
wordlist = sys.argv[2]
def write(word):
f1 = open("Result.txt","a")
f1.write(word + "\n")
fo = open(wordlist,"r+")
for i in range(2000):
word = fo.readline(10).strip()
surl = url + word
print("Discovering => " + surl)
response = requests.get(surl)
print("[+]" , response)
if (response.status_code == 200):
print ("[+] Found :- ",surl)
write(word)
else:
pass