我做了一個假病毒來嘗試我的朋友:P但我想知道是否有代碼禁用命令選項轉義功能,直到應用程序完成。我只是希望他們體驗我實驗的整個過程,而不會讓他們在半途中退出。由於有沒有辦法在applescript應用程序仍在運行時禁用強制退出?
:編輯 - 這只是一個簡單的腳本,我想我可以告訴我的朋友,但我只是不想讓他們逼的最初幾秒鐘後退出的話,他們還是可以完全掌控自己的MAC
顯示對話框「播放MagroXELA的遊戲」的按鈕{「播放」,「退出」}默認按鈕1 如果結果的返回按鈕是「播放」,則
設定容積5
蜂鳴5
display dialog "Virus is downloading." buttons "Stop" default button "Stop" with title "Malware Initiating" with icon 2
delay 2
set volume 5
do shell script "say -v Zarvox Virus has Down loaded Successfully"
delay 2
do shell script "say -v Zarvox Wifi terminated"
beep 1
--
-- Toggle Airport Power On and Off
--
if (offset of "On" in (do shell script "networksetup -getairportpower en1")) > 0 then
do shell script "networksetup -setairportpower en1 off"
end if
tell application "Finder"
activate
open application file "Activity Monitor.app" of folder "Utilities" of folder "Applications" of startup disk
open application file "AirPort Utility.app" of folder "Utilities" of folder "Applications" of startup disk
open application file "Boot Camp Assistant.app" of folder "Utilities" of folder "Applications" of startup disk
open application file "Bluetooth File Exchange.app" of folder "Utilities" of folder "Applications" of startup disk
open application file "Disk Utility.app" of folder "Utilities" of folder "Applications" of startup disk
open application file "Keychain Access.app" of folder "Utilities" of folder "Applications" of startup disk
open application file "Terminal.app" of folder "Utilities" of folder "Applications" of startup disk
open application file "System Information.app" of folder "Utilities" of folder "Applications" of startup disk
end tell
tell application "Finder"
activate
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
make new Finder window
set target of Finder window 1 to startup disk
set target of Finder window 1 to startup disk
open application file "Terminal.app" of folder "Utilities" of folder "Applications" of startup disk
set target of Finder window 1 to startup disk
set target of Finder window 1 to folder "Applications" of startup disk
end tell
delay 6
tell application "DigitalColor Meter" to quit
tell application "Grab" to quit
tell application "Network Utility" to quit
tell application "System Information" to quit
tell application "Terminal" to quit
tell application "Keychain Access" to quit
tell application "Disk Utility" to quit
tell application "Bluetooth File Exchange" to quit
tell application "Boot Camp Assistant" to quit
tell application "AirPort Utility" to quit
tell application "Activity Monitor" to quit
tell application "App Store" to quit
tell application "iTunes" to quit
tell application "Finder"
repeat while window 1 exists
close window 1
end repeat
delay 2
set volume 5
do shell script "say -v Alex YOU GOT TROLLED HUH HUH HUH HUH"
delay 2
do shell script "say -v Zarvox Wifi activated"
--
-- Toggle Airport Power On and Off
--
if (offset of "On" in (do shell script "networksetup -getairportpower en1")) > 0 then
do shell script "networksetup -setairportpower en1 off"
else
do shell script "networksetup -setairportpower en1 on"
end if
delay 4
我們當然不會幫助你防止有人從後面獲得控制自己電腦。爲什麼我們應該相信你這是無害的腳本,你會給你的朋友? – idmean 2014-09-20 12:49:17
我發佈了腳本來顯示它的功能,只是認爲會有一個禁用強制退出的腳本,甚至只是將應用程序從強制退出菜單中隱藏起來。我不希望他們失去對他們的電腦的控制 – 2014-09-20 12:59:56
確實有辦法實現這一點。雖然你發佈的腳本看起來不是很危險,但你仍然可以使用我給你的信息來製作另一個非常邪惡的腳本。當它開始打開幾個應用程序和多個窗口時,就會失去對Mac的控制權。 – idmean 2014-09-20 14:13:30