Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess
- import time
- while True:
- try:
- # Run wget with output redirected to /dev/null
- subprocess.run(["wget", "https://google.com/", "-O", "/dev/null"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
- # Sleep for one second
- time.sleep(1)
- except KeyboardInterrupt:
- break # Exit the loop if Ctrl+C is pressed
Advertisement
Add Comment
Please, Sign In to add comment