From e84d0aca2e6fc2fb6ae3084bd21edb9d55761931 Mon Sep 17 00:00:00 2001 From: nik <98088130+nik-lmao@users.noreply.github.com> Date: Mon, 8 Jan 2024 22:27:20 +0100 Subject: [PATCH] =?UTF-8?q?[=F0=9F=92=8E]=20Updated=20main.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/main.py b/main.py index ecbd0f8..0fcf6e6 100644 --- a/main.py +++ b/main.py @@ -1,19 +1,21 @@ -import requests, threading, os +import requests, threading -url = input('raw link: ') -amount = input('enter the amount of threads (go for 300): ') +url = input('Enter your URL: ') +threads = input('Enter the amount of threads: ') + +sent = 0 def thread(): + global url + global sent while True: - sent = 0 r = requests.get(url) - if r.status_code == 403: - print('Invalid URL') + if not r.ok: + print('Failed to request URL.') else: - pass - sent += 1 - print(f'Views sent: %s' % sent) + sent += 1 + print(f'Successfully sent a request to {url}. ({str(sent)})') -for _ in range(int(amount)): +for _ in range(int(threads)): t = threading.Thread(target=thread) t.start()