Created
March 9, 2020 02:03
-
-
Save hibryid/db1b4e72bda8430aafc7840689d0ff11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys, subprocess | |
import requests | |
from time import sleep | |
print("started new script") | |
scriptname = os.path.basename(__file__) | |
url = "https://raw.githubusercontent.com/hibryid/Testupdate/master/update.py" | |
r = requests.get(url) | |
with open(scriptname, 'wb') as f: | |
f.write(r.content) | |
print("Done downloading") | |
while True: | |
print("sleeping enough") | |
sleep(15) | |
print(os.path.basename(__file__)) | |
os.execl(sys.executable, sys.executable, * sys.argv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment