-
Notifications
You must be signed in to change notification settings - Fork 1
/
textfuzz.py
33 lines (26 loc) · 1.24 KB
/
textfuzz.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
import requests
import concurrent.futures
from colorama import Fore, Style
session = requests.Session()
def make_request(url, word, filter_texts):
try:
response = session.get(f"{url}/{word}", timeout=5)
if all(filter_text not in response.text for filter_text in filter_texts):
print(f"{url}/{word} -", Fore.CYAN + str(response.status_code) + Style.RESET_ALL)
except requests.RequestException as e:
print(f"Error making request for {url}/{word}: {e}")
def fuzz_url(url, wordlist, filter_texts):
with concurrent.futures.ThreadPoolExecutor() as executor:
futures = [executor.submit(make_request, url, word, filter_texts) for word in wordlist]
for future in concurrent.futures.as_completed(futures):
future.result()
def main():
url = input("Enter the URL: ")
wordlist_path = input("Enter the path to the wordlist file: ")
filter_text_input = input("Enter the filter text separated by comma (e.g., 'Not Found,406 Not Acceptable'): ")
filter_texts = [filter_text.strip() for filter_text in filter_text_input.split(",")]
with open(wordlist_path, 'r') as file:
words = file.read().split()
fuzz_url(url, words, filter_texts)
if __name__ == "__main__":
main()