If you put multiple web requests inside a while loop in python can you bring down a website?

Asked

Viewed 165 times

0

Good staff I have a question totally focused on studies and not to harm anyone If I make web requests and put inside an infinite loop can take the site off the air? Example of the code below in python

import requests
while True:
      r = requests.get("site")
      if(r.status_code == 200):
           print("Atacando site")
      else:
           print("Site fora do ar")

like this code just to get it. and I’m sorry for anything

  • 1

    print("Atacando site")... really, it seems to be only for studies.. hahahha

1 answer

-2

It is possible. But generally the load required to take a website out of the air is too big for a single computer. However it is still possible if the site is poorly optimized or works on a less powerful machine.

  • I’ll run the test on my apache server

Browser other questions tagged

You are not signed in. Login or sign up in order to post.