def dir_bruter(word_queue,extensions=None): while not word_queue.empty(): attempt = word_queue.get() attempt_list = [] # check to see if there is a file extension; if not, # it's a directory path we're bruting β if "." not in attempt: attempt_list.append("/%s/" % attempt) else: attempt_list.append("/%s" % attempt) # if we want to bruteforce extensions β if extensions: for extension in extensions: attempt_list.append("/%s%s" % (attempt,extension)) # iterate over our list of attempts for brute in attempt_list: url = "%s%s" % (target_url,urllib.quote(brute)) try:
Run
Reset
Share
Import
Link
Embed
Language▼
English
δΈζ
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question